"When stuff is coming to an end, people freak out and they act crazy," says Liz Lemon.Liz and all the characters of 30 Rock are doing just that on the series finale (airing at 7 p.m. Thursday on NBC) as they produce one last installment of their show-within-that-show, TGS, while anticipating life apart from each other.But Jeff Richmond wasn't freaking out, not even with the end (and a tight deadline) breathing down his neck: Just last Friday he was in a studio in midtown Manhattan, closeted with an eight-piece string ensemble, his baton raised, recording interludes of background music for that final episode.After seven seasons (plus 14 Emmys, six Golden Globes and a Peabody Award), there are many reasons to remember 30 Rock fondly.But Richmond -- an unseen, unsung hero of 30 Rock -- has been essential, too, for his service as the composer and arranger of the show's distinctive score (in addition to his duties as executive producer and, by the way, Fey's husband of 12 years).At the show's inception, Richmond composed the 30 Rock theme song, which, in its tight 17 seconds, teems with cultural references and preparation for the show it introduces.For fans of 30 Rock, that theme by now seems second-nature.But every week since the show debuted in fall 2006, Richmond has fashioned the background music that sonically frames the madcap action."The writers do such a great job creating these intricate stories," he said. "The music helps clue the audience in to the recurring patterns and themes."Thus is the music Richmond conjures a guide and an organizing principle.On Friday, Richmond was presiding at a major scoring session for the hourlong finale at John Kilgore Sound & Recording."I'm tired of writing goodbye music for all the characters," Richmond said with a laugh.For instance: The show's "Liz" theme -- a bouncy, familiar tune heard since the very first episode that was often arranged with a Scott Joplin lilt -- here was reimagined as lush and sentimental.With Richmond busy in the studio, Kilgore was in the control room piloting software that resembled a souped-up version of GarageBand while 30 Rock music producer Giancarlo Vulcano logged the progress on a laptop and old-fashioned sheet music.Next to be recorded was a piece that sounded like a mash-up of Aaron Copland and Leonard Bernstein, Hoedown meets On the Town."Jeff, I like that take," said Vulcano at one point. "But it should be, almost, ethereal, yeah?""This is Jack's big happy montage," agreed Richmond. "He's finally happy. He's finally killing it!" Richmond addressed his musicians: "You ever see that movie The Natural? Like, when Robert Redford hits that ball up in the air?"What's next for Richmond? Maybe a collaboration with Fey on a Broadway musical version of her 2004 film Mean Girls, he said. Maybe scoring a movie. "I'm open for anything."