“Whiplash” is about a demanding teacher trying to coax greatness out of a student, yet it couldn’t be further from the saccharine exploits of Mr. Holland, Mr. Dead Poets, and the countless other educators who have inspired their pupils and moved audiences to tears. For one thing, the teacher in this instance is abusive well beyond the acceptable limits of “tough love,” more like a drill sergeant than a mentor. For another thing, instead of gently reminding us that we mustn’t let pursuing our dreams hinder our personal relationships or prevent us from having functional everyday lives, the film suggests the only way to realize some goals is to ditch everything else.

Basically, you can be a world-class jazz drummer, or you can be a well-adjusted member of society, but you can’t be both. Not the sort of message you usually get in these movies.

This unusually unromantic approach to music education is one of many noteworthy things about “Whiplash,” a funny, exhilarating drama — bordering on psychological thriller — that was written and directed by Damien Chazelle as an expansion of his Sundance-winning short. (Chazelle also wrote “Grand Piano,” a far sillier but still very intense story of musical proficiency.) Our almost-prodigy is Andrew (the increasingly impressive Miles Teller), a freshman drummer at a New York music conservatory who idolizes Charlie Parker and dreams of reaching that level of jazz excellence. But he has other interests too, like seeing old movies with his dad (Paul Reiser) and making eyes at the pretty girl (Melissa Benoist) behind the concessions counter.

Andrew catches the attention of Terence Fletcher (J.K. Simmons), his school’s legendarily fearsome jazz chair and leader of its competitive jazz ensemble. Among students, Fletcher is spoken of with awe and reverence, the ever-present “he” and “him” in their conversations. He runs his band with military precision, including the use of vulgar epithets and mean personal insults (homophobic, anti-semitic, whatever), and demands excellence from every member. Andrew is elated when Fletcher gives him a shot as alternate drummer in the group, determined to prove himself worthy by fulfilling every assignment with exactness. (The film is named after the treacherous jazz composition Andrew must learn.)

Thus begins an educational experience consisting of mind games and emotional brutality more than pedagogical instruction. If Andrew doesn’t strike exactly the right tempo — and the untrained ear will not hear a difference between “rushing” and “dragging” it — Fletcher will shout obscenities and make him start over. A trumpet player who’s off pitch is humiliated and dismissed. Alternates are pitted against one another in order to strike fear in the hearts of the leads, lest they be replaced. Everyone Fletcher deals with is talented; what he’s looking for are the musicians who aren’t just skilled but devoted enough to endure his tyranny and possibly become true masters. None of this “positive reinforcement” nonsense, no “hey, that wasn’t perfect, but don’t worry, keep tryin’!” If it’s not flawless, it’s worthless. Fletcher’s philosophy: “There are no two words in the English language more harmful than ‘good job.'”

Fletcher’s verbal abuses are hilarious at first, the great J.K. Simmons delivering his often poetic profanities with flair, though over time it becomes little more than “Not my f***in’ tempo!” and “F*** you!” It’s worth noting that Andrew is no slouch in the attitude department himself, the sort of bold young man who will return fire when fired upon. He has to be broken down and humbled by Fletcher, but in the end Fletcher needs some tuning-up as well. The teacher becomes the student, and all that.

But crucially, while “Whiplash” isn’t a syrupy “Mr. Holland’s Opus,” it’s not a raunchy “Bad Teacher” or “Role Models,” either. (Not that there’s anything wrong with being “Role Models”!) Fletcher’s eyebrow-raising methods do indeed raise eyebrows within the story (just as you’d expect them to at a real school), and we wince when he crosses the line from mean-funny to mean-hateful. Part of the film’s allure is that even as we cheer Andrew’s incremental successes, we’re not sure we approve of the way he’s achieving him. We’re not even sure we support the ends, let alone the means. His goal — and Fletcher’s goal for him — is to be a hall-of-fame drummer no matter what the personal costs are, even if it means flaming out and dying young like Charlie Parker did. It was bold of Chazelle to put all of this out there without passing judgment on what the “right” answers are, and it makes the film that much more compelling.

A significant chunk of the film consists of explosive rehearsals and performances, all of which appear to this non-drummer to have been convincingly faked. Chazelle and editor Tom Cross present these sequences with nerve-wracking intensity, cutting back and forth from the drums to Teller’s face to Simmons’ face, musician and conductor battling one another as we hold our breath and watch. The movie’s onstage finale is a stunningly edited piece of work in its own right, practically guaranteed to send you out of the theater on an adrenaline high. You may also feel particularly grateful that you never considered becoming a drummer.

B+ (1 hr., 45 min.; R, pervasive harsh profanity.)

Originally published at Film.com.