Anyone familiar with the career of John Scofield - the master jazz guitarist who has played with luminaries from Miles Davis to George Duke to Grateful Dead bassist Phil Lesh - would probably be surprised to find the six-string virtuoso picking the famously lunkheaded riff from the classic-rock staple "Louie, Louie." But that's the kind of cheeky, genre-tweaking fun that happens when any musician spends time jamming with Medeski, Martin & Wood.

The jazz/jam/funk/rock trio teams with Scofield for the fourth time on Juice, the newly released album on the band's own Indirecto Records label. Although MMW (keyboardist John Medeski, drummer/percussionist Billy Martin, and bassist Chris Wood) have invited countless other musicians into their ranks over their 23-year career, their partnership with Scofield is the only one to merit inserting a fourth initial into the trio's acronymic nickname. MSMW will reteam at Union Transfer on Friday night.

"We have a certain chemistry that's undeniable," says Medeski. "It's still us and him, but what happens is something different than what we normally do and different than any of the other stuff that he does. It really is a band of its own at this point, and it's had a life of its own."

That life began in 1997, when Scofield called the trio to be his backing band for a quartet album called A Go Go. He'd been following the young band's releases since its 1992 debut, Notes From the Underground, and was particularly impressed with the 1996 release Shack-Man, the album on which their blend of jazz improvisation, funk grooves, and jam-band looseness seemed to jell.

"That's a great record," Scofield recalls. "I heard that and said, 'Wow, this is fantastic music, and it's an area that I like to explore, too.' There are all these different elements in their thing that I was into: funky, open stuff with free improvisation involved. . . . So I called them up and said, 'Do you want to try something?' "

The combination clicked instantly, although Medeski admits the three were sidemen on that initial outing. "A Go Go was Sco's record, his project, he was the leader," he says. "We definitely threw our sauce all over it, because that's what we do. Whenever we play, we try to make the music our own. Then out of the music, we developed a really amazing relationship with him."

"One of the things that was evident the very first time I played with them, and still is," Scofield adds, "is that they have a way of taking material and subconsciously shaping it. They just go into a bag. And it's really fun to jump on board this thing that already has its own momentum."

They were a quartet of equals when Medeski, Scofield, Martin & Wood reunited in 2006 for Out Louder. The four shared equal billing, and the album was written almost entirely in the studio, collaboratively. The following tour yielded the 2011 two-disc live collection In Case the World Changes Its Mind.

For Juice, the band drew inspiration from Latin music, particularly boogaloo, the fusion of Cuban mambo with American soul and R&B. "MMW has talked about doing a boogaloo record for a while," says Medeski. "It's this psychedelic, funky Latin music. . . . Back then, there was a lot of exchange between blues, jazz, rock, Latin music - it was all fresh and new."

Which gets us back to "Louie, Louie." Songwriter Richard Berry took its familiar riff from the song "El Loco Cha Cha," which he'd performed with Ricky Rillera and the Rhythm Rockers. That Latin lineage explains the tune's emergence in "Juicy Lucy," the one song on Juice that MSMW wrote collaboratively in the studio.

They take the same approach often during live shows, according to Scofield. "We call this one song 'Down the Tubes,' but it's not a song at all. We just start with anything, spontaneous, and it usually turns into some rhythmic thing and we jam. It's always pretty good because those guys are real improvisers."

The classic-rock catalog is mined in several other ways on Juice, with covers of Cream's "Sunshine of Your Love," The Doors' "Light My Fire," and Bob Dylan's "The Times They Are A-Changin'." Scofield explains simply, "They're just good tunes. They're vehicles for us to express ourselves on. It's fun to play those songs that everybody knows. It's like playing a jazz standard: All of a sudden everybody can just play it, and you get to this relaxed place that sometimes you don't get to when you're not sure about stuff. It's comfortable, and I think good music can come from that."


Medeski Scofield Martin & Wood

8:30 p.m. Friday at Union Transfer, 1026 Spring Garden St.

Tickets: $30-$32

Information: 215-232-2100 or www.utphilly.comEndText