Sonic Pi MidiFile Player CODE NOW PUBLISHED

EDIT The code for the MidiFile Player is now published. Full details of how it works, how to set it up and downloads are available at the link below.

First look at my Sonic Pi MidiFile player undergoing testing. This version has TouchOSC support to allocate synths to be used, which can be altered as the file is playing. Also three volume settings. It can be used with preset synths and volume without the TouchOSC controller. I am currently testing a wide range of midi files of differnt genre, and it performs quite well. Not up to the standard of a fully fledged midiFile player, but very passable. It works by looking at midi_on messages and starting notes with a 5 second sustain. The note channel and value are saved, and when a note_off or a note_on with velocity 0 is received with corresponding midi number and channel the playing synth is killed. It works with up to 16 channels, and by default uses channel 10 to drive a GM midi set of percussion samples. You could substitute your own samples if you wish.
This has been a very interesting project to do and I am pleased with the results.

4 Likes