LOS ANGELES — Prepare to see a new and rather melodic side of Al Pacino. The acting legend and Oscar winner — renowned for playing mobsters, detectives or drug lords — shows off his surprisingly adept singing chops as a flamboyant, aging rockstar in his new comedy and Bleecker Street Films’ debut feature, “Danny Collins.”

“It’s really Al singing in the film, and he worked hard to make his voice sound like what it needed to be,” writer and director Dan Fogelman told Variety at the film’s New York premiere on Wednesday night at the AMC Loews Lincoln Square. “He sings a stripped down song that Ryan Adams wrote for the film.” And it wasn’t only while the camera was rolling. “On set, he would break out in song all the time and get the crew to sing along with him. He would finish a scene and immediately start singing. His spirit was and still is infectious.”

To convert Pacino into Danny Collins — an over-tanned, ’70s singer who is riding on the hits from his heyday and is consumed by fame and fortune — Fogelman had the lead actor dress like Rod Stewart, imitate Neil Diamond’s singing style and infuse a touch of Barry Manilow’s campy stage presence.

Fogelman also based the film’s storyline on a real artist and experience. Five years ago, he came across a story on the Internet about a British folk singer named Steve Tilston, who discovered that the Beatles singer John Lennon had written him an encouraging personal letter in 1971 but only received the note in 2005. Fogelman reinterpreted the real-life account by having such a letter inspire Danny Collins to be true to himself and to reevaluate his life choices. In the film, Collins’ manager (Christopher Plummer) delivers to Pacino the Lennon letter, which inspires him to reconcile with his family (Bobby Cannavale and Jennifer Garner) and pursue a blossoming romance with a hotel manager (Annette Bening).

“I found the script to be heartwarming and inspiring,” Garner said. “It reminds you to stop and take stock of your own life and figure out what’s important to you and move forward in that direction and only in that direction.”

Pacino admits he also has taken a few wrong turns in his life and likewise has succumbed to the temptations of fame and fortune, just like his character did.

“I haven’t, in my life at times, been grounded. I felt what they call ‘the vicissitudes of fame,’ and I have gone through it and the beatitudes, the high and the low,” Pacino said. “You keep looking for the middle. I guess basket weaving helps a lot,” he joked.

For Cannavale, working with Pacino was the best decision of his life. He first worked with the two-time Tony winner in the Broadway revival of David Mamet’s “Glengarry Glen Ross” in 2012, and things took off from there.

“I just finished working with Al, and he’s the one who called me and said, ‘There’s a picture, and I’d love for you to play my son.’ What do you say to that? You say yes,” Cannavale relayed. “It’s the thing you dream about when you are walking down the street and start having fantasies. I’ve had quite a few (fantasies) growing up in this business that involve Al,” he confessed. “It’s weird to think we are friends. I still freak out when he sends me a text.”

Pacino has acted in nearly 50 films and still is going strong. When asked what he wants to accomplish next in his prolific career, he answered, “I guess I’m looking forward to a porch and a rocking chair.” He then added, “But so far, things keep pulling me back.”

After the screening, guests headed a few blocks south to the swanky Stone Rose Lounge for the after-party, where they munched on sliders and tomato-mozzarella kebabs. Pacino’s daughter Julie, 25, and his 14-year-old twins, Anton and Olivia, came out to support their father at the event, where partygoers enjoyed a birds-eye view of Central Park and panorama of the city skyline.

Actress Katarina Cas, who plays Pacino’s fiance in the film, snapped a selfie with a jovial Garner and Cannavale. Garner later reunited with her “Alias” co-star Victor Garber, with whom she chatted the night away. Also in attendance were Cannavale’s girlfriend Rose Byrne and Marky Ramone, drummer of the punk rock band the Ramones. Jessica Chastain and her boyfriend, Gian Luca Passi de Preposulo, attended the screening but skipped out before the starry after-party.

“Danny Collins,” from Bleecker Street Films, opens in theaters on March 20.