WITH HIS fancy clothes, eyeglasses, ornately shaped mustache and pompadour, Emmet Ray (Sean Penn) suggests a ridiculous human peacock.

But in Woody Allen's sweetly amusing "Sweet and Lowdown," this strange bird also happens to be a fantastic jazz guitarist -- second only to Django Reinhardt.

That's the problem. He's so intimidated by Reinhardt, he has fainted twice in the jazz legend's presence, knowing he'll never reach that top position. Nonetheless, he's going to get drunk trying.

Drinking isn't Emmet's only weakness. He's also big on women and rats. Yes, Emmet's idea of a good time -- when not playing guitar or strutting around with his latest female conquest -- is going to the dump with his revolver and plugging rodents.

Sometimes he takes a broad to the dump. When one floozy complains she did not appreciate being dragged to the garbage heap to watch his favorite pastime, Emmet retorts: "Why not? We brought sandwiches."

There was no Emmet Ray. But "Sweet and Lowdown," set during the 1930s and inspired by a composite of real jazz musicians, makes it seem as if there were.

Allen, a well-known jazz aficionado, creates an effortlessly assured world of oldtime roadhouses and nightclubs. He has also compiled a powerful soundtrack featuring music of the era, as well as covers of standards by Howard Alden (who doubles for Penn) and Bucky Pizzarelli.

He further accentuates the sense of verisimilitude with a "mockumentary" lineup of jazz historians and music experts, including himself, Nat Hentoff and Ben Duncan, who relate their apocryphal Emmet Ray stories.

What we get is an engaging mixture of period authenticity and sheer fun, as we follow the fictitious ups and downs of Emmet, who's torn between two impulses: his obsession to outplay Reinhardt and his love for Hattie (Samantha Morton), the only woman to steal his rakish heart.

Hattie, an angelic, mute laundress who's modeled on the Gelsomina character in Federico Fellini's "La Strada," is definitely the one for Emmet. He gets a sense of this immediately because she doesn't struggle when he tears off her clothes. The other girls, well, they usually fight him off at first.

Unfortunately, Emmet can't reconcile his growing affection for Hattie with his musical ambition and desire for romantic freedom.

Instead, he opts for a future with Blanche (Uma Thurman), a slumming socialite who seems more fascinated with Emmet's world than the musician himself. It's just a matter of time before Emmet realizes his mistake.

Penn's performance is the movie's ultimate grace note. As funny and ingenious as Allen's films can get, they are rarely known for depth of character. But Penn augments Emmet with a delicious combination of innocence, Panlike mischief and edginess.

"If you let your insides get to you, you're finished," he says, referring to his inability to face the various demons picking at his soul.

At one point, Emmet gets the crazy notion to make his stage entrance on a pulley-operated yellow moon. An oversize, extremely unwieldy stage prop, it threatens to come crashing down at any minute.

Emmet is determined to make it happen anyway. But realizing how risky the maneuver is going to be, he starts drinking and drinking. When it's time to mount that moon, Emmet is completely fried. And there have been few moments funnier in the movies this year than the spectacle of Emmet trying to maintain his balance and dignity on that rickety moon, as he swoops towards the dizzying stage.

SWEET AND LOWDOWN (PG-13, 95 minutes) -- Contains sexual situations and strong language. At the Cineplex Outer Circle 2 and Shirlington 7.