Or: show me a Spotify playlist through the music4dance lens.
When I was writing the Jessic Lang/Tony Bennett post earlier this summer, I re-read the Twila Tharp/Frank Sinatra post from last year. I realized I’d written most of a music4dance feature for that post that I never completed or documented.
So I thought, this is some low-hanging fruit for a fun feature and blog post, so I’ll finish it up quickly and get a post out to show it to everyone. Famous last words. It turns out that the edge case that I implemented didn’t work for much more than the post that I created it for, and I had about 80% of the work left.
The Feature
I wanted to show the Nine Sinatra songs in the order they were performed in the context of music4dance. I could tag the songs with something unique and get a list of those songs as a music4dance search result. But that wouldn’t be in the same order as they are danced in the Ballet. So what should I do? I could write a full-fledged playlist feature, but that seemed like overkill, and I hesitate to do that, since then I’d have to maintain not only the code, but also the data for all the playlists people would be scrambling to create (sometimes I can be a bit of an optimist).
Or I could do something that I’ve been toying with for a while: take a Spotify playlist and show it as music4dance results, similar to any of the various searches you can already do on the site. Since I’m already integrated with the Spotify API, this was quite straightforward to implement. And, in short order, I was able to add a Nine Sinatra Songs Playlist link to the blog post that showed the songs in order with all the other information that I normally display for songs in the music4dance interface.
This worked fine because I created the playlist myself and made sure that all the songs were in the music4dance catalog. But what happens if some of them aren’t?
I decided to solve this by showing the Spotify tracks that I could match to music4dance songs first, then, for signed-in users, I’d follow that with a list of tracks that I couldn’t find, along with an “add” button. That way, anyone really interested in a playlist can add the songs that are missing (along with their preferred dance for each, of course).
That worked well, but then I realized that some of the songs that weren’t matched in the playlist were actually in the music4dance catalog. This is because any given Spotify track can have many Spotify IDs. I am keeping the ID that I found when I first looked up the song, but that might not be the same one that is referenced in the playlist. I will not go into the details, but after a couple of tries, I believe I have a solution that works around that issue – this took more time than the rest of the feature, but also addressed a long-standing issue with adding Spotify songs by ID.
So now you can drag a Spotify playlist onto the main search control in the upper right of the music4dance site (or the search control in the main menu for smaller screens).
Here are a couple of examples.
This feature is available to everyone, but I’m trying to encourage folks to participate more in music4dance, so there is a limit on the number of songs you can see as an anonymous user, and the limit increases if you create an account and then some more if you subscribe.
Constraints and limitations
Even with my changes to improve looking up songs, that doesn’t get past the fact that the music4dance catalog contains a very small subset of the songs available on Spotify (and always will), so arbitrary playlists will generally not be complete.
This feature will only work for public playlists. I’m also not entirely sure that the way I’m accessing playlists will work for all public playlists. For instance, does it work for “Made for you by Spotify” playlists, where the you in that sentence isn’t me? Or an account associated with mine? I don’t really have access to that to test, so let me know what does and doesn’t work for you.
Moving forward
There are a couple of things that I didn’t implement (that I’m aware of). I’m trying to get features out and see what the community reaction is before investing too much time in new features. For this one, here are a few improvements I’d think about doing if people are using this feature regularly.
- The lookup is pretty slow, especially with a large playlist, since I’m matching each track individually and the only feedback you get is whatever the page loading feedback is for your browser. If there is positive feedback on the feature overall, I’ll figure out how to either speed it up or give better progress feedback (or both).
- I realized as I was testing this feature that it would also be interesting to provide this functionality for an album, which shouldn’t be too hard.
- There isn’t an obvious UX for showing that this is possible at all. The only way you would know that you could look at a Spotify Playlist through music4dance is to read this post. I’m not even sure where I’d put it in the documentation. If anyone has an idea for that, please let me know.
And, of course, if you have ideas that I haven’t thought of, please let me know that, too.
Step of the Month
The “Step of the Month” for July: Please share an unusual rhythm song (or songs) that you enjoy dancing to. It doesn’t have to be a variation on 12/8 or in any way related to the discussion from my previous post, just something that’s a little different that you enjoy. Post it in the comment thread here or send feedback.
Nine Sinatra Songs – Ballroom inspired Ballet
Pacific Northwest Ballet included Twila Tharp’s Nine Sinatra Songs as part of their Director’s Choice performance this year. I’m not in any way qualified to review a Ballet performance, but I can say that I thoroughly enjoyed it and had a great time playing with the Ballroom-inspired aspects of the dancing as I watched the…
Jessica Lang’s ZigZag – Ballet and Bennett
Pacific Northwest Ballet included Jessica Lang’s ZigZag in their All Lang performance this year. While it’s not as directly Ballroom-related as last year’s performance of Nine Sinatra Songs, it was a ballet danced to and inspired by Tony Bennett songs. And similar to Sinatra, Bennett’s songs are often well-suited to Ballroom dances, especially Swing and…







