Summit Entertainment is smart to put a trailer for “New Moon” (the “Twilight” sequel) in front of “Bandslam,” knowing it will bring in fanatical teenagers who might have otherwise ignored this buzz-deficient movie. And if those young ladies stay past the trailers, they’ll find that “Bandslam” is actually worth their time, a spry teen melodrama whose refusal to pander to its audience is refreshing.

Will Burton (Gaelan Connell), who looks like a nerdier Shia LaBeouf, has just moved to Lodi, N.J., with his mom (Lisa Kudrow), and is dismayed to find that high school here is just like it was in Cincinnati, the only difference being that the bullies here don’t know about him yet. His love of old-school indie rock makes him different. His frequent fan letters to David Bowie (which serve as the film’s diary-like narration) are a little odd, too.

But he’s soon befriended by Sam (Vanessa Hudgens), who spells her name “Sa5m” (the five is silent) and is a fellow outcast due to her cynical, emotionless speech and fondness for reading books. She’s the type of sullen girl who doesn’t like anything popular and dismisses all her fellow teens as idiots — a departure for the perky, baby-voiced “High School Musical” star, but Hudgens isn’t bad in the role, especially as the character warms up later in the film.

Sam and Will are bound for romance, it would seem, but there is a detour as Will meets Charlotte (Aly Michalka), a popular former cheerleader who wants Will to manage her band. A regional competition called Bandslam is on the horizon, and Charlotte wants to challenge the school’s perennial favorite, Glory Dogs, not least because its lead singer (Scott Porter) is her ex-boyfriend. The new band she’s fronting lacks not just a manager but a drummer and a name. It has her, though, purring through a Cheap Trick cover in that vowel-killing style (“I want yo to want may/I nade yo to nade may”) so big with the pop singers these days. Under Will’s guidance — the kid actually knows a lot about harmonies and instrumentation — they add a drummer, a keyboardist, some horns, and a cello. (Does a rock band have room for all that? Well, sure. There’s always room for cello.)

There is a rivalry between Sam and Charlotte, though not a romantic one — Charlotte is clearly only interested in Will as a friend and band manager. What Sam doesn’t trust is Charlotte’s motives. Up until last year, Sam claims, Charlotte was a “mean girl,” and she doesn’t believe she’s reformed. But in high school, as in real life, your past eventually catches up with you. That proves true for Will, too, and his endearing, protective mom.

The director is Todd Graff, who made a splash several years ago with “Camp,” another teen-oriented, music-centered film about misfits. (He and Josh A. Cagan share a screenplay credit for “Bandslam.”) As before, Graff endeavors to make something smarter than the usual adolescent-targeted claptrap, notably in his emphasis on vintage rock (Bowie, Velvet Underground, etc.) rather than the modern pop tunes that would customarily appear on the soundtrack. He’s not afraid to have Will make a pilgrimage to New York’s boarded-up CBGB — “The birthplace of punk!” — even though many audience members won’t know what that is or how it influenced the bands on their iPods.

Graff keeps things fairly realistic, generally avoiding glossy wish-fulfillment in favor of a richer, more down-to-earth story. He captures the reality of MySpace pages and viral videos pretty well, and the creative liberties he does take (including the standard “we’re performing this song perfectly even though we’ve never played it before” routine) are all in the spirit of fun. The film hits a few wrong notes here and there, mostly in the soggy, underdeveloped Will-Sam romance, but it executes everything with a “School of Rock”-style joyfulness. What it lacks in star power it makes up for in sincerity.

B- (1 hr., 51 min.; PG, mild thematic elements, a little very mild profanity.)