Meryl Streep Learning Guitar for Diablo Cody Movie

Meryl Streep

The three-time Oscar winner will really be playing and singing in "Ricki and the Flash," a new movie about a struggling rocker from the "Juno" screenwriter.

A version of this story first appeared in the Aug. 8 issue of The Hollywood Reporter magazine.

Meryl Streep is flexing her musical chops. After mastering the tricky Stephen Sondheim melodies of Disney's Into the Woods, the three-time Oscar winner is now hard at work learning to play the guitar for her next project, the Diablo Cody-penned Ricki and the Flash.

PHOTOS Note Perfect: The 15 Best Portrayals of Musicians in Movies

In it, Streep plays a struggling rocker who attempts to reconcile with her neglected kids, one of whom is played by Streep's real-life daughter, Mamie Gummer. "The reason we haven’t shot the movie yet is Meryl's been learning to play," the Cody, 36, tells The Hollywood Reporter. "Watching her come along has been really inspiring." 

Band boot camp comes courtesy of director Jonathan Demme, who insists all the film's songs be performed live. Says Cody, "Everything you hear, the band has to play and Meryl has to play." While Streep's character's lifeblood is classic rock, she isn't above dipping into the catalog of a certain dance-floor diva to fill a room: "You might hear some Lady Gaga in there," adds Cody.

The character is inspired in part by Cody's mother-in-law (the Oscar-winning Juno writer has been married since 2009 to Chelsea Lately performer Dan Maurio), who for years has fronted a New Jersey bar band. "I watched her on stage so many times, and I thought to myself, 'This woman's life is a movie,' " Cody says.

STORY Meryl Streep to Play Maria Callas in HBO Movie

Cody then dreamed up the title character, a talented musician who never quite made it and now faces the consequences of having chosen music over family. "You don't see a lot of juicy, complicated roles for actresses over 50," Cody says of Ricki, adding that Streep, who turned 65 in June, was in her mind all along while writing, "but you never allow yourself to believe that that's going to happen."

Filming begins Oct. 1 in New York, where Cody's two children with Maurio, now 2 and 4, will accompany her to the set. She admits to working out some of her own conflicted feelings on career and motherhood in the screenplay. "I often think to myself, are my kids going to think it’s cool that I wrote movies or be angry that I wasn’t always there to pick them up?" Cody asks. "When I talk to friends of mine who grew up in the industry, they always seem really proud of their fathers’ success but ambivalent about their mothers'. Is that fair?"

PHOTOS A-Listers Angle to Play Music's Biggest Icons 

Landing Streep to play your lead is every writer's dream, but getting the 30-year-old Gummer, fresh off her short-lived CW series Emily Owens, M.D., to appear opposite her mother brought it to another level. The pair have appeared together on screen just once before -- but the film was 1986's Heartburn, and Gummer was just 20 months old.

"It’s going to be pretty exciting to see to watch them play against each other," Cody buzzes. "I can’t imagine embarking on something like that with my mom. I feel like we would work out a lot of stuff."

Cody recently appeared in the Glamour digital series, Step Into My Office.