Making sense of music tracker songs
I am a huge fan of the electronic music producer Bogdan Racczynski. He got me in electronic music from the song Bog’s Basil & Curry Powder Potatos Recipe he made on Ulver’s 1993–2003: 1st Decade in the Machines CD, you can listen to it here if you want.
When I was in university, I’ve been frantically searching for ways to buy his music which proved pretty hard at that time (now he’s on bandcamp…), and I wanted original physical stuff, not mp3 ripped off somewhere… So I ended up buying vinyls on ebay, CDs from discogs or anywhere I could find stuff I didn’t own already. I thought I had the complete collection but then I stumbled across an archive on the net that contained about a hundred of his works in original format. This archive was a gold mine for me as I was playing with tracker music and it gave me rare insights into how his tracks were made.
What is a tracker?
Interlude here for people who might not know what is a tracker, here is the first paragraph from Wikipedia:
A music tracker (short version tracker) is a type of music sequencer software for creating music. The music is represented as discrete musical notes positioned in several channels at discrete chronological positions on a vertical timeline. The file format used for saving songs is called a module file.

Making sense of it all
So I was sitting on a bunch of module files but they were not part of my music library, it’s a shame because there were some really nice songs, I decided to try and parse them using Golang to extract some metadata that I’d find useful when looking over that collection, some common things we can get out of binary files are:
The archive was composed of 76 .it (Impluse Tracker), 10 .xm (Extended Module) and 13 .s3m (Scream Tracker) files, I reasonably started with parsing the .it files.
Setup to parse binary files in Go
The spec was not hard to find but it was also not really precise… I had to make a good guess at the signedness of a few fields, it was nicely drawn however which made it pretty easy to map directly to the binary file I was watching in an hex editor at the same time:

Here was my setup which I recommend if you’re going to parse binary files
- Top left: chrome with specs opened (would have been better to print them out but I was lazy and didn’t want to waste paper…)
- Top right: Atom editor with go-plus plugin installed (runs tests on save, auto format, auto import, etc.)
- Bottom left: Terminal
- Bottom right: HexFriend, a free hex editor that I really like
See how you can resize HexFriend to nicely map to the txt format of the spec? that made my first parsing of .IT files really smooth, I could look at the spec, select a few bytes in HexFriend and check that the values made sense ( always trust but verify, specs are never 100% accurate per experience…).
Parsing binary data in Go
So how do you go around parsing a simple header like the one above in Go? At first I thought the binary.Read function was not working for structs and I started writing my own version, implementing a few types that I knew I was going to need, but it turns out I was just using non exported struct fields (lowercase ones…) 🤦, that sorted out what you need to do is define a struct with fields that map to the binary data, using proper length and signedness, then just use binary.Read to unpack the data into this struct:
Note that you can ignore certain parts of the spec by using the _ field name and the reader will advance up to its type size.
That’s basically the gist of it, I just went through the specs of .it and .xm files, the .xm file was not defined in a structured manner as the .it file which made using HexFriend less friendly but it was still easy to parse.
Making sense of it all
With that done, all the metadata was available and I just rendered it in a simple html template still using Golang, importing the Material Design Lite CSS from Google to make it look nice and I could browse through my library in a useful way :-)
There are a few things left to do, notably:
- parsing .s3m files, I don’t really like the songs that are in this format so didn’t feel the need to parse those…
- getting the total length of the song (which requires parsing the whole file and interpreting tempo changes etc)
- visualize the instruments metadata too, often times the artists left messages in the instruments names because their layout made it look like a text file, so prone to comments…

- make tracker music again!
The flow of creating songs in a tracker is quite different from (now far more used) DAWs but because of that you end up with quite different songs and it makes a few glitches and effects easier to use so it is quite tailored for Drum’n’Bass, IDM or Jungle for instance. I put all the code in github as usual, feel free to check it out, send PRs or simply use it if you want to look at a collection of modules!
Appendix
You want to start making tracker music? I recommend Renoise these days, the interface is the slickest and is under active development.
You just want to listen to such music? on Windows I use foobar2000 as my player, otherwise VLC can read them all too.
You want to watch some incredible use of a Tracker? watch Vache made by Venetian Snares and cry.