Writing microtonal music in Lilypond
In the process of writing a second (and possibly a third) part to The Mystic Writing Pad I’ve been trying to figure out a way that allows me to improvise on the 43-tone scale it uses and easily transcribe the material into the notation program lilypond. After som poking around in the Scheme interface to lilypond I managed to get a transformer function working. The tranformer takes the input in which the 43-tone scale has been mapped unto the first 43 keys on the keyboard, starting with middle C (MIDI note number 60) and prints out each pitch, squeezed into its average chromatic value and prints a deviation in cents (+/- 99).
The heart of the transformation are these two functions which gets the pitch number from each note in the input. The rest is just mapping this to a list of output pitches and text scripts retrieved in the call to the (get-text mapping-table index) routine.