As the movie that ushered in both the modern-day superhero genre and a new peak in the art of saturation marketing, Tim Burton’s “Batman” has a legacy that’s hard to overstate. Virtually everything associated with the 1989 comic-book adaptation became a cultural phenomenon, from Burton’s mischievous, mainstream-goth aesthetic to the meta-narrative of the film’s record-breaking box office receipts.

Prince’s multiplatinum soundtrack for the film — featuring the hits “Batdance,” “Partyman” and “Scandalous” — was no exception, ushering filmmakers and musicians alike into a new era of “Music Inspired By” album opportunities even as it rescued the iconic performer’s career after it had suffered some financial setbacks in the wake of his extravagant touring productions.

Thirty years on, the “Batman” LP is still remembered fondly by fans who associate it with the film, especially those who were first exposed to the Purple One’s work through it. But according to “Purple Rain” director Albert Magnoli, who worked as Prince’s manager during its development and recording, the release fulfilled a number of competing goals — financial, artistic and personal — that were weighing on the hard-working but notoriously idiosyncratic performer at the time.

“Prince was at a crossroads,” Magnoli tells Variety. “The ‘Batman’ album afforded us the opportunity to do art and commerce and allow the artist Prince to forge on. This was a perfect opportunity and a perfect vehicle in which he could express himself creatively.”

Notwithstanding the film’s tremendous commercial success, “Purple Rain” marked a particularly fertile collaboration between Prince and Magnoli, then an up-and-coming director who transformed many of the true details of the singer-songwriter’s upbringing into a mythic origin story. The two parted ways amicably when Warner Bros. handed the musician a blank check and allowed him to direct his follow-up, the black and white comedy “Under the Cherry Moon,” but after the film flopped, Magnoli returned at the behest of Prince’s then-manager Robert Cavallo to develop a documentary project around the artist. While attempting to create the archival footage that would paint a portrait of Prince’s real life and working methods, Magnoli discovered that his friend had wildly overextended himself and was in real danger of running out of cash, despite his prodigious output.

“When he did ‘Purple Rain’ and the tour, he had spent a tremendous amount of cash and he was now at a place where his management, to their credit, were attempting to leverage future earnings in order to pay for past and present debt,” Magnoli reveals. “Of course, that’s never a good idea, but Prince was not wanting to accept responsibility for letting these things get out of hand. And then he came to me and asked, ‘What if you took over?’” Magnoli outlined the two conditions under which he would consider the job: He would be as honest as always about his opinions, including (and especially) when he felt Prince was making a mistake, and he wanted the freedom to pursue his own creative endeavors, which meant developing other projects to direct. “He agreed to those two points, and I said okay,” Magnoli recalls.

“I immediately did a forensic kind of financial search as to what was really going on, and it was more horrible than anybody thought. So [the plan] was about trying to bring revenue into the operation without overextending him to the point where no one would be interested in getting involved in anything he wanted to do,” Magnoli explained. “And the ‘Batman’ album came into being when I was contacted by [‘Batman’ producer] Mark Canton, and I went to Prince and said, ‘This will help us bring revenue into the system without having to expose you to another album.’”

Having witnessed Prince’s prodigious output of songs for the “Purple Rain” soundtrack, Magnoli saw the record as an opportunity to focus the artist’s creativity, to satisfy the terms of his contract with Warner Bros. Records, and bolster his commercial viability with a release whose visibility would be amplified by a high-profile movie he would not have to promote himself. “I said, ‘This will be a way for you to creatively go to work. It’s not essentially a Prince album, it’s a ‘Batman’ album, and so it’s a win-win.’”

That said, Warner executives weren’t immediately helpful in providing a direction for the project. “They knew that having Batman associated with Prince would probably be a good commercial idea, but that’s as far as they thought about it. It was up to us to actually do the work in order to make that suggestion a reality.”

Magnoli drew upon both his own experiences as a director and his knowledge of the artist’s personality to find a harmonious way to incorporate this material into a film that, unlike previous projects, would not revolve around Prince. “Film composers are trained to compose to the frame, and they also know how to allow their creativity to work in harmony with the director’s vision,” he observed. “I knew that Prince didn’t have the technical wherewithal to write [the score] to the frame, and I wasn’t sure as to his ability to be able to interact with a film director that was asking him to do something he didn’t want to do.” The solution, Magnoli discovered, was staring him in the face: encourage Burton to work with longtime partner Danny Elfman on the film’s score, and Prince would produce an album of songs that the director could add to the film however he wanted.

“I said, ‘Let Prince write because he’s inspired by the motion picture, and it’s up to the director to decide whether he wants any of those songs in the motion picture,’” Magnoli recalls. “From a directing standpoint, I would want the option to say no to everything and just have the song score exist as a component, and then have the film score exist as a component, and allow the film to be what it needed to be. And everybody agreed with that.”

According to Magnoli, Burton then brought a rough cut of the film to Prince’s Minneapolis studio for the three of them to watch, leaving the tape behind for inspiration. Little did the “Batman” director know just how helpful his raw footage would be; Prince, who was exploring audio samplers at the time, borrowed heavily from the available material — including production sound that wasn’t yet polished, or replaced, with ADR — for the album’s eventual nine songs. “Prince was accustomed to using sound that was available without waiting for the polished version. It might be production sound, but you can hear things,” he recalls. “He also played with the dialogue: He overlapped it, doubled it up, did this, added that, so there was a constant creative input.” Magnoli says that Prince’s elaborate processing of the clips made it impossible to replace them later with finished audio.

“If he goes to work on it and layers in 20 different things over it, he can’t possibly go back to the original because all of that work would have had to be duplicated,” he explains. “And he doesn’t take notes, so what are you going to exactly duplicate? He’d have to start from scratch. It would have just been impossible.”

Armed with a videotape of the rough cut and round-the-clock crews waiting to assist him, Prince locked himself in Paisley Park’s recording studio for several days before emerging with what would be the album’s first single, “Batdance.”

“He brought it to me in the morning as he was leaving the studio and said, ‘You’re probably going to be angry because I kept a crew working over time, but I’ve got this six-minute song. Listen to it and I’ll come in later on and you can tell me what you think.’” Magnoli flipped over the song, which he immediately recognized could be an epic aperitif for both the album and the film itself.

“He said, ‘Do you want me to edit it?’ And I said, ‘Cut it in half and give me a shorter version, but I’m going to get Warner Brothers to approve this six-minute version to go out with the video we make.’”

“I immediately flew to Los Angeles and sat with Mark Canton and his team, and of course, they’re pushing back because the record label is skeptical as to whether or not they’ll play it on radio — all of that conventional wisdom which generally gets in the way,” he remembered. “And I said, no, we advertise it as an event. Somebody in the room said, ‘It’s not a song,’ and I said, ‘Use that as a selling piece!’ They agreed eventually, and that’s what we did. It turned out to be quite successful.”

“Batdance” was a collage of a number of ideas that Prince had been working on — particularly a song called “200 Balloons” — some new and some several years old This approach would become common throughout his career thanks to the volumes of material he could produce in a very short time period.

“Some of the songs were half-finished songs from other projects that he realized that if he changed the lyric, that could be [fit the film]. So there was a whole kind of synergy where he just sat with the songs and worked them.” Although Prince found inspiration in both the content and themes of Burton’s film, Magnoli said he was surprised when he learned that the filmmaker, who had used Prince’s earlier songs “1999” and “Baby I’m a Star” as placeholders in a rough cut of the film, intended to use some of the new songs on screen. “‘Partyman’ sprang forth based on the antics of Jack Nicholson as the Joker, and we were told that they would use it in the film, which wasn’t our plan at all,” he says.

Magnoli was tasked with directing the music videos for three of the singles — “Batdance,” “Partyman” and “Scandalous” — and he and Prince developed visuals that would combine the iconography of Batman with Prince’s work. “Batman is a conflicted individual, both good and evil,” he observes. “Why does he dress up like that? Why does he fight at night? One of the great parts of our creative relationship was that we talked about stuff. It started with making ‘Purple Rain’ and we would talk about what the character was going through and then finding that visual. So we just discussed, figured it out, and then my job is to put the visuals together in order to make it work.”

Although the love ballad “Scandalous” was by far the most provocative of the songs included on the album, it was the music video for “Partyman” that caused the most problems for Magnoli to finish, thanks to a crackdown on content after MTV received numerous complaints about Cher’s video for “If I Could Turn Back Time.”

“We got an urgent call — MTV was looking at all of the videos coming in for airing,” he recalled. “In the ‘Partyman’ video, I had a beautiful girl in a mermaid outfit in a water tank swimming around. It was intercut with the video, but because people in the party were drinking water from the aquarium she was in and then dying, you had sexual imagery and then you had a Jim Jones suggestion of mass suicide. They went nuts.

“I was literally about to send them the final cut,” he continues. “So I was forced to take out that girl, but it essentially gutted the video. What I should should’ve done is made the cut the way they wanted, and then a year later make a big thing about the original version — ‘This was not allowed to be seen, now it is.’”

Nevertheless, Magnoli’s strategy to put Prince’s career back on track paid off. “The revenue from ‘Batman’ and severe cost cutting — we went from a $10 million per year nut to $2 million — allowed him to continue on without concern and without changing his lifestyle.” Eager to continue their artistic collaboration, Magnoli hatched a plan to develop “The Dawn,” a $30 million musical starring Prince in dual roles.

But after he took a break to help Warner Bros. complete Andrei Konchalovsky’s troubled Sylvester Stallone-Kurt Russell team-up “Tango and Cash,” he said that Prince’s restless creativity, and his need to keep a tight leash on the folks in his inner circle, led them to go their separate ways.

“He unfortunately defaulted to the idea that he couldn’t let me go off and direct other projects,” he said. “In December of 1989 I laid out very clearly to Prince exactly what we were going to do, that we were going to go into production in the spring-summer of 1990 and then a year later in the spring-summer of 1991. And Prince said, ‘I like all that, but I’m not going to wait 18 months. You need to have that film in theaters in the next four months.’ And that broke us up.”

Although another team soon took over management of Prince’s career – starting with the Prince-directed “Purple Rain” follow-up “Graffiti Bridge,” which hit theaters in late 1990 – Magnoli remains sanguine about their partnership and the work that came out of it.

“The period of time that Prince and I worked together was excellent,” he said. “From the very first time we met, we just had a knack of being able to work together very powerfully and speak our minds. The unfortunate thing is that ‘The Dawn’ would have been a great film — visually and musically it would have set a new bar like ‘Purple Rain’ did,” he insists. “Unfortunately, Prince just could not get out of his own way when it came to short-term thinking as opposed to long-term. But it was an excellent relationship, truly.”