Rivers Cuomo’s reverence for data is no secret. The Weezer frontman has long used algorithms to optimize his songwriting, funneling creativity through computer programs like the programming language Python. Cuomo is known to carefully dismantle a hit song, examining each element to find out exactly what works, and apply that knowledge to his own writing process.

Since forming in 1992, Weezer has dropped 13 albums and generated 1.4 billion on-demand streams, according to Nielsen Music. In the past year alone, the act earned a Grammy nomination for best rock album, entered the Billboard Hot 100 for the first time in eight years with its fan-requested cover of “Africa” and landed in the top five of the Billboard 200 for its Teal Album of covers.

With the release of Weezer’s latest self-titled set, dubbed the Black Album, Cuomo, 48, says: “It's just a truly bizarre time in our career. We don’t know what the heck we’re doing, but people are super interested in us right now.”

You have a database of old lyrics and demos. Did any make it on this album?

With “Byzantine,” the bridge is from a pre-Weezer band that [drummer Patrick Wilson] and I were in in 1991, called Fuzz. I searched for the key and the tempo and the basic vibe I was looking for, and it popped up. All of my little bits and pieces of music will find a home eventually.

How did you determine the tracklisting with the Black Album?

It's the modern method of sequencing, which is to put the songs with the broadest appeal up front, and then it goes in descending order and the songs get weirder and weirder as the album goes on. It's very different from the old days. It's also the shuffle era, so we consider that.

This album was first mentioned in 2016, then two records came in between. I can't think of another band that's done that.

That's true. It was hard to find the right producer. That's the number one most difficult about making records, is finding the right producer -- finding somebody who likes Weezer, but isn't stuck in the '90s version of Weezer and wants to do something new and crazy.

You landed on producer Dave Sitek. How did you first connect?

That was our manager's idea. He had me go over there and meet with him. Dave has this crazy house; the primary function of that property is a super high-tech pot farm. He produces records on the side. He has an incredible amount of old drum machines and synthesizers and weird music gear and velvet paintings from thrift stores. For those of us who have become mature and have normal, boring houses with wives and children in them, it's a real breath of fresh air to go over there. It's like, “Oh, yeah, that's what it's like to be in your early twenties.” Within 60 seconds, I knew that this was going to be the guy to produce the Black Album.

On lead single “Can’t Knock the Hustle,” what inspired its funk and Latin sound?

I got the karaoke drums from a Justin Timberlake song, whatever song he had on the radio, like, eight months ago. I love Justin Timberlake.

Pete Wentz stars in the music video, but your Twitter profile photo changed to a still of him months before it came out.

That video has a funny history. It was originally the video for a song called "Happy Hour," from our last album, Pacific Daydream, and then we kind of gave up on the album and the single before it even came out. We were about to put out a single called "Cardigan Disaster" -- this was right before "Africa" -- and so we re-cut the video to that. That was going to be our first single, and then "Africa" came out, and started going crazy on the radio. We had to can that single. Finally, we got a chance to put out a Black Album single, so we re-cut the video again, to "Can't Knock the Hustle." Each time we re-cut it, it seemed to fit the song even better.

Many of the Black Album songs are actually quite breezy and psychedelic -- not as dark as the title suggests.

It's weird, I have a different idea of what "black" means, because I think a lot of people were expecting, I don't know, death metal. To me, this is what I was thinking of all along. It's all very piano-based and experimental. It feels black. But I think most people will be surprised and think it should've been some other color. It's also the first time we're only putting out one radio single ["Can't Knock the Hustle"], which is a strange strategy. We'll see how that works.

Since Warner Music Group joint venture Crush Music signed Weezer ahead of 2016’s the White Album, what other differences have you noticed?

It still feels like Weezer is being Weezer, that's for sure. They really like and respect our aesthetic and what we've accomplished in the past, and they want to keep that going. We are all waiting for some great video ideas, because that's been a core part of who we are and how we became successful. So we'd like to get that going again. Even without MTV. We have a good video idea for "High as a Kite," so hopefully that one gets made. [Ed. note: it did.]

Weezer has covered upwards of 100 songs over the years -- MGMT, Foster the People, Green Day, Smashing Pumpkins -- what was it like narrowing it down for the Teal Album album?

I wrote a program to get all of the data from Spotify's API, and we looked at the songs that were most popular that were not tagged "classic rock" or "alternative rock," and that came out before 1994 -- with the exception of "No Scrubs," that one's just too cool. I think there were about 200 songs in the report, so we picked the top ones and started learning them. I got all of the a capellas from YouTube and spent about 50 hours doing the vocals, really trying to get everything exactly right, and replicate all the different tracks. They did so much more layering in the '80s than nowadays.

Mark Rankin [Adele, Florence + the Machine, Foster the People] also produced, which is very cool.

We might use him for our next record.

Your next two albums are already in the works.

One was mostly done before the Black Album. It’s currently called OK Human and was produced by Jake Sinclair, who did our White Album. The other one, I’m depressed thinking about it. I have this huge emotional block. It’s called Van Weezer, and it’s basically a super-rock album. Like the Blue Album, but more guitar riffs.

You’re developing a setlist generator that ensures no run of songs will be in the same key or tempo. How’s that coming?

It’s driving my manager [Dustin Addis] crazy because he’s thinking from the perspective of production -- like, “When is the pyro going to go off?” Any parameter can be programmed into this. You can get all this data from Spotify on how danceable a song is, then you can sequence your setlist so it builds the right way. We've opened it up to the full catalog of about 200 songs, this next tour is going to be super fun for me. Fans can expect deeper cuts and different songs every night.

You're very tapped into music outside of the band -- who are some artists you’re liking?

One of the programs I made is a meta playlist that goes to about 10 different Spotify playlists and scrapes the top songs from there, and takes songs from my favorite albums or albums I'm interested in, then shuffles them all together and gives me about 75 songs every day. That's what I listen to. It's called **eclectricity.** It's public, there are many Weezer fans who follow it. It's a good mix of old music that I'm unfamiliar with, like classic, indie, punk, new wave, then 50 percent the very latest pop and indie music. I go through music super fast. I can hear a song once or twice, and I'm like, “okay, that's awesome, let me listen to something else now, I never need to hear that again.” I love hearing things I haven't heard before.

What have you developed outside of music applications?

I recently put up this video [on YouTube] explaining a program I wrote [for the final project in his CS 50x online class at Harvard] called Drivetimes, which decides when I’m going to leave a venue [to optimize travel logistics]. It helps alleviate all the decision-making. I got a 95 percent. I really love programming; it’s taking over all my music time.

How has your relationship with programming evolved?

Python [the high-level, general-purpose programming language] is so absorbing. [My skills are] getting better, unlike my music skills. I can just get lost in programming, and the entire day goes by. It’s wonderful. When I’m working on music, it’s more of an emotional grind. There’s so much more judgment going on of whether an idea is good or bad. Whether I’m good or bad. It’s exhausting and depressing. The guitarist in my old metal band once said, “I’m going to become a computer programmer.” I thought he was completely insane, but now it seems I’m moving in that direction after all these years.

This aricle originally appeared in the March 2 issue of Billboard.