You could say Marc Shaiman bloomed late: Despite a lifelong ambition to make it as a Broadway composer, he was 42 when his musical version of "Hairspray" finally made him a big Tony-winning deal on the Great White Way. And unless you're a theater die-hard, you could be forgiven for thinking that Shaiman came from out of nowhere, or at least from Somewhere Else, when "Hairspray" became the smash hit of the 2002-03 season. After all, Shaiman's bio in the playbill lists no prior theatrical credits.

"Hairspray," based on the 1988 John Waters movie about integration coming at last to a 1962 "American Bandstand"-style TV program in Baltimore, has had its share of stars. It's fair to count Waters himself, the longtime Trashmeister of American indie pics. Then there was Harvey Fierstein doing the drag turn as Edna Turnblad, a tacky hausfrau in one of Charm City's lesser neighborhoods. Plus there was young Marissa Jaret Winokur as the chunky and progressive teen who plumps (pardon the pun) for equal rights while dancing her heart out and falling in love with the local heartthrob. Both actors won Tonys for their performances.

Yet it's easy to argue that the show's biggest star is Shaiman, whose ebullient score is far too accomplished to be rookie stuff. His pastiche of 1960s sounds is slick in the best sense: melodically direct, harmonically fascinating, effortlessly infectious. The show continues to do top-notch business almost three years into its New York run, and the national tour has just opened at the Kennedy Center.

It's no real surprise, then, that Marc Shaiman truly made it in showbiz a long time ago, even if not always as a composer. You may not recognize his name, but if you've hummed "Blame Canada" from "South Park: Bigger, Longer & Uncut," cringed at the Sweeney Sisters bits on "Saturday Night Live," tapped your foot to the rousing numbers in "Sister Act," got misty when Bette Midler sang "One for My Baby (and One More for the Road)" as Johnny Carson's last guest on "The Tonight Show," or laughed with the world at Billy Crystal's song parodies kicking off an Academy Awards telecast, then you know arranger/producer/composer/musical supervisor Marc Shaiman.

"It's a lot of behind-the-scenes work," Shaiman, 45, says with a shrug. He's reclining on a couch in the heavily equipped music studio in his Chelsea apartment, and behind him are posters of "When Harry Met Sally," "City Slickers," "The Addams Family" and "A Few Good Men" -- movies he has scored, written songs for, music-directed or arranged.

"Just the hits," says the composer, whose spin on his lucrative Hollywood years is less than upbeat. "There are 45 or 46 more posters somewhere else."

There are also houses somewhere else -- one in Los Angeles (Laurel Canyon, to be exact) and one in the Hamptons. These are shared with Scott Wittman, Shaiman's partner since 1979; Wittman is a lyricist and theater director who is too busy to tag along with Shaiman in Los Angeles the way he used to. The Chelsea place, Shaiman and Wittman are proud to say, has just been redesigned with a 1970s vibe, and it's, well, a gas. (It has been photographed for Elle Decor; the results are slated for the September issue.) Shaiman leads a tour that includes the immaculate master bedroom, spacious and high-ceilinged, in tasteful shades of gray with a few trophies on bookshelves.

"Matthew Broderick says it looks like the inside of a Tony Award," Shaiman reports. ("The Brodericks," as Wittman refers to Broderick and wife Sarah Jessica Parker, circulate through Wittman and Shaiman's conversations like hors d'oeuvres at a cocktail party. It's casually mentioned that the two couples recently vacationed together and that when Shaiman and Wittman were nominated for a Tony for "Hairspray," Parker and Broderick optimistically arranged to present the award for best score.)

The studio is a semi-organized mess, with a bulletin board propped up on the floor outlining the new Martin Short project that Shaiman and Wittman are working on. It's a spoof of one-man shows called "If I'd Saved, I Wouldn't Be Here," and it's scheduled for Broadway this coming season.

They are also collaborating on a musical version of the Steven Spielberg film "Catch Me If You Can," for which Terrence McNally is writing the book. Shaiman is antsy to get started: "I'm dyin'," he says. After all, if he had his way, "I'd want to be just like Rodgers and Hammerstein were. You know, just writing shows one after another. I feel like I have 'em in me."

Wittman, the calm half of the partnership, says he reminds Shaiman that "Catch Me" must wait: McNally's busy working on a play, and they have to get Short's piece ready. (Wittman describes himself as an East Coast guy, a "theater guy," but he looks pure Malibu: tanned and trim in ripped jeans and a thin white shirt unbuttoned almost to the navel, with the beach effect magnified by the apartment's bright, ultra-mod living room. The walls, the leather couch, the padded bar, the baby grand piano beside a smoked mirror, the remote-controlled shades over the wide bank of windows are all white. According to Wittman, "Matthew Broderick says it's like being inside an iPod.") "I feel it's all in measured time," Wittman concludes of their schedule.

But it's hard to blame Shaiman for wanting to seize the momentum. He's been knocking on Broadway's door since he was a teenager. He was an oddity as a kid in New Jersey -- "freak" is the word he uses -- because he was a piano prodigy, even with no significant musical influences in the house.

"Totally a God-given talent," he says with as much self-deprecation as a statement like that can hold. (It's as if he'd just said, "Dumb luck.") At an early age he got involved in community theater, where a director made him her musical director -- "even though I was 13 with braces and pimples. People would look at her like, 'Are you insane?' And she'd look at me and say, 'Play something for 'em.' "

One of the questions raised by the high polish of the "Hairspray" score (which, even though it's a collection of fizzy pop songs, rewards repeated listenings) is how Shaiman learned his craft. The answer begins with those community theater musicals. In conjunction with cast recordings, Shaiman studied the orchestral scores he was given the way other teenage boys scrutinized baseball stats or comics collections. He was absorbed by the role of the flute, the connotations of the trombone, the character and quality of particular chords and instrumental groupings. The minutiae fascinated him.

"That," he says, "was high school, college, everything for me, having that music in front of me, listening to cast albums."

By 16 he was regularly trekking to New York, meeting friends, playing weekend gigs. His parents didn't object.

Shaiman says, "It was as clear to them as it was to me that normal high school held nothing for me anymore."

He played piano for a comedy revue, but quickly found he didn't enjoy performing for downtown drunks. Luckily, he landed work as a music director and arranger for a group of female backup singers working on their act. The group was the Harlettes; the star they backed was Bette Midler. She was gearing up for a tour and when she asked her pickup band to play "No Jestering," a song she'd recorded, it couldn't. Shaiman, who adored Midler perhaps more than he adored Broadway, could. Not even 20, he became her music director and arranger.

Paradise. But.

"There is perhaps a bad side to your ultimate dream coming true right away," says Shaiman, who pleads guilty to chronic gloominess and pessimism. "But you'll have to talk to a psychiatrist about that, whether it affected me or not. I don't know."

He makes a sweeping melodramatic gesture: "What's left?" he says with mock tragedy. "I mean, I did what I wanted to do. But luckily through all that I was exposed to so much more, and doing the girls' act exposed me finally to the joys of arranging, taking a song and figuring out how to harmonize it, and what the groove should be. . . . So I became an arranger for a billion cabaret acts, started meeting great performers. That first group of friends all had other friends, and I became this little sun among all these singing planets. I was in the middle of them all, playing for everyone's act."

This was in an East Village scene with "people who were too theatrical for rock-and-roll and too rock-and-roll for theater." With other writers, Wittman among them, Shaiman rapidly cranked out five musicals that seem to have been as frisky and impudent as the scene that begat them. The stories dealt with homeless characters, hookers and street people, so years later, when musicals such as "Rent" and "The Life" made it to Broadway, Shaiman and friends could only watch with envy. As he worked on his musicals in the early 1980s, he couldn't even endure the ads for the original production of "Little Shop of Horrors." That was what he was trying to do, and someone else was getting it done.

Says Shaiman, "Once again ahead of our time, one of our stories was about Siamese twins." ("Side Show," a Henry Krieger-Bill Russell musical about conjoined twins, had a run on Broadway in the 1997-98 season.) "But one actress played both girls, with half of her costume being one girl, and then she would turn and do the other. So there we were years later going, 'There's a musical on Broadway about Siamese twins!' But ours was much funnier. One twin kills the other, which when portrayed by one woman is quite funny to watch," he says dryly.

"And yet even in that, the twins had a beautiful haunting song we wrote for her -- for them -- what's going on in both their minds. So we were really writing what we thought was good stuff."

Broadway didn't care. But "Saturday Night Live" got interested, and in the mid-'80s Shaiman landed a gig writing and appearing as Skip St. Thomas, arranger and pianist for the abominably saccharine Sweeney Sisters (played by Jan Hooks and Nora Dunn). He also got work underscoring Billy Crystal specials for HBO.

"And it was at that point that we were all very frustrated" with theater, he says. "We started getting frustrated with each other, also. . . . And then suddenly Bette Midler and Billy Crystal were both working on movies where they needed musical help."

The movies were "Beaches" and "When Harry Met Sally."

Says Shaiman, "Both those records and movies became huge hits for them, and my film career just really fell in my lap."

The good news about scoring movies was that it paid well and was so demanding it cleaned up Shaiman's marijuana habit. "It's my own version of recovery," he deadpans. "Get a career scoring movies." The bad news was it took all his time, put stress on his relationship with Wittman, who had no comparable West Coast career going on, and often involved bad movies and mechanical musicianship -- getting the right note to coincide with the opening of a door, etc. "It was like quicksand," Shaiman says. "It just completely takes over your life."

Still, good things were happening. He earned five Academy Award nominations in seven years for his film songs and scores and became part of television history when he arranged and played Midler's emotionally perfect sendoff to Carson, a slightly tweaked rendition of "One for My Baby" that was Shaiman's brainchild. He was also part of the inner circle that formulated Crystal's Oscar medleys, using his own ideas and hammering other writers' jokes into solid musical shape.

But Shaiman says his reward for years of the Hollywood grind was at last getting to do it all -- compose, write lyrics, even sing -- for "South Park." As he talks, his dog, a golden retriever named Walli, chews to bits a "South Park" doll that occasionally declares, "Shut up befo' I pimp-slap yo' behind."

And there you begin to see the through-line of Shaiman's career, from the low camp of his East Village forays to the high camp of the Divine Miss M, the gleeful anarchy of "Saturday Night Live" and the "South Park" guys, the showbiz savvy of Crystal, Short and mainstream Hollywood, and finally the John Waters material that landed him on Broadway. Shaiman is an intuitive entertainer.

Which raises the question: Is "Hairspray" what Shaiman really sounds like? "I'm a jack of all trades, master of none, and I've known that since the beginning of my career," he says. "I don't have a specific sound. What I am is a sponge. I can really join in very well, I think, with all that has come before, and then I can put it back out there with . . . maybe my own something, a sense of . . . I don't know."

The Shaiman je ne sais quoi is certainly all over "Hairspray," which was a charmed production from out-of-town tryouts to opening night on Broadway to the kiss that Shaiman and Wittman shared at the lectern at the Tony Awards. (Shaiman remembers it as "the kiss of a couple that something great had just happened to.")

He describes himself as the engine that helped drive the creative process of "Hairspray" -- "I wasn't going to let it go," he says -- but adds that he never lost his anxiety, never felt secure that it was really going to work. "Being a Jew, I don't think that ever happens," he says. "And being myself, I know it never happens. . . . And I'm not Chicken Little. I have seen the sky fall on so many projects."

But the "Hairspray" score is so effervescent . . .

"Maybe that's part of it. Maybe I'm effervescent when I go to the piano -- and I am, I am full of joy at the piano. Writing songs, writing funny songs, sweet songs, whatever it is -- that is so joyous for me. So maybe that's where all my glass-half-full personality traits come out, depleting me so that I walk away from the piano like . . . " He illustrates by staggering around as if spent.

"The dark and gloomy part?" Wittman says with a laugh. "I know that person." ("Different coasts" is Wittman's first explanation for the durability of their relationship.) "But I think any artist is kind of like that. You have to have the dark and gloomy to get to the funny. I think humor comes from a very dark, deep place."

Like, say, the stomach. It's late afternoon, Shaiman hasn't had lunch, and he's getting weary of having his picture taken. As he poses at the piano, looking over his shoulder, grinning like Jimmy Durante, his hands start bouncing along the keys, plinking out a jaunty melody, the kind you'd hear in the 35th hour of a telethon as the pianist tries in vain to keep the entertainers' spirits up. The lyrics he improvises are profane:

"Take the [bleeping] picture already," he sings cheerfully, but with teeth.

The room breaks up. It's the sort of thing you can pull off flawlessly if you've spent a career at the piano cracking jokes with some of the funniest people in showbiz.

If, in other words, you're Marc Shaiman.

Marc Shaiman insists he's "a jack of all trades, master of none," but his Tony-winning triumph with "Hairspray," now at the Kennedy Center, indicates otherwise.Making beautiful music together: Marc Shaiman, right, with partner Scott Wittman in their New York apartment. Marissa Jaret Winokur's performance as determined teen Tracy Turnblad helped cement "Hairspray's" place in the hearts of audiences and critics. Lyricist Wittman and composer Shaiman seal their "Hairspray" win for best original score with a kiss during the 2003 Tony Awards.Shaiman is flanked by "South Park's" Trey Parker, left, and Matt Stone at the 2000 Oscars. Shaiman and Parker's "Blame Canada" was up for Best Song.