It is one of the grimmest moments an artist playing a festival can face.

No, not food poisoning or missing your flight. Nor is the moment when your drummer decides she doesn't want to perform live anymore (see also: "White Stripes, The").

We are talking about the moment when you find out you are playing opposite a genuine, no-kidding legend. A legend, in fact, who doesn't tour all that much.

Such was the situation for Jim James, songwriter, singer and guitarist for My Morning Jacket, whose vaunted outfit is playing opposite Stevie Wonder.

Ouch.

"We were really, really devastated," James says from his Louisville home. "It's just so weird, it's one of the things that kinda bums me out about these festivals, but there's not a whole lot you can do. It's one of those things that gets just kind of sprung on you. You agree to play a festival, two or three months go by and you look at your slot and it's like, 'Oh, that's cool' and you see who else is playing then and you're like 'OH MY GOD.'

"We played once opposite Eminem at Lollapalooza. That made sense; people either wanna see Eminem or they wanna come see us. But who wouldn't want to see Stevie Wonder?"

Indeed.

But James is in a pretty good place. His band has built a fanatical following, thanks to sharply realized albums of lofty guitar rock that expand into three-hour shows on stage. The newest album, "Circuital," is one of the band's best, paring the songs down into something that translates smoothly into jams that set the controls for the heart of the sun. It's easy to imagine "Victory Dance" and "Circuital" blown into versions the length of a sitcom.

"I used to say the record is going to exist long after you do," James says. "So you should put a lot of thought and a lot of effort to try and make them exactly what you want to be. The record is more like the dream and the show is more like the fleeting moment of every day life. The record is more of a controlled lucid dream where you can manipulate the sound to do whatever you want."

The band recently wrapped up their summer tour for "Circuital" (they are flying in for the ACL Fest show), and James says he's prepared for the heat.

"I remember we played Stubb's once and it was well north of 100 degrees," James says. "That's when you get the full-body Charlie horses all night."

But it wasn't a Charlie horse that derailed a Bangor, Maine, festival date in August when drummer Patrick Hallahan was sidelined with an allergic reaction to some lobster.

"It was supremely psychedelic," James said of the gig, during which electric instruments were used with their most acoustic-ish material. "It was like, 'Well, we're already here, we did the best we could, and fans got to see something unique. But it was definitely surreal, like missing a vital body part. To a lobster attack."

The next night in Boston, he brought out opener Neko Case to sing duet on "Islands in the Stream."

Wait, what? The Dolly Parton/Kenny Rogers Velveeta-country song?

"It's one of those childhood songs that's borderline hilarious, but it's also a really good song that everybody knows," James says. "Neko is just amazing. Whenever I hear her and Kelly Hogan, I wanna go rent an old ski lodge with them and make an a capella album or something."

As for the future, James is currently working on a solo album (which I think explains the mouse-clicks in the background as we talk) on which he plays everything but the drums and some string overdubs. The band's most recent release is a track on "The Green Album," a tribute album to the Muppets filled with covers of Muppet classics by such acts as Weezer and Paramore singer Hayley Williams ("The Rainbow Connection"), the Fray ("Mahna Mahna") and Alkaline Trio ("Moving Right Along"). My Morning Jacket covers "Our World" from the 1977 Muppets Christmas special "Emmet Otter's Jug-Band Christmas."

"It's not a really well-known one, but I love it," James, a famous Muppet fanatic, says. Suddenly we are chatting over Muppet songs such as "Rainbow Connection" ("a (expletive) stone-cold classic") and the original pre-Aaron Neville version of Ernie's moving "I Don't Want to Live on the Moon" ("yeah, that one is amazing").

One gets the impression that a conversation about this topic could be sitcom-length as well. But there's a solo album to tinker with and a Stevie Wonder set to fret about.

jgross@statesman.com; 912-5925