In “Whiplash,” the promising feature debut of writer-director Damien Chazelle, J.K. Simmons plays a music professor named Fletcher, a tightly coiled martinet who joins a long line of cinematic drill sergeants, football coaches, prison bulls and dysfunctional fathers as a towering patriarchal figure who breaks down an impressionable young man, the better to build him back up.

The young man in this movie is Andrew, a freshman jazz drummer at a prestigious, hyper-competitive music school in Manhattan, who nurses dreams of being the next Buddy Rich. In Miles Teller’s sensitive portrayal, Andrew emerges as a damaged kid whose soulfulness belies deep-seated ambition. “Whiplash” opens with a slow-building drumroll, the camera traveling down a narrow corridor to reveal Andrew feverishly bashing away, coming to an abrupt end when he sees Fletcher in the doorway. “Why did you stop?” the older man barks, beginning a borderline sadistic Socratic dialogue that continues throughout a movie that could have been subtitled “Mr. Holland’s Sourpuss.”

Not that there aren’t moments of lyricism and beauty in “Whiplash,” including the film’s gorgeous title tune and a scorching version of “Caravan,” played by the college jazz ensemble that Fletcher conducts with abusive, profane authority. At its best, “Whiplash” conveys with pungent detail the striving of young people eager to make their bones in a Manhattan that’s as foul and forbidding as it is seductive. The rehearsal room where much of “Whiplash” transpires isn’t an Eden of harmony and collaboration, but a snake pit where every high note is awash in flop sweat and spit, blisters and blood.

“Whiplash” plunges viewers right into that milieu, offering brief respites of tenderness when Andrew courts a pretty girl (Melissa Benoist) or catches a vintage movie with his kind but skeptical father (Paul Reiser). Fletcher, on the other hand, receives no such latitude from the filmmaker, who portrays him as a seething, snarling taskmaster with perfect pitch, who somehow thinks that yelling obscenities and ethnic slurs — and driving his players to the point of physical injury — is a surefire way to find the next Louis Armstrong. He’s tough love without the love, and Simmons plays him with merciless focus and commitment, the blue vein on his aggressively hairless head popping out every time a hapless player flubs a note.

The dynamic between Fletcher and Andrew makes for highly pitched drama, which strains for credibility during two climactic scenes: For a single-minded narcissist who refers to the college ensemble as “my band,” Fletcher engages in acts of passive-aggressive sabotage that don’t really jibe with his overweening professional pride. “Whiplash” manages to both celebrate and question youthful drive and confidence, and Chazelle lends a “Rocky”-like sense of high stakes and punishing self-discipline to the easily romanticized world of music. But the film’s final scene, while pulse-quickening, feels unmoving, not just because it’s far too pat and sentimentalized, but because it plays into Fletcher’s most self-righteous, distorted notions of his own genius. Ultimately, the ideal of making beautiful music together looks more like a petty cockfight between two singular, raging egos.

★ ★ ½

R. At area theaters. Contains strong profanity, including some sexual references. 106 minutes.