They were the same songs our friends were listening to back home, but the music took on different, and often deeper, meanings in Vietnam. Nancy Sinatra’s “These Boots Are Made for Walkin’” became an anthem to the grunts who humped endless miles on patrol in the jungles, adding layers of meaning to the story of a young woman turning the tables on her cheating boyfriend. Likewise, the Jimi Hendrix Experience’s “Purple Haze” meant one thing in an LSD-friendly dorm room and another to troops who associated it with the color of the smoke grenades used to guide helicopters into landing zones. “Ring of Fire,” “Nowhere to Run,” “Riders on the Storm” — all of them shifted shape in relation to the war.

The meaning of songs often changed for individual vets whose personal (and in several cases, political) perspectives underwent seismic shifts in the years during and after the war. The dynamic was complicated by music’s peculiar status as both a center of political or cultural resistance and a manifestation of America’s high-tech supremacy. That Barry McGuire’s hit song “Eve of Destruction,” which railed against injustice and nuclear war in 1965, was quickly countered by Sgt. Barry Sadler’s “The Ballad of the Green Berets,” the No. 1 song of 1966, is as much a reflection of the shifting politics of the country as it is about changes in musical tastes. Likewise, “For What It’s Worth” by Buffalo Springfield, the song frequently played to accompany film depictions of antiwar protests, had nothing to do with Vietnam per se — Stephen Stills wrote it about a riot on the Sunset Strip — yet it was as treasured by scores of Vietnam soldiers as it was by protesters in America.

Opposition to the draft helped fuel the sounds of protest — “Draft Dodger Rag,” “Universal Soldier,” “It Ain’t Me Babe.” But they were songs we G.I.s knew and often sang in Vietnam. While researching our book, my co-author, Craig Werner, and I heard poignant stories from Vietnam veterans about listening to a fellow soldier play “Masters of War” or “Where Have All the Flowers Gone” in Vietnam. Neil Young’s “Ohio” resonated in ways political and personal, too, since many of us Vietnam-era soldiers were the same age as the students killed at Kent State — and the National Guardsmen who fired at them. Just about all the guys I served with in Vietnam in 1970 and 1971 laughed at Edwin Starr’s “War” because we knew better than he did that it was good for “absolutely nothin’.’”

Many of those tensions and crosscurrents came to a head around Country Joe McDonald, the guiding spirit of Country Joe and the Fish, whose unplanned, slightly reluctant performance of “I-Feel-Like-I’m-Fixin’-to-Die Rag” at Woodstock in August 1969 placed a veteran’s perspective on Vietnam at the center of musical protest. When Craig and I met Joe at the North Berkeley BART station in 2008 to interview him for our book, he introduced himself by saying, “I consider myself a veteran first and a hippie second.”

Although the pro-war “hawks” who flooded him with hate mail — he still receives it — were unaware of the crucial fact that Joe McDonald was a Navy veteran, one who’d realized that, as he put it, “all military experience, all combat experience universally is the same — not good/bad, moral/immoral. I believe if we had the music of all these different armies, all the infantries everywhere, you’d have the same attitude expressed within their songs that we expressed in ours.”

Returning to the Bay Area after his discharge from the Navy, Joe threw himself into the growing counterculture. In the summer of 1965 he wrote the song that even today is an anthem of the antiwar movement, yet holds a special resonance for Vietnam veterans, a point we heard again and again from the hundreds of Vietnam veterans we’ve interviewed.