TORONTO -- There wasn't any faking when it came to the musical performances seen in the movie "Whiplash."

The stars of the film studied musical scores and practised for days to make sure they'd be ready to truly inhabit their characters in the movie about a talented young drummer, played by Miles Teller, who is determined to be one of the greats as he is taught by an intimidating instructor, portrayed by J.K. Simmons.

"I spent a lot of time just poring over the scores, just looking at the scores and just hearing it in my head, which happens to be an ability I have," Simmons said in an interview at the Toronto International Film Festival.

The veteran actor -- known for his roles in the "Spider-Man" films and "Juno" among many others -- said it was very fortunate that he and Teller had some musical experience in their past which was called upon in making the film.

Simmons, for instance, studied music in college and graduated with a degree in singing and composing.

"It was a fun sort of dormant muscle to get to work out a little bit again," the actor said with a chuckle. "I do play the piano in the film. I had to practice a lot to play that fairly simple little piano tune. ... My hands never really had any talent in them."

Teller, similarly, took the time to hone his drumming skills for his role.

"He was a rock drummer and he worked really hard at getting the jazz technique down and so that was a great thing to have," Simmons said of his young co-star.

Those skills also helped the two actors feel more comfortable playing their parts in front of the real musicians who were employed to make up the ensembles featured in the film.

"The vast majority of those guys were serious musicians and for both Miles and myself to have some credibility in that room, when we would cut and we would say 'let's pick up at bar 58,' these guys would look at each other a little bit like, 'Wow, this dude must have done his research because he actually seems to know what he's talking about,"' Simmons said.

"That was gratifying and it was fun."

Also fortunate was the fact that director Damien Chazelle had musical experience as well, having performed in a band.

"You can do everything right and if they're in the editing room cutting the movie together and if the editor and the director aren't musical, you look like an idiot," Simmons said.

"So the fact that we were in really good hands there was one of the things that contributes to make the movie what it is."

The Toronto International Film Festival runs until Sunday.