A fusion of funk, new wave, R&B and dance, Dirty Mind also contains more rock-oriented beats than Prince's previous albums, as well as elements of punk rock on the track "Sister". Half of the songs were composed by Prince on tour, when he and his band had a slot opening for Rick James.
The album was recorded in a makeshift 16-track studio in the basement of Prince's home on Lake Minnetonka, with Prince engineering the album himself, credited under the pseudonym Jamie Starr. Sessions occurred in May and June 1980, with Prince playing nearly all of the instruments himself, and several of the songs were recorded in one night. The album contrasted with Prince's previous ones in its raw and unpolished production style, with several of the tracks being essentially demos. The production presents a clean sound with minimal distortion or reverb, more akin to power pop or punk rock. Barry Walters of Pitchfork later observed that, "Whereas Prince's '70s albums proclaimed his virtuosity, here he achieves much more by confining himself to the simplest, boldest strokes." It is the only Prince album to not feature a "slow jam".
Side one
The core riff of "Dirty Mind" was originally a jam devised by keyboardist Doctor Fink for Prince's band. He and Prince recorded it in one evening and Prince finished it the next morning. The song is set to a metronomic disco beat, likened by Walters to the motorik beat of Krautrock. The song melds Minneapolis funk with new wave and post-punk, featuring falsetto singing and percussive guitar, as well as "tinny keyboard hooks". Stephen Thomas Erlewine of AllMusic described the song as "robotic funk". Walters notes that the song's descending key changes mixed with ascending church organ chords are "a particularly Prince-like juxtaposition that offers a peek-a-boo glimpse into the convolutions—sexual and otherwise—of his psyche."
"When You Were Mine" was written in a Florida hotel room. John Freeman of The Quietus deemed the song Prince's "first great rock song", featuring "frantic guitars" and "squidgy keyboards". It has been classified by several critics as new wave and likened to the works of Elvis Costello. Lyrically, the song contains elements of gender bending, as well as voyeurism and cuckoldry, and Freeman noted that the song's dynamic forecasted later Prince tracks like "Little Red Corvette", "Paisley Park" and "If I Was Your Girlfriend". The track is one of Prince's most covered songs and was recorded by Cyndi Lauper for her 1983 album She's So Unusual.
"Do It All Night" contains "sultry funk", with Kenneth Partridge of Billboard noting the chorus' "urgent sixteenth-note keyboards underscoring Prince's [sexual] eagerness". "Gotta Broken Heart Again", a minimalistic ballad featuring "effortless falsetto", "breezy piano", and "soulful crooning", forecasts Prince's work on his 1986 album Parade.
Side two
"Uptown", another song featuring a heavy disco beat, is billed by Partridge as a "utopian funk-rock anthem [...] about racial and sexual tolerance", melding the styles of Kool & the Gang and the Clash. Walters hailed it as being "among the most daring R&B radio hits of the '80s", due to its lyrical themes about "how homophobia constricts even heterosexuals":
While minding his own business, a passing hottie asks him point blank, "Are you gay?" But instead of blowing his cool, Prince reasons, "She's just a victim of society and all its games." To school the dame, he takes her to Uptown, a real-life Minneapolis counterculture haven back in 1980 that's subsequently been gentrified. There, she loses her uptight ways as the track's grinding disco-funk gains momentum; the overwhelming freedom acts as an aphrodisiac, and the once-scorned weirdo gets "the best night I ever had." Everybody's happy.
"Head" and "Sister" are both among Prince's "most infamous" and "notorious" songs. Freeman stated that "Head" "outlines the shameless seduction of a bride-to-be with the promise of oral delights, over a …