“Patti Cake$” advances the increasingly endangered idea that in the cross-cultural ferment of America, you can be anything you want.

Even if you’re not American. That’s implicit in the casting of its lead role — Australian Danielle Macdonald plays Patti, a zaftig, blue-collar North Jersey teen named Patricia Dombrowski who wants to be a rapper. She calls herself White Trish, then Patti Cake$ (so named by her grandmother, played by Cathy Moriarity).

I like White Trish better, but the point is, she’s played with impressive authenticity by Macdonald, whose Noit Joisey accent is usually spot-on. This is astonishing at a time when there is an epidemic of European and Australian actors butchering regional American accents — I’m looking at you, Daniel Craig, in “Logan Lucky.”

Surely, it helps that director Geremy Jasper (making the jump from music videos) is a native of Hillsdale, the Bergen County town where he grew up writing rap lyrics — he penned all of the songs in the movie — for songs he was too embarrassed to perform publicly. In “Patti Cake$,” he off-loads the task on Macdonald, whose character has none of his shyness.

Patti’s nerve is her best feature, but not her only attribute. She’s a resilient young lady who lives in a messy home with a single mother (Bridget Everett) whose own dreams of being a rock star died about the same time as Big Hair and who now spends her time belittling her daughter’s ambitions and her music.

Patti perseveres — she tends bar at a dive, works for a catering outfit, writes lyrics, battles other would-be hip-hop artists on the street corner, shows up at open-mic nights. At one of these, she spots a young African-American man (Mamoudou Athie) performing metal-ish punk to an unappreciative audience — Patti senses an independent-minded soul mate, one with a mixing board. (Athie’s otherworldly presence made me think of Joe Morton in “Brother From Another Planet,” and “Cake$” has some of that North Jersey, John Sayles vibe.)

She and her “manager” (Siddharth Dhananjay) now have all the ingredients of their own hip-hip act, with input from Grandma, and perhaps another secret ingredient.

For that, director Jasper makes us wait until the climactic scene — Patti’s taking the stage in a rap contest, facing other performers and a hostile crowd. Here, the movie’s themes of inclusiveness bump against the racial and gender norms of hip-hop in ways that both challenge and recognize the cultural reach of the music.

“Patti Cake$,” in the end, is a little pat, but it doesn’t take its underdog, band-of-misfits formula too far, and Macdonald’s infectious grit carries the day.

MOVIE REVIEW

“Patti Cake$”

Grade: B

Starring Danielle Macdonald, Mamoudou Athie and Bridget Everett. Directed by Geremy Jasper.

Rated R for language. Check listings for theaters. 1 hour, 48 minutes.

Bottom line: A film that challenges and recognizes the cultural reach of music