Twenty-one years after Mogwai released their debut album Mogwai Young Team, they are about to unveil their first full-length movie soundtrack.

The band have previously written scores for documentaries, including Douglas Gordon’s Zidane: A 21st Century Portrait and Atomic, Mark Cousins’s film about the nuclear age. As well as providing the suitably eerie music for acclaimed French TV series Les Revenants, the Glasgow band contributed to the score for Leonardo DiCaprio’s environmental documentary Before The Flood and, in 2006, collaborated with Clint Mansell and the Kronos Quartet for the soundtrack to Darren Aronofsky’s feature film The Fountain.

Mostly recorded last summer, just before ninth studio LP Every Country’s Sun, their best performing album in the charts yet, the record is composed of nine tracks the band wrote for KIN, the forthcoming sci-fi drama directed by Jonathan and Josh Baker. Starring Jack Reynor, Zoe Kravitz, Carrie Coon, James Franco and Dennis Quaid, the film, which is set for release at the end of the month, is a sci-fi action thriller which centres on an unexpected hero.

“We were really excited to be asked to record the original score for Jonathan and Josh Baker’s debut movie,” says Mogwai’s Stuart Braithwaite. “It was a wee bit different to what we’ve done before. It’s Hollywood, so there are lots of people involved. Though the basic premise of giving us a script and telling us what sort of music they liked was about the same as we’d experienced before, when it got into the nuts and bolts, it was quite different as the directors ended up coming over to Glasgow and sitting in the studio with us. That was quite unusual for us. It’s their first movie too, so they were excited about the whole process.”

KIN is a development of Bag Man, a short film the Baker brothers produced a few years ago. Set to music by Brooklyn-based trio Bird Courage, it follows a 12-year-old African American boy who leaves his home in bustling Harlem for the eerie quiet of the upstate woodlands, all the while carrying a mysterious duffel bag.

“They let us see Bag Man fairly early on and we thought it was really great,” says Braithwaite. “It was quite close to when we agreed to do the soundtrack that they started filming, so we quickly saw some scenes and we knew what was going to be in the film.”

He continues: “What we’ve done in the past when making soundtracks is that we give them a lot of music and they can tell you what they like. You learn to know the general atmosphere that they’re looking for.

“With our own music we just do it and we don’t really think about what it implies or how it would make anyone feel or anything. It’s interesting to do something from another aspect and think: ‘we need to do something scary; what chords do we use?’ I think it helped us as a band to do it from that angle.”

WITH an ominous undercurrent throughout, the 42-minute soundtrack features some of Braithwaite’s personal favourite Mogwai music to date. The band have already released the brooding We’re Not Done (End Title) and Donuts, a sprawling epic which hits an almost hopeful groove.

The name of the latter track is not an example of Mogwai’s typically absurd song titles, Braithwaite explains.

“It’s a part in the film where there’s a guy eating donuts in a car,” he says. “It’s something I’ve never done, which is a bit sad given that I grew up next to Strathclyde Park, Scotland’s donut capital.”

When The National speaks with the frontman, he’s in Glasgow, snatching a few days on home turf in between gigs in Ireland and Romania, some of the last dates on a lengthy tour which saw Honeyblood’s Cat Myers standing in for drummer Martin Bulloch.

“Martin’s back,” says Braithwaite, confirming that it’s Bulloch’s beats that power KIN. “He had an operation a few months ago but now he’s playing again. Cat played her last show with us in Belgium a couple of weeks ago. She’s probably sick of the sight of us by now.”

He adds: “We’re starting to do music for another TV series now. We do keep busy but I quite like it that way. It’s about swimming with the sharks ... but not dying.”

Braithwaite says the band will soon be working on their two dates as part of Light On The Shore, the Edinburgh International Festival’s programme of contemporary music from Scotland. Held at Leith Theatre, remaining highlights of the programme include orchestral performances of Martyn Bennett’s classic Bothy Culture (Aug 21) Boards of Canada’s Hi Scores (Aug 23) and a night curated by poetry and music collective Neu! Reekie! (Aug 17) featuring The Vaselines, The Pastels, Linton Kwesi Johnson and Molly Nilsson, the Swedish electro-pop goddess on Glasgow’s excellent Night School Records.

Supporting Mogwai on August 22 will be Rev Magnetic, the new outfit fronted by musician/author Luke Sutherland, once of rated 1990s post-rockers Long Fin Killie and occasional member of Mogwai from 1998 to the present day. More music is expected soon from the band, whose debut single, the celestial, shoegazey Like No Girl That Ever Was, can be heard at revmagnetic.bandcamp.com.

Support on August 23 is Mogwai’s new Rock Action labelmate Kathryn Joseph, whose much-anticipated second album From When I Wake The Want Is was released just last week. Every bit as compelling as Bones You Have Thrown Me And Blood I’ve Spilled, her 2015 debut which went on to win that year’s Scottish Album Of The Year, From When I Wake The Want Is will also be played in its entirety at four special theatrical gigs in September: Glasgow Tramway (13); Edinburgh Summerhall (14); Stirling Tolbooth (15) and Perth Horsecross (17).

August 22 and 23, Leith Theatre, Edinburgh, 7pm, £30. www.eif.co.uk www.mogwai.co.uk rockaction.co.uk #LightOnTheShore

KIN: The Original Motion Picture Soundtrack, is out on August 31 via Rock Action