When Trainspotting director Danny Boyle set out to make a mini-series about punk icons the Sex Pistols, he had one condition: The actors had to play the songs for real.
There'd be no lip-syncing and no miming. Every riff and every syllable would be captured live on stage, in front of an audience, chaotic and unvarnished. Just like the originals.
But turning a cast of predominantly unknown and first-time actors into a proper band doesn't happen overnight. Boyle demanded, and received, a three-month rehearsal period - an almost unheard of length of time for a TV show.
"It was a bit like secondary school," says Anson Boon, who plays Sex Pistols frontman John Lydon, aka Johnny Rotten.
"In the morning, we'd all have individual tuition for music, so I'd be down the corridor screaming my head off and drowning out everyone else's music lessons. After break time, we'd come together as a band and we'd play for a few hours. And then after lunch, we would do scene practice with Danny."
"Everything was forged in that rehearsal time," says Louis Partridge, who portrays Sid Vicious. "It was wicked."
Music rehearsals were overseen by Karl Hyde and Rick Smith of the dance band Underworld. But even though punk was defined by its untutored, anyone-can-play aesthetic, the young cast weren't cut any slack.
"The bass is pretty hardcore for first time players," says Christian Lees, who plays bassist Glen Matlock. "But I would cover my blisters in liquid Band Aid and just keep playing."
"I had to have physiotherapy on my jaw all the time, because of the pressure that would build up in my face," adds Boon.
The pain paid off.
Boyle's six-part series charts the Pistols' brief-but-explosive career, from utter obscurity to global infamy - even recreating their infamously swear-laden TV interview with Bill Grundy that scandalised the nation.
But a cloud hung over the cast as they filmed their first scenes, as Lydon sued his ex-bandmates, saying they had no right to license the Pistols' songs to the show without his permission.
"We were aware it was happening," says Talulah Riley, who plays punk designer Dame Vivienne Westwood. "We used to joke, 'Is this [show] ever going to be seen by anyone?"
In the end, Lydon was overruled, with a judge saying the rest of the band were entitled to invoke "majority voting rules" over the use of their songs.
But the former frontman's anger didn't stop there. When a trailer for the series dropped in April, Lydon raged that it was a "middle-class fantasy" that put words in his mouth and "rewrote history".
Boyle was disappointed, but not surprised, by Lydon's tirade.
"I don't want him to like it - I want him to attack it," he told the Guardian earlier this week. "I think that's his absolute right."
Boon, who had to embody Lydon on screen, is equally diplomatic.
"There's that age-old punk saying that if you were really there, you can't remember it. And they all remember certain things differently because it was so important to them," he reasons.
Still, he would have liked to receive Lydon's blessing for the role. "That would have been the icing on the cake."
Starved of the real thing, Boon studied old footage, photographs and interviews to capture what the show calls Rotten's "rancid brilliance".
"I'm fascinated by the physical transformation he went through," says Boon. "In one of the earliest videos of the Sex Pistols, I noticed his shoulders were much more hunched. Then around Grundy, the shoulders dropped a bit, and by the time they played in America, his chest was almost puffed.
"It's like his body changed as his star rose, so I just sort of documented it."
The actors also got help from surviving Sex Pistols Glen Matlock, Paul Cook and Steve Jones (whose memoirs form the backbone of the show) as well as other people who knew the band.
"I remember Chrissie Hynde coming in to watch us play. The pressure was colossal," says Partridge.
"And her one note to me was, 'You look too intelligent'. So I had to dumb it down."
The actors were also given advice by the late Pamela Rooke, aka Jordan, who was credited with helping create the punk look.
"We played Holidays In The Sun for her," recalls Boon affectionately. "That was her favourite, but she never got to see them play it live because it was one of their later songs and they mainly did it in America.
"Her advice for me was, 'You need to pigeon toe your feet more.' She said she was always at the front of gigs and she always remembered Johnny's toes pointing in like that."
But perhaps the trickiest characters to pinpoint were Sid Vicious and Nancy Spungen (played by Emma Appleton), whose self-destructive, drug-fuelled relationship ended in tragedy when Spungen was found dead with stab wounds in a New York hotel. Vicious died of an overdose four months later, while awaiting trial for her murder.
They are often painted as the villains of the Sex Pistols story, but Appleton took a more sympathetic view.
"I think they both felt the world didn't understand them, and I think they recognised themselves in each other," she says.
"They completed each other and destroyed each other at the same time... but deep down they were both vulnerable, fragile kids."
With a memoir by Spungen's mother as her source material, Appleton speculates that the so-called groupie was demonised for mental health problems that weren't understood at the time.
"It wasn't talked about, It wasn't a thing. And I think we have a completely different understanding of it now. So I think, hopefully, an audience can understand and empathise with her a little bit better."
Partridge found a similar way in to his character.
"Sid was always trying to get the most attention, always trying to shock as much as he could. And, having looked at his early life, I could see why.
"He was first introduced to heroin aged 14, by his mother. That's not normal, but for Sid, it was all he'd known. So he went through life with this hole inside him that he filled with all of these disruptive, destructive things.
"So I think approaching it like that with a sense of empathy and looking at him as just really this sort of lost kid was really helpful. He was so much more vulnerable and lost and innocent than he's ever been made out to be."
Despite the tragedy, Boyle's series ends on a hopeful note - theorising that the incendiary, rule-breaking power of punk is still as necessary today as it was in the 1970s.
"I loved that 'screw it' attitude," says Partridge. "Do what you want to do with confidence and passion - because there's real power in individuality. A lot of people respect that."
The cast's only regret is that their band ended along with the filming.
"I feel quite sorry for them because basically they've been rock stars for the past 12 months," says Riley. "And now they can't play together again."
Pistol premieres on FX in the US, and on Disney+ in the rest of the world, on 31 May.