EVEN in this globally interconnected age, the discovery that there exists in Los Angeles “a large Swedish expat songwriting community” is a bit of an eyebrow-raiser. Bar the occasional British success story, isn’t American music famously insular? What train of circumstances led to a horde of Scandinavian songwriters descending on California like latterday gold prospectors?

The Swedish and Norwegian input into some of the biggest American hits of the 21st century is just one of the fascinating aspects of this highly readable history of the last 25 years of hit-making in the United States.

We’re all aware that the days of Tin Pan Alley are long over, and we’ve a pretty good idea of how hits are written now. The details will vary, but it’s the same basic image: a writer/producer, or a duo, hunched over a laptop, juggling blocks of sound with a magical application called Pro Tools. That’s the template for hit singles these days, and for New Yorker staff writer John Seabrook’s purposes this modern era began in the early 1990s, when a Swedish collective called Swemix started producing singles for the group Ace Of Base, and those singles unexpectedly took off in the USA.

In America, where they’re generally more uptight about these things, the division between melodic pop and R&B is an entrenched cultural chasm. As outsiders, Swemix seemed able to bridge the gap between the two. Their leading light, Max Martin, kicked off a hugely successful US career with Britney’s Baby One More Time, the first of 20 Billboard Number Ones. He was swiftly followed into the charts by Norwegian duo Stargate, “skinny ectomorphs with pale shaved heads”, who established themselves with Beyonce’s Irreplaceable. But America has learned. Both have been eclipsed by the phenomenal (and home-grown) Dr Luke, mastermind behind such titles as I Kissed A Girl, Tik Tok and Since U Been Gone.

It’s all very exciting, but there’s as much desperation in this story as innovation. The period Seabrook covers has been a fraught time for record labels, with online piracy and downloading taking a chunk out of their profits. One consequence has been the shift in emphasis back to hit singles, which are constructed more carefully than ever, with no margin for error allowed.

In the modern process of hit-making, components can be switched around between songs with wild abandon – a bridge pinched from one demo, a guest rap originally intended for one artist’s record carted over to another – as the producers chase the “rise” and the “bliss point”, but it’s the hook that’s paramount. One for the intro, one for the verse, one for the chorus, one for the bridge. At minimum.

Finding those hooks will often be entrusted to the topliner. Topliners are vocalists present at the demo stage who try spontaneously to come up with catchy parts for a new song, which the producer edits into a rudimentary vocal track. With few exceptions, topliners don’t become solo stars themselves, though the best are highly sought-after.

But it’s Seabrook’s description of the song camps that brings home just how far record companies go to secure that elusive hit. Song camps are convened when a major artist needs an album of new material, and can last three or four days in which dozens of producers and topliners are mixed and matched and up to sixty songs can be produced. Bear in mind that these take place in LA, with the hiring of multiple studios and a vast amount of expensive talent being put up in top hotels, and you’ll get some idea of the cost of these operations.

Seabrook steers an exemplary path through all this material, balancing the creative work with the economic imperatives. He gives a good account of the genesis of Rihanna’s smash hit Umbrella, to name but one, and passes on lots of interesting stories about how songs are written for major artists like Katy Perry and Kelly Clarkson, along with the resulting upsets and conflicting accounts. Moreover, he shows us how these producers operate within the structure of the whole music business circus.

Seabrook may be a generation or two older than the people he’s writing about, but he’s spent enough time sitting in on their studio sessions to get a handle on the music as well as the technicalities and economics of its production. An oldies-rock kind of guy, he’s gradually been converted by his young pop-loving son to appreciate the virtues of these records, making The Song Machine not only an excellent, clearly-presented behind-the-scenes book but one without a trace of condescension.