web: let me link to a song, not a service!

I blog a lot about music. I want you to be able to play the songs I write about. You probably pay for a music streaming service that has millions of songs on it including the ones I discuss; you might even have a downloaded .mp3 file of the song on your computer. But I can’t put a “Listen to this track” link on a web page 😢😠.

The obvious thing to do is have a standard music intent on web pages: ⏵click to listen to “the song ‘I’m Mandy Fly Me’ from the Japanese 2008 reissue of the 10cc album How Dare You” and the song starts playing in your music system of choice. The same way I can put a tel:+1-212-555-1234 link in a web page and if you click it your smartphone offers to make the telephone call.

But there’s no such thing. The best I can do is embed a YouTube player featuring some rendition of the song that I found on YouTube. In cases where the artist doesn’t have an official presence on YouTube, I’ll link to the most popular video uploaded by some random fan, that doesn’t have too pointless a “video” feed of album covers and random pictures, and hope that their video remains online.

Considerations

As my example suggests, I might want to feature a very specific instance of the recording. YouTube Music irritatingly seems to pick the most recent version of the track, often from a compilation, that has been remastered (damn loudness war). It would be nice if your music streamer could say “I don’t have the particular version, but I have an edited version from the 1970s Go Pop compilation”.

I need to be able to control the playback, to say “Listen to the harmonies at 1:28 in ‘I’m Mandy, Fly Me’.” (This shades into the issue that videos and web pages are poor multimedia experiences, which I blogged about.)

What’s a suitable ID?

Wikidata Q number for a track?

Wikidata actually has an item for the song “I’m Mandy Fly Me,” Q12317871, which links to the song’s ID on Discogs, Freebase, and MusicBrainz. So maybe just have a play-music:Q12317871 intent and make streaming services look this up when the user’s browser starts it and hands it this URL. But I think Wikidata only covers songs that have an article on some Wikipedia, it doesn’t have items for all of the millions of songs uploaded every year. It seems (see “nerd alert” below) that Wikidata only has items for either 30,000 or 670,000 music tracks, a tiny amount . Maybe Bandcamp could take this on, but not all musicians are on Bandcamp.

ISRC?

Eventually Claude.ai suggested I look at ISRC (International Standard Recording Code). I don’t know how many codes this has, but a search for the song by 10cc returned 41 results, one of which might be the right one So maybe play-music:GBF087500011 is the right link (Wikidata doesn’t have any ISRC for “I’m Mandy Fly Me”).

Discogs or MusicBrainz ID?

Discogs and MusicBrainz also have IDs for lots of tracks. Discogs (a great resource for credits) seems more for collectors tracking down different physical recordings of a song; Wikidata says “I’m Mandy Fly me”’s Discogs “master ID” is 280200 which brings up 22 different versions of the 45 RPM single. I think MusicBrainz is for fingerprinting different versions of a track; Wikidata says the song’s MusicBrainz “work ID” is 9812b3a5-68f6-4c62-b5a9-72b55c5e062c and it brings up dozens of versions of the song from different compilation albums, with slightly different lengths.

Song information matters

Another benefit of a play-music:songTrackID link is the site(s) that maintain the information for songTrackID independent of a particular streaming platform could also provide all the song credit information that is so sadly lacking when you just stream or click play on a song. If there isn’t a Wikipedia article about the song or album, how do you learn who sang the backing vocals or where it was recorded? (Macy Gray’s version of “Tuesday Heartbreak,” I’m looking at you!) Roon (not a streaming service, but excellent software for organizing and playing back your own digital music files) has fantastic metadata for millions of songs so you can explore other songs featuring the same drummer or produced by the same producer, but this information arguably should go with the song, not be dependent on a third party.

Wikidata has a whole data model for this, for example there’s a producer property and a performer property, as you can see for the track Imagine. Ignore the very dry data-centric presentation on the Wikidata site, and imagine this tuned specifically for information about a song. The data model does propose adding Amazon/Deezer/Melon/Shazam/Spotify/Tidal track IDs for tracks, but I don’t think this has happened yet. Wikidata doesn’t include lyrics, undoubtedly due to murky copyright considerations, but many streaming music players now show them so lyrics can be left to the user’s music player.

Also playlists

After you’ve read my words of wisdom, you might want to access a playlist of all the songs I’ve written about. This is especially important for long pieces or interviews that mention dozens of songs. But the best they can do is embed a Spotify or Apple Music songlist player, ignoring everyone paying for Amazon Music, Deezer, Qobuz, Tidal, YouTube Music, etc. Here’s what NPR does:

screenshot of the two playlist widgets on an NPR web page, one for Spotify and the other for Apple Music
sucks to be you if you don’t pay for Spotify or Apple

NPR also has a “Here’s the song, you figure it out” approach. If you click (⏵) View the Tony Bennett show playlist on its Tony Bennett Profile , you get a static text list:

screenshot of a static window listing songs played on an NPR show
Here’s the information, you figure out how to locate and play the songs

Third-party solutions abound

I DuckDuckGo’d and found web pages like “14 Best Music Smart Links in 2024” and “Your Ultimate Guide to Music Links: Accessing Key Music Resources.” From the former

Smart music links can be created using a music url generator, such as SoundLink, Linkfire, Linktree, ToneDen, Hypeddit, Soundplate, Songwhip, Feature.fm …, and many more. Users can use these services to create custom landing pages for their music, where they can choose which platforms to include and customize the page’s look and user experience.

The landing page these services provide looks something like this:

screenshot of Soundiiz landing page for a sample track, with its links to play it on a few music streaming services
No, I want a playlist on my web site that works with the user’s music player

But this is the wrong approach. I don’t want to involve a third-party “music link platform” that provides a separate landing page that figures out links while also tracking my users; I want my reader’s computer to resolve a music intent link to play a song or load a playlist.

There are all kinds of “schemes” you can put in a URL (or a URN? a URI? I can never remember the difference); IANA has a list of official ones and Wikipedia lists some of the unofficial but common ones. There’s no sign of a play-music: scheme.

Efforts to solve this

Tomahawk resolver

Tomahawk (archived site) got some press back in 2013 when it tried to come up with a standard player for music.

Tomahawk is a free multi-source and cross-platform music player. An application that can play not only your local files, but also stream from services like Spotify, Beats, SoundCloud, Google Music, YouTube and many others. You can even connect with your friends’ Tomahawks, share your musical gems or listen along with them. Let the music play!

but the startup went nowhere and the player hasn’t been updated for years. It’s a shame because “In short, given the name of a song and artist, Tomahawk will find the right source, for the right user at the right time” is close to what I want. This is implemented by Tomahawk’s separate resolver code (likewise code that hasn’t been updated for 6 years) which figures out how to locate the track on dozens of music services: “Given a tuple of Artist,Track (or a triple Artist,Album,Track) return a stream URL (and some metadata about it) so that one can play this track.” Great idea. Maybe a triple is better than a single ID for every track, although it doesn’t specify a particular version of the song. The resolver can also open an artist URL, an album URL, or a playlist. Tomahawk also came up with a bookmarklet that “can generate playlists from within web pages. So, if you’re browsing on a site like NPR’s All Songs Considered, and find a song you like, just click the bookmarklet and Tomahawk automatically searches for all the songs listed on the page.” But, again, why involve a third party? I should be able to have a service-independent playlist on my web page, and my reader’s computer should hand it to her chosen music streaming service. And Tomahawk’s demise shows how crazy it is to leave this functionality in the hands of a single third party.

Data Transfer Initiative’s playlist transfer

The Data Transfer Initiative works on policy and technology to empower users to transfer data from one online service to another. One specific example of this is a playlist transfer tool that “allows users of Apple Music and YouTube Music to transfer music streaming playlists between the two services.” Neat, but they don’t seem to be promoting a standard representation of a playlist that I can put into a web page that “just works” in my reader’s music player.

Nerd alert: how many tracks are on Wikidata?

I asked claude.ai to help me count the number of items that are “audio tracks” in Wikidata. It gave me the query to use

SELECT (COUNT(?item) AS ?count) WHERE {
  ?item wdt:P31 wd:Q7302866.
}

and the Wikidata Query Service returned count 7524.

But when dealing with ontologies and knowledge graphs you’re in a maze of has parts and subclasses and such. I asked “Does this include subclasses of a track like a single or a song?” and Claude replied

That’s a great question. The query I provided earlier does not include subclasses of audio tracks. It only counts entities that are directly instances of “audio track” (Q7302866). To include subclasses like singles or songs, we need to modify our query. Let’s create an updated version that includes subclasses.

SELECT DISTINCT ?subclass ?subclassLabel WHERE {
  ?subclass wdt:P279* wd:Q7302866.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

but that resulted in a list of 43 things related to an audio track, like “instrumental cover,” “bonus track,” “re-recording,” etc. Eventually Claude came up with a query that includes subclasses of “audio track”:

SELECT (COUNT(DISTINCT ?item) AS ?count) WHERE {
?item wdt:P31/wdt:P279* wd:Q7302866.
}

and this returned count 31056. Then it suggested a query for Q2188189 (musical work):

SELECT (COUNT(DISTINCT ?item) AS ?count) WHERE {
  ?item wdt:P31/wdt:P279* wd:Q2188189.
}

which returned count 674057. Again, I suspect these are mostly items created from Wikipedia articles about significant musical works (I’m Mandy Fly Me has its own article). Considering that the big music streaming services each have over 100 million tracks on them, and 120,000 new tracks are uploaded to them every day (!!), Wikidata currently falls far short as a comprehensive repository of audio track information. It’s nothing that a bulk upload couldn’t fix.

About skierpage

As you might guess, my site is mine. My Schema.org info is at .
This entry was posted in music, web. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.