#2: Music Library Tracker v2.0
Find Spatial Audio in your music library with an exclusive TestFlight beta
As a software developer with many public-facing projects I regularly get requests for new features. I’m usually pretty good at adding any ideas to my to-do list app and then churning through them the next time I happen to work on that project but sometimes they get stuck there for a little while. This usually happens if the task is complex or if it’s a feature that I wouldn’t use myself (and it’s almost fatal if it’s a combination of the two). That latter point is particularly important as nearly everything I build starts as being something I want to use myself; I don’t think I’ve ever started an app that wasn’t initially built for me.
This is a great way to get started in app development as it doesn’t feel like “work” if you’re building a fun tool for yourself. Once you’ve got something built, it’s then much easier to monetise it or tweak it so it can be used by a wider audience. Such is the case with nearly everything in today’s issue; every project started as a fun distraction to fulfil a need I had but is now something that can be enjoyed by many more people.
One thing I pride myself on is replying to every email I get (usually within a day or two) but more than that I’ll always send a follow-up email when a requested feature is added… even if it was 2052 days ago as you’ll see shortly 😂
I’d like to give a big thank you to all of you who sent in feedback regarding the TestFlight beta of Catacombs in the last issue. I’d also like to thank you for all the kind words of encouragement; those, combined with the roadmap I put together last time, have led to an incredibly productive fortnight!
I hope you’ll find something of interest in today’s issue and I look forward to hearing any feedback you may have.
Music Library Tracker v2.0 (Spatial Audio Upgrade)
Spatial Audio Finder updates
Artwork Finder updates
New app: Return to Dark Tower Assistant
Using a Stream Deck for iOS Development
Music Library Tracker v2.0
As some of you may be aware, I have an app named Music Library Tracker that I built back in 2016 to help me keep an eye on the changes Apple was making to my music library. This all came about as iTunes Match was frequently messing with my songs and either converting studio versions to inferior live versions or just deleting songs out of my library. It’s my most downloaded app and I recently did a big update which sped the scanning up and fixed a number of UI issues.
The next big update is to include Spatial Audio matching as I detailed in the last issue:
The dream scenario is that you can open the app, press a button, and within a few seconds have a new playlist generated for you which contains all of your Spatial Audio tracks.
The dream is very much alive as I have managed to complete a test version of the update which is ready for you today:
* Music Library Tracker v2.0 will run on any iOS device running iOS 13 or greater. If you already have Music Library Tracker installed then this will update that version; you won’t be able to downgrade. This beta will expire when the app update is publicly released in January.
To begin with I’ve redesigned the app to use a tab-bar system:
Activity - the original features of the app including a date-based overview of changes to your music library
Spatial Audio - the new functionality which lists all of the upgraded tracks broken down by date
Settings - this used to be in a modal view accessible from the Activity page but I always think two tabs looks odd; three looks much better.
In terms of the Spatial Audio update, when you first appear on the page there will be no tracks available as your library has not yet been scanned. If you press the small refresh icon in the top-right hand corner, a modal view will appear as the scan takes place. The first half of the process will send all of your track identifiers (in batches of 5000) to my server and get back a response for each one that will be -1 (not in the database), 0 (in the database but not updated), or 1 (it’s a Spatial Audio track). This information is then stored on your device and any Spatial Audio tracks are added to a new playlist named “Spatial Audio BETA”. On my library of ~7k tracks this takes less than 1 second.
If any of your tracks are not yet in my database, these are then synced up to the server (again in batches of 5000 and again being done in less than a second) and you’ll get an alert warning you that there are n number of unknown tracks and that you should do another scan later; the reason for this is that the tracks will enter a queue to be checked which may take anywhere from a few seconds to a few hours depending on how many other testers are uploading their libraries at the same time.
I was incredibly pleased with the performance when testing this update with my own music library; it vastly exceeded what I anticipated, so much so that I may well be able to add it as an automated daily check. For now though you’ll need to go in and press that refresh button whenever you want to scan for updated tracks. I should also mention that the Apple Music playlist is always created but in the final version it’ll be something you can disable.
I would greatly appreciate any feedback you may have, especially if you run into any problems with the Spatial Audio matching. You can always comment on this post, provide feedback directly through TestFlight, or email me via email@example.com.
Also, feel free to publicly share any screenshots, videos, or thoughts on the app update (although I’d obviously prefer you share any issues you encounter with me first!)
Spatial Audio Finder / @NewSpatialAudio
Before working on the Music Library Tracker update, I had a number of changes I had to make to the infrastructure that was powering the Spatial Audio matching (I won’t go through how the matching works as I detailed that last issue).
Add new columns for a unique hash, artist identifier, and a list of all audio variants. This was partially for future proofing and partially for a new feature which I’ll come onto shortly.
Recrawl the entire database of ~1.3 million tracks in order to add that new information.
Improve some of the SQL queries that were slowing down the process (mostly due to sorting by dates in order to try and crawl any new tracks in date order; I’ve abandoned this for the sake of speed so it’ll just pick a random track that hasn’t been crawled yet)
Update the Amazon RDS instance that hosts the database. It was using an older and slower instance type so should run a lot faster now. I also bumped up the storage and set it to auto-expand as it conveniently ran out of space 2 days ago (luckily it didn’t happen just after this issue went out 😅)
With these infrastructure changes in place I was then able to add a number of new features to the Spatial Audio Finder and to the @NewSpatialAudio twitter account starting with artist searching. When I first created the finder, I was just doing a basic text search against the artist; for example if you typed “Fall Out Boy” it would go and retrieve anything from the database that matched that artist name. I was sensible enough to make it case insensitive but it had two problems; firstly, the name doesn’t always match exactly as you think it should i.e. you might type “panic at the disco” but that won’t match anything as in the database it’s stored as “Panic! At the Disco”. Secondly, nobody read the instructions that said it searched by artist name so they would frequently try and search for song titles, album names, or Apple Music URLs. To fix this, I now take the string that is entered and use that to do an artist search against the Apple Music API and then return a list of artists; the user can then click on that which will use the artist ID to match against the database. This is far more reliable and also means those edge cases with artist name matching are handled by Apple
Another benefit of this process is that I can capture artist searches more accurately. For example, a user messaged me to say that the Spatial Audio Finder wasn’t working as it wasn’t showing the latest album for The Black Eyed Peas. The reason for this is that I had some of their older albums in my library so when I did the initial matching process it added those to the database. Previously, when somebody searched for an artist, I would do a quick lookup to find any tracks by that user but only if they weren’t in the database already (and in this case they were there, just not all of their music). Now I store the artist id when somebody searches and do a full crawl of their discography if it hasn’t been done before. This change alone has caused the database to double in size to nearly 3 million tracks in the past week - turns out the Spatial Audio Finder is being used a lot!
The final thing I wanted to improve was the @NewSpatialAudio Twitter account as there were two things that bothered me; sometimes it would tweet the same songs if they were featured on multiple albums and it would also send a tweet for every track that changed if the entire album hadn’t been upgraded. In the first instance, I decoupled the URL from the message and then kept a historical backlog so I could prevent it from sending the same text with a different album link. Secondly, I started batching together updates and created my own website to show how much of an album had been updated; in this way, if 12 of 16 tracks on a deluxe album are in Spatial Audio, you just get one tweet to the new webpage rather than 12 separate ones for each track:
I was able to work out the correct artwork URL in order to get a nice 16:9 ratio image for each album and then use that with the OpenGraph and Twitter Cards metatags so that it looks a lot nicer in the timeline (complete with a line telling you how much of the album has been upgraded).
OK, I think that’s enough Spatial Audio for one issue!
Artwork Finder Updates
My original artwork finder, iTunes Artwork Finder, was created back in 2011 to help me get higher resolution images for my Apple TV. Since then, I’ve received lots of emails with suggestions for improvements including one last week from subscriber Ruben:
It would be handy if the search field is already focussed and it would be great if the drop down menu for the type of media could be remembered from the last use (set a cookie?)
Adding the auto-focus for the search field was a straightforward addition and having the site remember your previously used settings (i.e. Album and United Kingdom) is something I’d been meaning to add for a long time. In fact, someone had requested that feature over 5 years ago where it had sat dormant in my to-do app 😬
The reason I’d never got around to it was that I was somewhat hesitant to do anything with cookies. I’ve had them blocked in my browser for the better part of a decade and with directives like the EU Cookie Law mandating that you need to give users a way to opt-out it just seemed like too much hassle. Another month would roll by and I’d leave it in the “for consideration” pile.
It turns out it was a 5 minute job to get it working and I didn’t need to dabble with cookies at all. A cookie is designed specifically to share information that you store on a website with your server as every subsequent web request will send that information with it; that’s why browsers like Safari will automatically delete cookies after 7 days so users can’t be tracked endlessly. However, I was able to use HTML Web Storage for this feature which effectively allows you to store some information against a page for as long as you want (and that page can fetch that information back when it needs it).
All of my artwork finders have now been updated with both of these features so whether you are searching for artwork from iTunes, Apple Music, or Apple TV your settings will now be preserved between sessions.
Thanks for the suggestion Ruben (and also Ayaz who beat you to it by 2052 days 😂).
There is another new feature for the Apple Music Artwork Finder this week in the form of support for compilation albums. These are often large box sets such as The U.S. Albums by The Beatles or Five Years 1969-1973 by David Bowie that have an overarching piece of artwork for the whole set but individual artwork for each disc. This artwork is usually only visible in the Apple Music client as you play each track and so I’d often hypothesised that it was embedded directly into the music files.
It turns out I was completely missing the obvious solution in front of me. When I fetch album artwork I make some requests using the Apple Music API and adjust the artwork urls provided for each album. If I’d dug a bit deeper I would have noticed that each track in the album also has an artwork url which 99% of the time will be the same as the album one; for the compilation albums though these urls are different for each disc.
To add support to my artwork finder I simply loop through each track and fetch out the artwork url. I then deduplicate this and remove the url for the album as a whole; if there is anything left then they are extra pieces of artwork which are then displayed on my webpage. It may well be that there are other use cases for this beyond compilation albums such as extra tracks on a deluxe album. If you spot any, let me know!
Thanks to Louis for requesting this feature last month (and to Ngyuen and John who requested it 361 and 638 days ago respectively).
New App: Return to Dark Tower Assistant
Return to Dark Tower is a really cool app-driven board game that comes with a physical tower that you connect via Bluetooth to an iPad. The tower lights up, makes sounds, and spins internally to shoot little skulls you place into it over the outlying map.
As much as I love it, there are a ton of cards in the game so you can easily forget what abilities you have available to you or miss crucial triggers at key phases in the game. You can also take most actions in any order so it’s easy to forget what you’ve done in the current turn, especially if you’re playing solo. To that end, I built myself a very niche app to keep track of all of the cards I had and all of the moves I’d made. It’s called Return to Dark Tower Assistant and is optimised for use in an iPad Slide Over panel so you can use it on top of the app you use to run the game:
There’s a very slim chance that any of you reading this have a copy of this board game and even if you do it’s likely a small minority that would find utility in this app. That said, I think it demonstrates what I said in my intro about making apps for yourself; I knew that this was just for me and I’m publishing it on the off-chance that somebody finds it as useful as I do. I spent far too much time matching the colours to the player boards, getting the fonts just right, and doing things like perfectly embedding the right icons for warrior and spirit tokens. It may only get single-digit downloads, but it’s an app I’m proud of.
Using a Stream Deck for iOS Development
I wrote an article about how I use my Stream Deck to help me save time when working on multiple iOS projects per day:
The process typically takes about 20 minutes to run but would take longer if I were doing it manually as there are multiple points that would require user interaction. That I can press one button and have this run seamlessly in the background is of huge benefit to me, especially if I’m doing multiple builds in a single day.
As soon as I’ve finished typing up this email I’m going to turn on my Xbox and play High on Life which launched this week. I’ve no idea if it’s good yet, but I’ve been looking forward to it for a few months. It’s developed (and partly voiced) by the guy behind Rick & Morty so if you like that show you’ll probably want to give this a go. It’s available on Game Pass.
My copy of Darkest Dungeon finally arrived… it’s the biggest board game I’ve ever owned 😂 Mythic Games ran a terrible Kickstarter for it but I think it’s going to be worth the wait given some of the gameplay videos I’ve watched. I can’t wait to get stuck in over the Christmas period.
Standard Edish - I made a promise to myself that I wouldn’t start a new run of Elden Ring if they announced some DLC for it at The Game Awards. They didn’t, so I’m gearing up to start again soon! In the meantime I’ve been scratching the itch by listening to this lovely podcast in the style of a book club as four friends journey through the game.
Andor - Yes it’s as good as everyone says. Finally a Star Wars TV show that isn’t set on Tatooine; it isn’t even mentioned! It also doesn’t include any Jedi, lightsabers, or R2 units. An excellent thriller with a mostly British cast. Highly recommended.
Wednesday - I’m a huge Addam’s Family fan so was very excited when it was announced that Tim Burton was going to be directing a TV series. It’s essentially Harry Potter meets The Addam’s Family. It doesn’t come close to the two films but it’s still worth a watch if only for Jenna Ortega’s and Christina Ricci’s excellent performances.
The roadmap is my way of committing to what I’m going to do over the next 2 weeks.
1st December - 14th December
Produce a TestFlight beta of Music Library Tracker v2.0 with Spatial Audio matching ✅
Submit Return to Dark Tower Assistant to the App Store ✅
Write an article about using my Stream Deck for iOS Development ✅
Revisit the Swift port of Ink I’ve been working on for the past year ❌
Not too bad! I completed the three most important tasks and only failed to get back into Ink as the Spatial Audio Finder required a lot more tinkering than I’d planned.
With the Christmas break coming up I expect to do a lot less for the next issue but I still have a few items I want to get through:
15th December - 4th January (Issue #3)
Issue an update on TestFlight to resolve any issues with the Music Library Tracker in anticipation of releasing it publicly in January
I built an app for myself and a friend many years ago to track our video game times. This has worked well but I recently started rebuilding it in SwiftUI using the IGDB database. It’s not far off completion so that seems like a good pre-Christmas project!
I also have an app I built for tracking the books I read (yes, I like tracking things). I built it when SwiftUI first came out and foolishly built an API for it using Vapor as I wanted to try out Swift on the server. The app needs some tidying up and I also want to replace the API.
That wraps it up for this issue. I hope you found something of interest and that you’ll be able to recommend the newsletter to your friends, family, and colleagues. You can always comment on this issue or by emailing me directly via firstname.lastname@example.org
Annoyingly the playlist will show that it has been created by “MusicLog”. This is the internal name for the app and so far there doesn’t seem to be a way to rename that. I’m going to spend a bit more time looking into that as I’d much prefer it to say “Music Library Tracker”.