Jan Hammer likes No. 1.

Which is exactly where his high-voltage theme song for "Miami Vice" is listed on the pop charts. And where the album sits, too -- the first TV sound track to do so since Henry Mancini's "Music From Peter Gunn" 27 years ago. That was also the last time musical textures were so crucial to a show's integrity.

"It's really wonderful," says Hammer, who finds himself at 37 both a celebrity and a chart-topper after almost two decades of trench work in the music business. "Miami Vice Theme" is his first hit single.

Unlike most television shows, "Miami Vice" puts its music in the foreground. Sound is an integral part of the show's appeal, as important as Don Johnson and Philip Michael Thomas' fashions or the stylized violence. Louder than life and obviously geared to the MTV generation, "Miami Vice" is yuppie hip.

Without Hammer's music, it wouldn't be the same.

"Producers usually not only want scorers on site, they want to look over their shoulder, they want to meddle," Hammer says. "I think that's why so much TV music sounds so bland, so prefab. This is an unprecedented move, producer Michael Mann giving me this much leeway, but it's really paying off. I'm really under no control at all. The only time we talk is if he says 'we want more, more, more music.' "

As for the music's success, Hammer says that most hit themes have been wimpy. "It's really a rock thing, which is why it stands apart from all other series themes. It's an honest-to-goodness rock thing -- driving, rude rock and roll.

"There is a good reason for it," he adds. "I was allowed to work under my own terms. . . . Here, I've been totally left alone and I can do all the things I've ever done at the same time.

"And it does seem to work."

It works because Hammer composes, performs and engineers every note of original music heard on "Miami Vice." Music coordinator Fred Lyle selects the rock songs that are also prominently featured.

Hammer was no stranger to scoring before "Miami Vice," having worked on several movies and television specials. When producer Mann first approached him about a weekly show, with new music for every episode, "I was interested; it was something I wanted to try.

"And you think, if it goes, it can be lucrative. But I had no idea it was going to turn out to be such a good show, so different. But from talking to Michael, I immediately sensed that he was onto something, that he was after a different sounding show, not just a different looking show."

Hammer's workplace, on a 150-year-old farm about an hour outside New York City, is not precisely "Vice"-like.

"Wouldn't you prefer not to leave your home, if you have a beautiful home, a beautiful family and didn't have to go anywhere?" he says. "Personally I cannot imagine a better arrangement. I have everything I need to do my work here -- a state-of-the-art 24-track automated studio. I'm in the middle of woods and meadows, I don't need to go to the city at all."

And about the show's ambience, he says, "I've done it. I've lived that life, believe me, for long years. I don't need it anymore."

The keyboard player immigrated to the United States from Czechoslovakia in 1968, just before the Russian invasion. He had formed his first group there in high school, a trio with bassist Miroslav Vitous (later a founding member of Weather Report), and Vitous and Hammer ended up with scholarships to Boston's Berklee College of Music.

Hammer started off playing in Sarah Vaughan's backing group, before turning to jazz fusion as a key member of the original Mahavishnu Orchestra. Always on the cutting edge of the synthesizer revolution, Hammer eventually drifted to rock, working with artists like Neal Schon, Al DiMeola, Mick Jagger and Jeff Beck.

Little wonder then that he has been able to suggest a variety (or sometimes a combination) of styles -- from pop to jazz to soul to calypso -- in each "Miami Vice" episode. But record companies, Hammer says, never acknowledged him as a rock musician because his early work "wasn't legitimized by radio play. I was not given the chance. No one believed I had pop potential.

"I think that's changing with this record, finally," he says. Still, Hammer hasn't had a solo contract since 1979 and seems in no hurry to find one.

To be sure, he doesn't have the kind of time he used to have, either.

"I'm totally snowed under with my own work," he says. "Last year on some shows it was as little as 17 minutes and this year, the last show I did was 26 minutes. It's usually in between . . . I'm under quite a deadline, because the postproduction has to end on one show by a certain date. I usually spend five days working on each show," which translates to an 80-hour week.

"I get two, three, sometimes four different versions on tape and as things get tighter I put the music on 3/4-inch cassette, synchronize it on my 24-track and go to it.

"I write it, play it, mix it and then ship it out.

"And I vacuum the studio at night."

He's not involved with the choice of pop songs, but Hammer says "my voice is heard on occasion, especially if there are songs that do not fit my taste, where people might mistake that for my music." And if Lyle has been deluged by record companies hoping for exposure on the series, Hammer has been deluged by offers for sound-track work. He says he's turned down more money in the last three months than he made in the previous five years.

"I had to take off for the whole summer because I was close to burnout," Hammer says. "Working on the show week after week and trying to come up with original stuff will wear you down fast."

Hammer's breakthrough will undoubtedly have an impact on the kind of music we hear on television. Already, "The Equalizer" has turned to Police drummer Stewart Copeland, and other rock scores can't be far behind.

"It's going to happen. That's the best way to approach it rather than try to reeducate old school TV composers to write more in a pop song vein. The music on 'Miami Vice' is more like snippets of pop songs -- the production values, the ideas, every one of those bits could be developed into another pop song. If you hear it as a score, it feels totally different than something written as a score. That's something that's very hard to explain, it's something that really needs to be built in, something you do naturally, as it is in my case."

Hammer is finding time to work on a new solo record, though he doesn't see it coming out until late summer. "Then I'd like to go out and do some concerts. I miss it very much." His last live work was in December 1983, with Jeff Beck, Jimmy Page and Eric Clapton at the Action Research into Multiple Sclerosis benefits.

"I'm talking with Lou Gramm of Foreigner, who is my neighbor, about doing some songs for either the show or a film or even writing some songs for his upcoming solo album." Other neighbors within a 15-minute drive include Peter Frampton and Keith Richards. "There's a lot of people who have moved this way because it's the closest you can go for total greenery outside New York."

For now, though, Hammer's got his hands full with the show and his family, wife Ivona and two daughters, ages 2 and 1, who often spend time with him in the studio.

"Obviously, if I have some valuable masters up on the machines, I cannot have them pressing buttons, but they get in here all the time. They're so sweet, they move in time to the music."