John Lamparski/WireImage(NEW YORK) — Mahershala Ali "immersed" himself in the real-life character's music for his role in the forthcoming film, Green Book.

The film is inspired by a true story of Dr. Don Shirley, played by Ali, a world-class African-American pianist who hires a tough-talking bouncer from the Bronx, played by Viggo Mortensen, to be his driver and protection as he sets out on a concert tour in the segregated South in 1962. Along the way the two men become close despite their differences.

"What's so beautiful about it is these two gentlemen are just so different," Ali told ABC's Good Morning America. "They couldn't be more different and they actually remain different, but there's so much that is revealed about themselves and they're so open and they listen to each other in such a wonderful way that they end up becoming like really close friends and allies."

In order to get into Dr. Shirley's head, Ali researched his mannerisms through documentaries, listened to old recordings and "immersed" himself in his music. He also drew inspiration from a documentary called Little Bohemia, about the artists that lived above Carnegie Hall that "[Shirley] appears in several times."

"I was able to pull from that and sort of get a sense of his gestures and his rhythm and his speech and posture and how he played the piano. So I had that to lean on a bit," he said.

The Oscar-winning actor, who's dabbled with rap in the past, also said he's "working on something for a project associated specifically with the film." But don't expect music to be Ali's second career. In terms of "pursuing a career and doing it and releasing music on a regular basis, no," he said.

Green Book hits theaters nationwide Wednesday, November 21.

Copyright © 2018, ABC Radio. All rights reserved.