Compiled synth not working

Hi, sorry if I’m missing anything obvious, but I wanted to try making my own synth sounds for Sonic Pi. I found “TheManual”, but mostly saw that I needed to compile a synth file to a synthdef file.

Even though this is my first time trying it, it looks like I was able to create a synthdef file fine in Supercollider by loading an .scd file and then running “Language → Evaluate file”. I got some errors at first while I struggled with path arguments for “writeDefFile”, but eventually I got the console output of “-> a SynthDef” and it wrote the .scsyndef file where I told it to.

In Sonic PI, I pointed to my directory and did load_synthdefs "~/Documents/projects/synths/"
Unfortunately it crashed with a runtime error saying the promise timed out after 5 seconds. I tried a simpler synth - “myfirstsynth” from “TheManual” and it did the same thing.

Then I went to the Sonic PI github repo and downloaded a synthdef file and dropped it in that folder and it worked just fine! It was a synth that was already built into Sonic PI, so no idea if it was playing the copy or the original.

Does anyone know why it won’t recognize my compiled synths? Is there a versioning issue with Supercollider maybe? I’m using SC 3.13.0 and Sonic PI 4.5.

thanks!

There is an option, under Prefs/Audio, to enable external synths

Much appreciated, but I did have that enabled. It also, IMO, wouldn’t explain why dropping MY compiled synth in the path would produce the error, but dropping an official Sonic PI synth (from their github repo) would not produce the error.

Have you read the synth design doc?

Hey thanks for pointing me there. I think I skimmed it previously. Seeing it again though drilled in that I was doing something dumb.

When I was originally having trouble with the writeDefFile function (I think I didn’t understand it was just the folder I was passing here), I stumbled on an alternate function writeDefFileOld which had the name of the synth as the first argument.

Suggesting I read this again helped! I really just thought writeDefFileOld was an alternate syntax for the same thing

Regardless, I heard the simple “firstsynth” from TheManual when I ran my Sonic Pi script. So thanks much!

1 Like