Fleshed out miditools.