Few directors write their own scores, but to capture the right feeling for his first feature — the idiosyncratic, magical realist fable “Beasts of the Southern Wild” — director Benh Zeitlin did exactly that, reteaming with composer-producer Dan Romer (they first collaborated on the score for Zeitlin’s short “Glory at Sea”).

The result is an equally idiosyncratic aural landscape that blends Cajun, pop and orchestral influences. The haunting, pulsing music perfectly complements the film’s visuals, channeling the p.o.v. of protagonist Hushpuppy, the independent 6-year-old girl who lives in the semi-mythical, waterlogged Louisiana town of Bathtub.

“I had ideas for the music before we even began shooting, and then while we edited I was writing music and composing temp tracks,” says Zeitlin. “By the time we got close to locking picture, I began working with Dan at the piano in his living room, and we’d gradually sort through all the ideas.”

Ultimately, the team kept eight main themes, with Zeitlin and Romer contributing four each.

Because of the indie film’s tight budget, “we never used a live orchestra,” says Romer. “We just recorded one player at a time at my house — one of them probably contributed 80% of the score’s music, thanks to multi-tracking violin and viola.”

Such financial constraints also added to the score’s quirkier aspects, “as we got a very raw, visceral, close-mic’ed sound that I feel actually matches the film better than if we’d been able to afford a real orchestra,” adds Zeitlin.

Along with a rare celesta keyboard (“almost impossible to find,” says Romer), the score also features Zeitlin’s favorite band, the Lost Bayou Ramblers, a Grammy-nominated group from Pilette, La., who combine heritage music with contemporary accents of rockabilly, punk and swing.

“I wanted Cajun music to be the defining cultural reference point,” Zeitlin notes, “as the score’s so wrapped up in Hushpuppy’s consciousness.”