Words bob and weave to the tones of a solitary trumpet — a slow and sultry duet between spoken poetry and spare, classic jazz.

Within moments, though — as Richard Montoya and Gilbert Castellanos navigate the introductory passages of “Federal Jazz Project” at a San Diego Rep rehearsal — the performer-playwright and the musician are blowing the joint wide open.

Castellanos’ jazz sextet is locked into an up-tempo groove, while Montoya is bouncing and whooping, a cigarette jitterbugging on his lip.

From his table at the edge of the action, director Sam Woodhouse keeps time with his toes, chiming in with the occasional, improv’d sound cue.

On the level of pure story, the sprawling, impressionistic “Federal Jazz Project” is about a mythologized meeting of cross-national cultures over a span of decades, personified by a pair of sizzling female dancers named San Diego and Tijuana.

But just as important, the world-premiere show’s creators say, it’s about finding harmony between two distinct forms of art: the meticulously crafted and rehearsed discipline of theater and the generally more freewheeling, improv-driven world of jazz.

“That’s what we’ve been working on since the beginning,” Montoya says. “That tricky business of writing text and music so it blends kind of seamlessly.

“In the theater world, we have to be a little bit anal. There’s repetition. It’s just not the coolest time of your life. There have got to be pages, there’s got to be that structure.

“But what inspired this whole thing was the looseness of the late-night speak-easies where I first saw Gil playing with military cats (in the 1990s). It just impressed the hell out of me. It reminded me of my own dad’s love of jazz.”

When Montoya — a veteran of three decades’ worth of daring shows as a co-founder of the Chicano performance trio Culture Clash — calls this new piece “outside the comfort zone,” Castellanos nods in recognition.

“I feel the same way,” says the longtime local bandleader and jazz eminence. “I’m used to just going onstage, doing my thing, and getting off the stage. To do something on this level is definitely an eye-opening experience for me.

“To be honest, it’s kickin’ my butt. I didn’t know we’d be doing so much work. A couple of weeks ago I was like, ‘Oh, we’re not going to need any rehearsal time with the band.’ And a couple of days ago, I was like — and here, Castellanos affects a pleading voice: “ ‘Sam, could we get some rehearsal time?’ ”

Rivers of time

Even Woodhouse, who has been directing and producing new works at the Rep for nearly four decades, calls the “Jazz Project” a drama all its own.

Staging a new, boundary-flouting piece like this “is very unpredictable; it can be unsettling, because you may be trying to say something you can’t even articulate,” he says. “And the muse needs to be fully fed and embraced.

“Having a jazz band center-stage for the entire piece is dramatically different than everything else (we’ve done). And (the artists) don’t know everything that’s going to happen, either.”