Anki for music — after 5+ years

marie baldys
9 min readFeb 28, 2019

--

Logo for AnkiDroid Flashcards

It’s spring of 2022, and it’s been over 5 years since I started my journey with Anki. I wrote this story as I was starting to use Anki to keep track of the music I was learning. I wrote an update in 2018 after one year, and this one in 2019, after two years of using Anki. Some things happened in 2020 that caused me to not write an update that year; now 5 years have passed, much ground has been covered, and I’d like to take a look at where I am here in 2022, and reminisce a bit about how I came to be here.

The first thing that I need to say, right off the bat, is that I’m not using Anki any more, not on any device. But if it were not for Anki, I wouldn’t have any of what I’m about to show you. Anki offers a really valuable tool, it offers it for free to Android and PC users, and it’s open source. It publishes its schema on gitHub, which enabled me to easily extract my data from it.

Anki is truly a role model for all of us in the software world to emulate.

Breaking up with Anki

Back in 2019, very shortly (it felt like minutes, but was probably a couple of weeks) after writing my update, Anki released a new version, a major revision that promised a lot of cool features that I thought I should check out. I downloaded the new version, and almost immediately hated it. This was not Anki’s fault! I am a creature of extreme habit, and there were just things I didn’t like about the look and feel of it when I first saw it.

I complained about it to a programmer friend, who said, “I think Anki is open-source and written in Python, so you can probably just write an overlay for it!” And it turned out to be true — Anki is amazingly open-source-friendly, and has a huge user community who have written hundreds and hundreds of overlays for Anki, doing all sorts of cool things.

Well, that sent me down a whole rabbit hole of investigation, and I spent probably several months getting acquainted with some of the overlays that were out there, looking at people’s code, and trying to get started. Months and months, but, you know, it got to be summertime, and summertime used to be full of all kinds of social events and stuff, so I didn’t make much progress because I never got any traction on it. Also not at all Anki’s fault.

By fall, I was back in my old routine, and had totally gotten used to the new Anki, and couldn’t imagine why I had thought I needed to improve on it. Instead of incorporating the very cool browser I had written into an overlay, I just continued as I had been, refreshing the data in my browser every day after I played (I had a little icon on my desktop that would do it painlessly).

Since I wasn’t coding much at all, I was playing a LOT of songs, and it wasn’t long before I was fairly caught up and didn’t have too much of a backlog of music that was “overdue”. And that’s when I started to notice some odd things.

Anki has its own algorithm for implementing “spaced separation” and helping you to learn the material you’ve put into it. The way I play music, and what I was trying to use Anki to do, doesn’t perfectly fit into the model. Sometimes I want to play songs often because I’m learning them, but other times, I want to play a certain song often because I like it and it makes me feel good to play it. Anki, of course, had no way to know the difference between those two situations.

In practice, what seemed to be happening is that I would lose track of some pieces of music, and they would just never come up. And it seemed to happen most with new songs that I was adding — Anki was prioritizing “reviewing” material that had already been mastered, before showing me newly-added material that I was trying to learn. I suspected this, but I couldn’t really prove it, because I couldn’t find any place in Anki to easily see what was happening.

So I started taking notes. I’d tell Anki to make a particular song come up again in a month, and I made a note of the date that I did this right on the card, so the next time it came up, I could compare what I had tried to tell it to do with what it actually did. I started to get paranoid that Anki was “lying” to me.

By the new year in 2020, I was getting ready to write my next “update”, and I realized I couldn’t do it, because I had stopped having unquestioning faith in Anki. Then in late January, my buddy that I have a duo with started to have some health problems, and had to take a month or so off playing, so I suddenly had some time on my hands. And I realized that it wouldn’t really be that hard to add the scheduling functionality to my browser. So I did that.

So now I spent a weird couple of weeks where I used Anki and my Songbook app in parallel. My app was doing the scheduling perfectly, but I hadn’t written an entry system for the songs — to add a new song to the collection, you would have to first put it into Anki, and then port it over to my app. But I spent a couple of weeks parallel testing to make sure it did the scheduling the way I wanted it to before I even thought about committing to writing an entry mechanism for it. I figured I’d make a decision, and then my Medium update for the year would be about the decision and how I made it.

Which brings us to March, 2020, when the pandemic hit.

Pandemic insanity

So then we went into lockdown, and I had tons of time to code, but also, I had a very strong emotional need to get the piano every day. And now, the software I was using when I played was the software I was working on when I coded. So I have created this feedback loop where I put in a new feature that I want, go to the piano the next day, and am immediately bombarded with ideas for more new things that I want. It’s kind of nuts, and it still hasn’t really settled down, even though it’s now been two years since this cycle started.

So here’s what the home screen of my Anki add-on looked like 3 years ago:

Home screen of my Songbook page in 2019.
Songbook home page in 2019

Here’s what it looks like today:

Songbook home page 2022

It doesn’t look much different, really. But under the hood, things have really changed! The first functionality I incorporated was the Anki scheduling stuff. And then I had to write an entry mechanism for new songs. This is what that looks like:

Songbook edit screen, 2022

On this screen, I can see all the data associated with a song, as well as edit it. I can add tags and links, see the review history for the song, and schedule when I would like it to come up again next. All on this one screen. I took all the data that I had trouble finding in Anki (but which I knew it had, because I could extract it from the data base — it just wouldn’t show it to me easily), and put it in one place.

Also, a big change from Anki with regard to scheduling the next review: instead of letting Anki decide when the song comes up again, I can just decide. The buttons that I have on the screen (1 day, 3 days, etc.) are completely configurable in the system. And when I put it on the schedule, that’s when it comes up — no more fuzzy algorithm, just putting it on the calendar like a grown-up.

This change alone was huge, and made me very happy, and I spent the rest of 2020 just basking in it. Then in November of 2020, our website crashed, and our former hosting service, Network Solutions, solved the problem by removing functionality that we had come to depend on.

So we created a new site on Digital Ocean, with tons more functionality, and, more importantly, tons more security and control over our website. It took us several months to move everything from the old site to the new one, but now we are all settled in the new home of ToMarGames!

Hooktheory and Ultimate Guitar Tabs

But by spring of 2021, vaccinations were happening, and I was ready to take this thing in some new directions. The more I had, the more I wanted. I was getting used to having my laptop at the piano, and I wanted a way to be able to put chord charts and lyrics in for songs, so that I could look at them while I played.

Hooktheory is a site where you can put music in, and it does the music theory analysis for you. Music theory is something that I have always been very interested in. But Hooktheory’s representation and display of the music was not exactly what I wanted. What I wanted was what you get from a site like Ultimate Guitar Tabs, which has all kinds of songs in there for you to access, but doesn’t do any theory analysis. And of course neither of those sites will keep track of your personal music catalog and schedule it for you, so what I actually wanted was all 3 of those things rolled into one.

By summer of 2021, I was starting to have it, and now, I’ve had it for a year. On my edit screen for a song, there is a text area that looks like this:

Chart input for “Razor Boy”, by Steely Dan

Basically, this is just the words and chords to a song, but there are also these “meta lines”, enclosed in brackets, that tell the system about the words and chords. KEYIN reflects the key that you entered the chords for, but KEYOUT can be a different key, so you can use it to transpose songs to different keys. If you click the CHART button on the left of the panel, it displays output for the input you gave it. For this song, it looks like this:

Chord chart for “Razor Boy”, as rendered by Songbook

Where I am now

So that brings us to the present. The home screen and edit screen haven’t changed much in over two years, and so are due to be revamped as soon as I can get to it. I’m happy (for the moment) with how the charts are rendering, but the theory engine that powers them is over a year old, and many cracks are showing. It does really well with relatively simple music, but if you throw something weird at it, it balks, so that’s something I’m working on.

I’ve implemented a repository structure, whereby there is an owner role, but then there’s also a user role, and the owner can open it up to anyone that they would like to be able to use the site. I have a repository for each of my musical projects, co-owned by the other members of the musical group. I have made charts for over a hundred of the songs I do, and created a mechanism for users of my repository to import charts into their own repositories, similarly to the way Anki allows users to import decks from other users.

This software is not ready for prime time yet, but it is definitely ready to begin to be used by other people who might benefit from it. If you think you might be such a person, you can contact me through this platform, and we can talk about getting you set up to use it.

Thanks for reading!

--

--