A romantic guitar unfurls a tender melody. Male voices bark shout-outs and then croon like they’re auditioning for “American Idol.” There’s an electronic whoosh. A rat-a-tat vocal phrase. And that’s all before “Despacito” even really starts.

The first 20 seconds of Luis Fonsi’s international smash with Daddy Yankee brandishes hooks hinting at the elements of Latin balladry, reggaetón, and slick digital pop that play out through the rest of the song. “It’s almost like an executive summary,” says songwriter Charlie Harding, co-host of the “Switched on Pop” podcast, where he breaks down Top 40 hits through music theory. “And lots of songs are using this method.”

Alongside its Justin Bieber-featuring remix, “Despacito” straddles multiple trends in contemporary pop music. Globalization. Multi-artist collaborations. Slower tempos. And yet it might tell us the most about a related subject: How hits are made now that streaming is the way most of the world listens to music.

“In sessions, people have genuinely been saying, ‘Oh, we need to make something that sounds like Spotify,’” says Emily Warren, a singer-songwriter behind hits including Charli XCX’s “Boys” and the Chainsmokers’ “Don’t Let Me Down.” According to the artists, songwriters, producers, and executives interviewed for this piece, no aspect of a song, from production to vocal performance, is unaffected by the regime change.

Throughout the history of recorded music, formats have helped shape what we hear. Our ideas about how long a single should be date back to what could fit on a 45 RPM 7" vinyl record. AM radio meant mono recordings, rather than stereo, and producer Phil Spector’s Wall of Sound—with its cavernous echo and massed instruments—was built for it, offering plenty of depth through a single speaker. Video killed the radio star. Ringtones birthed the quick-hit digital chirps of snap music. The requirements for American Top 40 FM radio, in particular, grew so byzantine by the early 2010s, when blaring, mathematically precise hits reigned supreme, that an industrial-strength supply chain of super-producers and songwriters emerged to fulfill them.

And now, streaming’s promise for listeners is also a gauntlet thrown down for creators. With tens of millions of songs just a few taps away, artists must compete or be skipped. The unprecedented wealth of data that streaming services use to curate their increasingly influential playlists gives the industry real-time feedback on what’s working, but this instant data-fication in turn risks feeding back on itself. While streaming has undoubtedly coincided with a shift in the pop charts away from the caffeinated bravado of several years ago, streaming-era hits appear to be as rigidly defined and formulaic as ever—if not more so.

Photo by Sergi Alexander/Getty Images

In order for a stream to count toward chart tallies and, reportedly, for royalty payouts, a given song must be played for at least 30 seconds. That’s why, while how a song starts has always been important in pop, with streaming it’s more crucial than ever. Catchy bits come early and at a quick clip. There’s often an enormous introduction followed by a suspense-ratcheting succession of repeated hooks. Some songs, like the original “Despacito,” trust that a listener’s anticipation will escalate toward what follows; others, like the “Despacito” remix with Bieber, which slips its guest star in almost immediately, go for broke right away.

Katy Perry’s latest single, “Swish Swish,” which features Nicki Minaj, gives the bulk of its all-important first 30 seconds to a familiar-sounding Fatboy Slim sample that may evoke British house music for some listeners, or Minaj’s 2014 smash “Truffle Butter” for many others. “It’s shameless and kinda brilliant,” says David Emery, a marketing strategist at streaming label AWAL. According to Emery’s data, listeners tend not to skip what they’ve heard before.

Whether these types of reverse-engineered songs succeed or fail on the streaming charts plays out on a global scale—though the result isn’t some romanticized image of listeners around the globe just happening to click on the same track. Digital marketing firms have sprung up to help managers navigate the new environment. One is called Mtheory, which handles artists from doomsaying singer-songwriter Father John Misty to EDM heavyweight Zedd. “You need to be working across so many territories simultaneously that you get this amplification effect where they all start piling on top of each other to create a massive wave that becomes a hit,” Mtheory executive vice president Zack Gershen says. “The world has flattened.”

In 2014, Spotify released a case study touting the role of its own curated playlists in transforming house producer Robin Schulz’s bouncy remix of Dutch singer Mr. Probz’s “Waves” into a towering international hit. This Spotify-driven success—along with German producer Felix Jaehn’s blockbuster remix of Jamaican singer OMI’s “Cheerleader” and the popularity of Norwegian producer Kygo’s sleepy beats across the following year—spawned the mini-genre of tropical house. Commercially minded songwriters and producers took notice.

When trop-house met mainstream pop, on Skrillex, Diplo, and Justin Bieber’s early-2015 single “Where Are Ü Now,” the streaming era got its first signature style. Laid-back, melodic, lovelorn: This was EDM without being EDM. Nowhere was that more evident than in the song’s structure, which did away with conventional bridge, instead serving up a section that songwriter Harding calls a “pop-drop”—essentially EDM’s signature bass bombs normalized for everyday use. Bieber’s use of the pop-drop was honed on 2015’s “What Do You Mean” and “Sorry,” and the technique has since been adopted by Rihanna, Coldplay, Lady Gaga, and Maroon 5, as well as a host of newer acts like Kiiara and Charlie Puth.

The pop-drop has had few bigger practitioners and beneficiaries than Andrew Taggart and Alex Pall, aka the Chainsmokers. In June 2015, the duo released “Roses,” a single named after its co-songwriter and guest vocalist, Elizabeth Mencel, who records as Rozes. At that point, Taggart and Pall were on the verge of being a one-hit wonder, a year removed from their garishly viral novelty single “#Selfie.” But “Roses” was the first of five similar-sounding Top 10 hits they would score on the Billboard Hot 100, along with “Don’t Let Me Down,” featuring Daya, and “Closer,” a duet with Halsey. In July, the Chainsmokers ended 61 consecutive weeks in the Top 10, beating Ace of Base’s 23-year-old record for the longest streak by a duo or group. “We’re at an apex of a certain sound,” Harding says. That sound—fewer beats per minute, three or four repeating chords, a backdrop of rave-tent synths—is the sound of “Roses.”

In a sense, “Roses” is pretty traditional. It’s a love song with diaristic lyrics that are simple enough to translate as universal; Mencel wrote lines like “waste the night with an old film” about her real-life boyfriend, a movie buff. But not at all traditional is the fact that it has only one verse, never recurring, which lasts almost the entire first 30 seconds. “Taking it slow, but it’s not typical,” Mencel sings at the song’s start, as if predicting the path the Chainsmokers and other producers would take out of EDM.

Mencel describes streaming data as a guide for artists as they start putting out music. “Spotify tells you what your job is,” she explains, adding that her tracks are especially popular on the Teen Party playlist, a fizzy top hits collection with almost 3 million followers. This raises a slightly radical notion: Artists are now essentially creating with specific playlists in mind, potentially blurring traditional radio formats in the process.

Mencel has also been working on some unreleased music with One Direction’s Louis Tomlinson, a singer trying to establish a unique identity apart from his hugely popular group. “When you’re working with that type of artist it’s very important that you dig into something personal, because that’s what those fans want to connect to,” she says. “They want to feel like they’re being told a secret.”

Giving a sense that you’re confiding something intimate is another go-to move in recent pop songwriting and production. “People are listening smaller,” says songwriter Ross Golan, who interviews Top 40 songwriters like Stargate and Bonnie McKee on his “And the Writer Is...” podcast and has credits on hits including Selena Gomez’s “Same Old Love” and Ariana Grande’s “Dangerous Woman.” To Golan, this leads to production that feels like the singer is closer in your ear—music for headphones rather than car stereos, let alone arenas—and lyrics that sound more like they’re directed at the individual listener than at a crowd. “It takes a lot of confidence to sing quietly,” he says. “If you look at the Top 50 songs on Spotify, most of them have these almost mumbly-type performances. Even Kendrick and Drake—the rappers now are not these aggressive rappers. What’s popular is intimacy.”

Another element tying the streaming era’s music together is the way we listen to it: The phones and laptop speakers we often use can have a direct impact on the music that sounds best through them. Hit-making songwriter and producer Ricky Reed says he has worked carefully on his new and upcoming songs with positive hip-hop phenom Lizzo, electro-cumbia giants Bomba Estéreo, and gritty rapper Dej Loaf to create an impression of “phantom bass,” even on speakers with little bass output. And he points out that the abrasive SoundCloud rap coming out of Florida this year fares particularly well on non-audiophile setups.

Tamara Conniff, executive vice president at Roc Nation, says that while Top 40 is still traditional in what it will play, Spotify allows artists to garner millions of plays with something more adventurous. “That’s opened up creativity a lot more,” she maintains. Perfection, in these instances, may be less important.

Photo by Nicky Loh/Getty Images

Tiffany Kumar is used to being asked about what type of songs work better for streaming. A former songwriter and publishing executive, she joined Spotify last year as the company’s global head of songwriter relations. Kumar oversees an eight-person department that works to celebrate songwriters, who as a group have long complained of paltry royalty checks for even the biggest streaming smashes.

In June, under Kumar’s guidance, Spotify launched its Secret Genius programs, which include playlists and podcasts spotlighting the work of individual songwriters. It’s also organizing songwriting camps hosted by Secret Genius “ambassadors”—everyone from Drake producer Boi1da to country scribe Lori McKenna to “Despacito” co-songwriter Erika Ender. It’s clearly in Spotify’s interests these days to find a way into such artists’ good graces—songwriters and publishers have been fighting the streaming giant in court lately ahead of its expected IPO—and both PR and legal benefits aside, a streaming service is always in need of more streaming hits.

Kumar reiterates that songs are trending shorter, choruses coming in earlier. Songwriters, she says, need to consider the listener experience on Spotify: “You could be listening to anything, so if you’re not loving it, you’re skipping it.” As a positive example, she cites Twenty One Pilots’ 2015 full-length Blurryface. “That entire album streams,” she says. “They wrote it right.”

It’s also possible to write songs “wrong” for streaming, and all that merciless data reveals some sobering realities. Selena Gomez’s recent single, “Bad Liar,” samples the stalking bassline from Talking Heads’ “Psycho Killer”—a popular reference for the record-collector set, perhaps, but not well-known enough to take advantage of streaming’s entrenched logic of familiarity. The song was praised by critics, who cited its originality and wit, but for all its merits, it turned to be a relative flop, maxing out at No. 20 on the Hot 100 in July and spending most of its time on the charts outside the Top 40.

By contrast, “It Ain’t Me,” Gomez’s by-the-numbers collaboration earlier this year with trop-house stalwart Kygo, who has never heard a pan flute he didn’t like, was an international smash, peaking at No. 10 in America and hanging around Top 20 for weeks on end. The moral of this tale of two songs couldn’t be clearer: If Gomez goes by the data, which is more definitive than ever before, she could simply remake “It Ain’t Me” until the metrics tell her otherwise.

New songwriting trends emerge. They grow popular, play themselves out, and are devoured, Alien-like, by the opposing styles that were lurking inside of them all along. There are always established acts who embrace these styles to hold onto relevance, upstarts simply trying to hitch a ride on a brief ripple in the zeitgeist, and artistes who stand to the side. People go out more, they go out less, they listen on this gadget, they listen on that one, and it all affects how songs are written, performed, and recorded. There has been greatness in each era’s hit parade, and there has been absolute dross. Today, Taylor Swift interpolates Right Said Fred; yesterday, somebody thought people wanted to listen to Right Said Fred.

With its curated playlists, the streaming format ultimately will compare with previous periods of musical upheaval stemming from fluctuations in technology or fashion. But a whiff of arbitrariness, rather than competing creative visions, does seem to be driving the playlist-hit arms race—some songs stream, others don’t. Whatever works, right?

The relentless pursuit of global impressions could lead to more songwriting that’s as palatable and predictable in its own ways as the pre-streaming Top 40, and as beholden to the overseas box office as the superhero and sequel-stuffed contemporary film industry. At the margins, there are still sure to be out-of-nowhere success stories, likely within hip-hop, which often hotwires streaming’s virality and phone-speaker sonics as a way to upend conventional tastes. It wouldn’t be a surprise if song lengths keep getting shorter too—maybe the first 30 seconds of a track will evolve into an art form in its own right.

Streaming’s promise of nearly unlimited options isn’t only a puzzle for creators, of course: All of the data in the world seems superfluous if listeners don’t know what they want. In the meantime, streaming songwriters will keep trying to tailor their work to those imagined desires.