Making the past matter in the present is just one aspect of Madlib’s genius. Photograph by Graeme Mitchell for The New Yorker

I don’t know why, exactly, but whenever I hear anything by or featuring Madlib, the protean, forty-two-year-old, Los Angeles-based self-described “d.j. first, producer second, and m.c. last,” I start thinking about black male fraternity, a subject that Madlib keeps coming back to directly and indirectly in his work, which is jumbled, cinematic, and layered in tone and style. Madlib has some sixty albums to his credit; in the past five years alone, he’s released thirteen and helped produce five. His collaborators on these projects, for the most part, have been men of color who, not unlike Madlib, are serious goofballs or smart knuckleheads, artists who aim to pervert hip-hop’s early stance—what Michele Wallace called the myth of “Black Macho”—while embracing their own deep nerdiness. The 2014 Madlib album “Piñata” (originally titled “Cocaine Piñata”), featuring the vocalist Freddie Gibbs, is a trancelike and jumpy ode to consciousness. On the title track, the rapper Mac Miller outs himself as a bookworm (Madlib is also an inveterate reader), while fronting about the kind of sex you know that dweeb isn’t having:

My endorphins are morphin’, absorbin’ energy Original copy, A Tale of Two Cities gets read to me Reading Emerson novels, eating some Belgian waffles Some powder go up my nostrils, my dick going down her tonsils . . .

In January, Kanye West released his first Madlib-produced track, “No More Parties in L.A.” (It will be included on his album “Waves,” which is set to come out this month.) The song sounds like nothing that West has ever been part of; it has a depth beyond his bombast and a soulful mellowness that dials him down—a bit. Featuring Kendrick Lamar, “No More Parties” samples work by Walter (Junie) Morrison, of the seventies funk band Ohio Players, as well as Ghostface Killah’s 2000 track “Mighty Healthy.” The intro is courtesy of Johnny (Guitar) Watson’s 1977 tune “Give Me My Love,” and the bridge comes from Larry Graham’s 1980 song “Stand Up and Shout About Love.” Making the past matter in the present is just one aspect of Madlib’s genius, as is pushing hip-hop’s more commercially minded performers to move beyond the fans and the record-company executives and listen to themselves.

Born Otis Jackson, Jr., in Oxnard, California, Madlib is the son of musicians: his father was a singer and a jazz and soul session musician; his mother was a songwriter and a piano player. The Jacksons were as interested in the history of black music as they were in performing it; soul music had a lineage, a family—some of whose members turned up in Madlib’s own back yard. Jon Faddis, the jazz trumpeter and educator, is Jackson’s uncle. “Dizzy Gillespie would come by, eating gumbo,” Jackson told Andre Torres, in Wax Poetics, in 2013. “It was crazy. My grandparents were friends with all of them. Dee Dee Bridgewater, all of them, they’d come through.” Black sounds—the sonic landscape of the African-American diaspora—were both alive and archival. At home, Jackson immersed himself in his father’s record collection, but he had no real desire to make or perform music—at least, not in a traditional way. He’d “fiddle” at the piano and tried to learn to play the drums, but none of it took. What fascinated him was how a record was made.

As the son of a black man who cared—and stayed—Jackson spent his formative years outside the tired Negro narrative of the absent or abusive father. A hallmark of his style as a producer is his incredible, nearly paternal concern for the artists he’s showcasing. (He has three children of his own.) When he was invited by Blue Note Records to dig into the company archives for his 2003 remix album, “Shades of Blue,” Madlib paid special homage to Horace Silver’s “Song for My Father,” from 1965, doubling back on certain phrases and elegant riffs without obscuring Silver’s melodic line—or his sentiment.

While Otis, Sr., schooled the future beat master in the music of the past, an older brother, Pete, introduced him to the sounds of the younger generation—early hip-hop. “The first record I heard was ‘Rapper’s Delight,’ sorry to say,” Jackson told Torres. Writing in this magazine in 2004, Sasha Frere-Jones drew a distinction between the shiny sound-booth finish of corporate hip-hop—Kanye, Dr. Dre, and others—and the stubborn individualism of artists like Madlib, who stick to their samples instead of paying musicians to compose for them. (Madlib uses turntables and analog recording devices in an age of digital everything.) “Rapper’s Delight,” with its cheery populism, isn’t something that Madlib would ever sample in his work, except, perhaps, as a joking comment on his past. Still, that song and others alerted him to the world of producers and beat makers, including early greats like Too Short, Roxanne Shanté, and DJ Pooh, who didn’t so much create beats as reimagine or feel them, scratching and rapping lyrics that linked the past to the present.

Hip-hop grew out of an independent spirit and a love of community. On the East Coast, in the seventies and early eighties, block parties were a form of social entertainment, an alternative to the dominant genres of disco and stadium rock. You didn’t need a building to house rap; it could be produced outdoors, and feed off the energy of the crowd. Drum machines, samplers, and so on were no longer the province of studio engineers; they were now mass-produced and could be bought on the cheap. Plus, you didn’t need a trained voice or show-biz glitz to perform a rap song. The lyrics weren’t restricted, as popular music has always been, to stories of love or fun. Most of the rappers Madlib admired when he was growing up sang about black male alienation and life inside or outside “the system”—but what if you didn’t feel doomed by your blackness or your masculinity or your dreams? The hip-hop producer and sample czar Prince Paul, a native of Long Island who is best known for his work with De La Soul and RZA, put forth a story that was about black manhood, too, but one that stressed the humor and the ridiculousness of it. (Think early Ishmael Reed, with a beat.) Madlib, who is six years younger than Paul, has always got off on the absurdity of being a walking target, but to that he adds an understanding of the gamble that is black life, in which expectations are dashed—or repressed.

In elementary school, Jackson hooked up with his classmates Jack Brown (the future Wildchild) and Romeo Jimenez (now DJ Romes) to form a pop-locking group. In high school, in the late eighties, the three became Lootpack, and Jackson soon took on the stage name Madlib. Lootpack’s version of West Coast rap—with mental gunplay in place of firearms—went nowhere fast; they couldn’t get record companies interested. (In 1995, Jackson’s father financed Lootpack’s first EP, “Psyche Move.”) Eventually, the band caught the attention of the L.A. producer and d.j. Peanut Butter Wolf, who ran the Stones Throw label, and in 1999 he put out their first studio album, “Soundpieces: Da Antidote.”* On it, Madlib not only scratches and samples other vocalists and sounds; he also gives us a jazz flutist playing a mellow tune—a nod, no doubt, to the legend Bobbi Humphrey. The sound isn’t smooth. The samples bump up against the rap, and each communicates a distinct message: Lootpack would not be bought or sold. On the track “The Anthem,” Madlib raps:>