NEW YORK - Avicii was so invested and excited about his new album that even on his flight to Oman, where he later died, he was communicating with his producers about different sounds and melodies he wanted to include, and guest artists they should reach out to about collaborating.

The Swedish DJ-producer died on April 20, 2018, and months after his family asked Avicii's musical team to complete the unfinished album.

For production duo Vargas & Lagola, that wasn't so easy.

“It was hard to just even open the computer and work on the songs,” said Salem Al Fakir, who goes by Lagola. “We opened (the computer) like six months after everything happened.”

“The family's wish was to release the songs ... and that helped us finish the songs,” he added.

Thankfully because of multiple conversations, emails, text messages and more, Vargas & Lagola knew what Avicii wanted his new album to sound like, and felt they were headed in the right direction.

“We spent so much time with him in the last ... three months before he passed,” Lagola said.

“We knew how he wanted vocals,” added Vincent Pontare aka Vargas. “We've been working with him for so long. We know what he likes and what he don't like.”

“TIM,” to be released Thursday, features collaborations with Coldplay's Chris Martin and Imagine Dragons and expands on the electronic dance music sound that made Avicii a juggernaut on the music scene and festival circuit.

The Grammy-nominated hitmaker, born Tim Bergling, broke barriers by mixing country and western sounds with dance music on hits like “Wake Me Up” and “Hey Brother,” and was part of the pack of white-hot DJ-producers-remixers who stood out as pop stars in their own right after years of working behind the scenes, from David Guetta to Calvin Harris to Skrillex.

At 28, Avicii's short life ended when he was found dead in Muscat, Oman, a popular vacation destination on the Arabian Sea. Police said there was no evidence of foul play, while Rolling Stone magazine and TMZ reported he died by suicide. (Earlier this year Avicii's family launched the Tim Bergling Foundation, which focuses on supporting people and organizations in the field of mental illness and suicide prevention).

Avicii had in the past suffered acute pancreatitis, in part due to excessive drinking. After having his gallbladder and appendix removed in 2014, he cancelled a series of shows in attempt to recover, and in 2016 he announced he was retiring from the road.

Aloe Blacc, who collaborated with Avicii on the worldwide hit “Wake Me Up,” said recording the single “SOS” for the new album felt like an important job because of the song's powerful meaning.

“It was really heavy, these lyrics,” Blacc said. “After knowing what he'd been through, and really feeling extremely confident that he'd made it through the worst of his experiences in the music business, and everything was on the up and up, then getting the news that he'd passed, this song really felt like it was an important message to deliver to honour his legacy. And also to really create the language for people who are in distress situations, anxiety, mental health issues - words to say, 'I need help.”'

Blacc didn't know about “SOS” until January when he was asked to sing on it. In the studio, he said he felt Avicii's presence.

“Every time I did something that wasn't exactly right, (the producer's) critique or their coaching to fix it really felt like the spirit of Tim,” he said.

Joe Janiak, who co-wrote four songs on “TIM” and sings on two of them, had a similar experience when he went back to finish the songs he and Avicii initially worked on together.

“The good thing was that I had Tim in my head. He was very clear about what he wanted,” said Janiak, who has also written for Ellie Goulding and Britney Spears. “He'd speak to you and you knew how Tim felt about the song. For any work that I needed to finish, I knew the shapes that he was searching for.”

American band ARIZONA said they had sent demos of songs they had worked on to friends - including Avicii, who they had gone back and forth with about possibly collaborating. After he died, the trio was told he had started to work on their song, “Hold the Line,” and they were asked to finish it.

“That song talks about dealing with the struggle of not wanting to push forward and keep going when times get tough,” said lead singer Zachary Charles, who added that he and his bandmates have suffered from anxiety and depression. “I feel like that's because he was going through something that maybe he needed to hear that and maybe he held onto those concepts and ideas for as long as he could.”

Vargas & Lagola, who had worked with Avicii since 2011 and co-wrote, co-produced and are featured guests on three songs on “TIM,” said they remember seeing Avicii healthy and happy before he passed away.

“He had so much energy. We talked about how we look at the society. He was the person that didn't use his phone. He had his phone off every second we spent time together,” Lagola said. “He travelled abroad to Africa to try to find himself again. What we saw was a strong, healthy person that was really, really alive. That's the part that I feel is left out right now. That's what we saw of Tim and what we will always remember.”

For Blacc, he hopes his last collaboration with Avicii can be therapy for others.

“There are a lot of folks out there dealing with mental health issues and Tim was one of them. This song (”SOS“) was his opportunity, I think, to probably help himself, but in a large way, help others.”