Does anyone know the direct code extension I would use to add in sound fonts to Sonic Pi? I want to be able to code music using digital sound fonts that are outside the program.
Hi @Alexia,
As far as I am aware, this would require changes to be made to SuperCollider, the sound engine that runs underneath Sonic Pi, as that itself doesn’t directly support playing of sound fonts. (Or at least, work to be done on a SuperCollider plugin that can be used in Sonic Pi). There was an issue raised to discuss this on a relevant GitHub page a while ago but nothing much has come of it - see https://github.com/supercollider/sc3-plugins/issues/144
Hi @Alexia,
This project has some code for converting soundfonts and using them in Sonic Pi. I’ve not tried it or used it myself; a few months ago I tried loading the Midiot base code and it appeared to work OK, but I didn’t try any of the functions. My interests are more related to converting MIDI files for use.
https://github.com/mojoD/hack-spi/wiki/2)-Soundfonts-and-sf2sonicpi
One option that might be worth exploring is to find another piece of host software for the soundfont that can respond to MIDI or OSC events. Then in your code, rather than playing notes directly, you’d send a MIDI or OSC message to trigger the desired sound.
I would need to see a tutorial video to understand how to do that better.