"Machine Gun" is a song written by American musician Jimi Hendrix, and originally recorded for the 1970 Band of Gypsys album, with Billy Cox and Buddy Miles. It is a lengthy, loosely defined (jam-based) protest of the Vietnam War, and perhaps a broader comment on conflict of any kind.

At a performance in Berkeley, California, Hendrix introduced the song:

Hendrix's 12-minute performance of "Machine Gun" for the Band of Gypsys is often lauded as his greatest, and is considered a stunning display of guitar virtuosity.  Hendrix's long guitar solos and percussive riffs combine with controlled feedback to simulate the sounds of a battlefield, such as helicopters, dropping bombs, explosions, machine guns, and the screams and cries of those wounded or grieving.  Although a proper studio recording was never realized, several live recordings exist.

Origins 
Hendrix debuted "Machine Gun" in September 1969 in a performance on The Dick Cavett Show.
He was backed by drummer Mitch Mitchell, bassist Cox, and conga player Juma Sultan, who along with Larry Lee and Jerry Velez, performed at Woodstock as "Gypsy Sun and Rainbows".  At about two and a half minutes, it is the shortest known performance of the song.  Later releases vary from ten to twenty minutes. The improvisatory material revolves around a core descending riff and bassline: the song opens with a Uni-Vibe-based guitar riff intended to mimic the sound of a firing machine gun. The bass and drum patterns then commence. The rather sparse lyrics, which differ in every performance, relate the point of view of a soldier fighting in war:

With the Band of Gypsys, Hendrix's vocals are accompanied by drummer Miles's vocals. "Machine Gun" is a prime example of Hendrix's use of guitar effects, as most recordings use a wah-wah pedal, an Arbiter Fuzz Face, a Univibe pedal, and an Octavia pedal, as well as heavy feedback. Two additional performances of the song appear on the expanded Band of Gypsys' album Live at the Fillmore East released in 1999.  A fourth is included on Machine Gun: The Fillmore East First Show (2016).  Later performances with Mitchell and Cox are included on Live at Berkeley (2003)  and Blue Wild Angel: Live at the Isle of Wight (2002).

Midnight Lightning version

During the writing and recording of (what would have been) Hendrix's fourth studio album, Hendrix began a studio version of "Machine Gun", which was later heavily edited by Alan Douglas and released on the 1975 posthumous album Midnight Lightning. This version, which was edited to 7:30 (actual length was about 12:56), was not well received among fans, as Douglas had brought in session musicians to overdub drum, bass and even guitar parts, which had been lacking due to either poor recording quality or damage to the tapes.  Although the Hendrix estate gained control of his recordings in 1995 and re-released what are presumed to be authentic recordings of some of the songs that Douglas had overdubbed, an unaltered studio version of "Machine Gun" has yet to be issued.

Other renditions
Drawing upon the protest theme, The Isley Brothers recorded a medley of the Crosby, Stills, Nash & Young's song "Ohio" and Hendrix's "Machine Gun" (titled "Ohio" / "Machine Gun") on their 1971 album Givin' It Back.

References

1969 songs
Jimi Hendrix songs
Songs written by Jimi Hendrix
Anti-war songs
Songs of the Vietnam War