Music

Purging "PMEDIA" spam from my music library with Beets and Mutagen

I have been cleaning up my music collection, which I have ripped from CDs over the years, finally getting around to tagging them properly. I used MusicBrainz Picard to tag my music, but what I didn’t know is that it was adding a bunch of tags which contain ‘PMEDIA’ (even in places like the composer field, which makes no sense).

Seeing this as annoying, I needed a way to clean up my tags to remove this unwanted metadata. Since I have imported the music via beets.io, I was able to use that to help fix up the metadata. However, I ran into several albums in my library where the “PMEDIA” watermark kept reappearing, even after Beets reported that the fields had been successfully cleaned and synced.

MusicXML/MIDI for Arduino

For a recent project I wanted to add music.

Being that I am not musically talented in any way I figured the best way to do this was to generate the music from a midi file.

To help with this I wrote a converter that would take a MusicXML file and output an include file.

It simply reads the XML and outputs an array where each note is stored in two uint16 values - the first is the note name as a defined in pitches.h (ie NOTE_C4), the second is the duration in milliseconds. The entire array is stored in PROGMEM so as to not use up too much ram on the AVR.