Is rock the new rap? Not since the early days of the Beastie Boys and De La Soul has the hip-hop community acknowledged music's Caucasian past as much as it's doing now. From Timbaland to the various DJs who are combining Jay-Z vocals with Beatles, Metallica, and even Weezer samples, producers and DJs seem ever more fascinated with guitars and classic-rock albums, as if elements of both will add splendor and splash to their beats. (Plus, what's cooler than aligning oneself with an underground scene, which is what much of rock has become?) And then there's N.E.R.D., the side project of Pharrell Williams and Chad Hugo, who, as the Neptunes, made their reps and bank accounts by creating minimalist booty shakers for Jay-Z, Britney, and anyone else who would pay them. If rock is rap's new sonic sandbox, then N.E.R.D.'s crazy-strange second album, Fly or Die, makes them the unlikely heirs to, of all people, Steely Dan.
The band's first album, 2002's ''In Search of...,'' was a genuine head turner, a collection of snide, rowdy hard-rock funk that was the last thing one would have expected from the men who produced ''Shake Ya Ass'' and ''I'm a Slave 4 U.'' ''Fly or Die'' is craftier and more multilayered than its predecessor. In the vein of ''Aja'' or ''Katy Lied,'' N.E.R.D.'s album is a set of clever, complex, studio-crafted pop -- complete with musicianly, smooth-jazz licks -- that doesn't owe allegiance to any one genre. Instead of Walter Becker and Donald Fagen's references to boho jazz and jaded L.A. cool, N.E.R.D. incorporate rock, soul, rap, and their own version of hip-hip cool. Williams, Hugo, and the third N.E.R.D., rapper Shae Haley, aren't afraid, as the title song shows, to thrash a melody one minute, caress it with suave harmonies the next, toss in fusion jazz piano, and set it all to beats (with real drums) that truly swing. The results are many Dan-centric moments: the wonderfully goopy ''Chariot of Fire,'' the jubilant ''The Way She Dances,'' the beach-stroll pop of ''Wonderful Place,'' which recalls Fagen's sarcastic solo hit ''I.G.Y. (What a Beautiful World).''
Wedded to these spry, lively tracks are lyrics that, like Becker and Fagen's, are cheeky, enigmatic, or downright dark. The wayward title character in ''Fly or Die'' is headed for the skids. N.E.R.D. are surely the only hip-hop-based act to rhyme ''war'' with ''Barnes & Noble store,'' as they do in the bubblegum R&B of the combat-dodger story-song ''Drill Sergeant.'' (As the bookstore reference proves, they really are nerds.) Williams' scrawny, piercing falsetto -- he comes across as the less talented but eager son of Curtis Mayfield -- is the perfect complement for these songs. Whether putting the moves on one prospect (''Backseat Love'') or coolly wooing the one woman who won't give him the time of day or night (''Don't Worry About It''), Williams conveys an implacable lounge-lizard unctuousness that is, again, very Steely Dan.
''The Neptunes Presents... Clones,'' the album Williams and Hugo released last year, aimed for a similar range. But its hodgepodge of rhymers and singers, and its tracks that alternated between club rap and cartoonish punk, lent it the feel of a compilation rather than a cohesive project. In a sign of how much things have subtly changed in hip-hop, the duo sound looser, more alive, rocking out on ''Fly or Die.'' The album has its weak spots -- tracks that resemble ''In Search of...'' outtakes (''Thrasher'') or attempts at second-rate Lenny Kravitz anthems with Kravitz himself participating (''Maybe''). But all is redeemed on a number like ''Jump.'' At first, the narrator appears to be a runaway phoning home. It soon becomes clear, though, that he's a troubled kid on the verge of suicide who's calling his parents to bid them one last farewell. In a bit of dark humor, the shouted chorus -- ''Jump! Jump!'' -- is both a nod to rap cliches and a sardonic simulation of the crowd egging on the would-be suicide. Becker and Fagen should be proud -- or, at least, jealous. The Dan's recent reunion albums have been heavy on aural sheen and attitude, light on melody. But on ''Fly or Die,'' there is, to paraphrase Becker and Fagen, barely any static at all.