On “Unwind” from Pink’s Try This, she sings, “I’ve only been here for 27 years/ But already my life is over.”

Pink, who is 24, wrote the first-person song from the perspective of Janis Joplin, the legendary rocker who died in 1970 at 27.

Consider it a preview of her next project. Pink has signed on the play Joplin in a biopic scheduled to shoot this summer, according a spokesperson for director Penelope Spheeris, who has been developing the movie for 15 years.

Spheeris, whose résumé includes “Wayne’s World” and “Black Sheep,” also co-wrote the script, tentatively titled “The Gospel According to Janis.”

The movie is one of two Joplin biopics in development in Hollywood. It’s been widely reported that the other, titled “Piece of My Heart,” will star Renée Zellweger, although a spokesperson for Paramount Pictures said it was too early to confirm casting.

Pink landed the role in Spheeris’ movie, which has the endorsement from the Joplin estate, after screen-testing two scenes and singing two Joplin songs. The director described the audition to Daily Variety as “the most gratifying moment in my film career.”

Clive Davis, who signed Joplin to her first major record contract, has also worked with Pink and will spearhead the soundtrack.

Although her solo career lasted only a few years, the raspy-voiced Joplin is considered one of the greatest female singers in rock history. Before dying of a heroin overdose, she scored hits with “Piece of My Heart,” “Me and Bobby McGee” and “Mercedes Benz.”

Pink, who is touring Europe and making noise as a political activist, made her big-screen debut with a bit part in last summer’s “Charlie’s Angels: Full Throttle.”