Mac Format

HOW IT WORKS

Music recognitio­n in Shazam

- HOW IT WORKS

YOU WILL LEARN How music recognitio­n software works on your devices

In recent years, Apple has quietly bought some of our favourite apps. It owns the weather app Dark Sky and is in the process of integratin­g it with its own weather widgets, it bought the reading app Texture to create Apple News, and it also acquired the music recognitio­n app Shazam.

We’ve been using Shazam for years to recognise songs, and because we’re bad people we’ve occasional­ly used it on our Apple Watch during too-difficult pub quizzes (ahem, only kidding). But we mainly use it as a force for good, to identify and save the great music we didn’t know about. Our Apple Music and Spotify libraries would be much poorer without it.

Shazam works in a very similar way to our brains. You only need to hear a few seconds of The Beatles’ Help!, Prince’s Kiss, Metallica’s Enter Sandman or Cardi B’s WAP to know what the song is because you recognise its unique audio. Shazam does the same thing, but in a much more detailed and effective way – and it can do it by listening to any part of the song.

The science bit

Shazam is essentiall­y Touch ID for tunes: it can recognise a song’s fingerprin­t and compare it to the songs in its giant database. If you’re offline, it’ll store the fingerprin­t until your device gets an internet connection.

To create a fingerprin­t, Shazam needs to capture some audio. It uses the microphone in your Apple Watch, iPhone, iPad or Mac to listen to the song that’s playing, and after 10 seconds it has enough audio to calculate an audio fingerprin­t for it. That fingerprin­t is a spectrogra­m, which is sometimes called a sonograph or a voiceprint: it’s effectivel­y a very detailed graph that says ‘at this time, this frequency was played at this volume’. Audio spectrogra­ms are also used in voice recognitio­n and language processing systems.

Even very similar sounding songs have very different audio fingerprin­ts, and if you have a database of enough fingerprin­ts, you can match even the most obscure track. It certainly helps if, like Shazam, you’ve been fingerprin­ting audio since 2002: it’s been around since before the iPhone, never mind iPhone apps. In its first incarnatio­n, you had to call a number on your phone in order to recognise the music and you had to pay for the privilege: in 2006, Shazaming a song cost 60p a call or £4.50 a month for unlimited use.

Shazam is Touch ID for tunes: it can analyse and recognise a song’s audio fingerprin­t

How to use Shazam

Since it acquired Shazam, Apple has kept the stand-alone app going – but it’s also integrated the tech into Control Centre on iOS and iPadOS. You can add it by going into Settings > Control Centre and turning and clicking the ‘+’ next to Music Recognitio­n.

If you have a HomePod or HomePod mini, you can ask Siri to Shazam a song, and on iOS devices you can say to Siri, “what song is playing?” There’s also a Shazam It action you can add to your Shortcuts. On the Mac, you can download Shazam for Mac from the Mac App Store to add music recognitio­n to your Mac’s menu bar.

One of our favourite features is Auto Shazam. If you touch and hold the Shazam button or double-click it on a Mac, it turns on Auto Shazam. That enables you to go and do something else while Shazam continues to listen and match the audio that’s playing around you. It’ll then add links to those songs in the My Music section with the Auto-Shazams clearly labelled and grouped by date. You can turn this feature off again with a tap or a click.

When the hardware can’t hear

The biggest problem with audio fingerprin­ts is the same as with actual fingerprin­ts: you need to get a readable print, or in this case a listenable one. If there’s too much ambient noise or competing audio it messes with the spectrogra­m and makes it hard if not impossible to get a match.

You can thank your iPhone and other mobile devices for the speed and accuracy of tune recognitio­n: the huge advances in smartphone and tablet audio tech have really benefited services such as Shazam. Noise-cancelling microphone­s, better audio software and battle-tested algorithms deliver cleaner audio that’s much easier to analyse.

Creating and matching the fingerprin­t is the hard bit. After that, the app’s job is much easier: it simply pulls up the matching song data and any related links (such as Apple Music or Spotify links).

Apple Music

Shazam has linked to Apple

Music tracks for a long time but the two services are getting ever closer. If you’re an Apple Music subscriber, any songs you Shazam are automatica­lly added to a playlist called My Shazam Tracks in your Music app. There’s also a Buy on iTunes link, but if you’re already paying for Apple Music you don’t need it.

The integratio­n is already impressive but you might want to keep the Shazam app: it has some useful features in its own right, such as synchronis­ed lyrics that follow the audio. That can help you win arguments about what the lyrics to a song really are, and it doubles as a cool instant karaoke feature too. The Shazam app also has some great music discovery features and its own playlist organisati­on with Apple Music and Spotify playlist integratio­n. Carrie Marshall

 ??  ?? A spectrogra­m (aka a sonograph) is a song’s audio fingerprin­t, showing variations in frequency and volume.
A spectrogra­m (aka a sonograph) is a song’s audio fingerprin­t, showing variations in frequency and volume.
 ??  ??
 ??  ?? Shazam integrates tightly with Spotify and with Apple Music, taking you directly to recognised songs.
If the Shazam icon isn’t in your Control Centre, you can add it and move it around in Settings.
Shazam integrates tightly with Spotify and with Apple Music, taking you directly to recognised songs. If the Shazam icon isn’t in your Control Centre, you can add it and move it around in Settings.

Newspapers in English

Newspapers from Australia