The group includes Roger Glover, 71, from Llangorse, Powys, who is credited with writing the title for their song "Smoke on the Water".
Mr Glover was given an honorary fellowship by the University of South Wales for services to music.
The idea of a documentary came about when he spoke to journalism lecturer Craig Hooper after the ceremony.
Mr Glover said he wanted to "give something back" to the university and a team flew out to Toronto, Canada, to film the writing and recording process.
Deep Purple has existed in various forms since 1967 but Mr Glover thinks the group could be reaching the end.
"I really hope this isn't our last album. I love what I do. But I know we can't carry on forever," he said.
He said it was the first time they had ever allowed anyone "into our most intimate space" but added: "The whole band were a bit nervous about it but they were so professional that we soon forgot about the cameras.
"In fact, I think it even pushed us to produce a better album."
Deep Purple has sold more than 130 million albums worldwide and the latest offering is called InFinite.
Students and graduates got involved in the documentary, in roles such as researchers and graphics designers, and it will be available with the album when it is released in April.
Rock band Deep Purple has had a film about the making of their 20th album made by south Wales students.