Newly synthdef not playing audio (following doc)

i am having trouble playing a newly synthdef.
i have followed the included tutorial , set the sonic pi preference to accept effects and i have successfully exported my synthdef into a folder… until that moment, everything was perfect :slight_smile:

Then, trying to load it into SPi, set the path and play a note… no error but no sound! :frowning:

i have read mostly all the forum topics related to supercollider and synthdef… but cant find anything that can solve this problem… what am i missing here ?

i mean, i understand supercollider quite well, and the basic code i am using cannot be the error.

the only point that informs me about a possible conflict is that after i am trying to run my code with the load_synthdefs is that i cannot play any of my buffers… like the audio server is “locked”… can be something to take in consideration, but i really want to go in synthdef, and i am sad to not be able to listen to it.

thanks for your help

Hi Uriel…

By this, do you mean you have followed this document?

A few more questions:

  • Does the SynthDef play fine in Supercollider?
  • What is your SynthDef named in the SCLang file?
  • What code do you use to try to play your new synth in Sonic Pi?

Nevertheless, it would still be useful to see the SynthDef source code to make sure it is formatted correctly for Sonic Pi use :slightly_smiling_face:

Hi Ethan, i have followed the included tutorial (inside Spi, “loading synth”

  • yes, i can listen to sound inside S-collider (with the basic demo video by Sam)
  • the name of the synth is “piTest” as it is named in the tutorial
    So, my code:

in SC, to export my synth:

         {|freq = 200, amp = 1, out_bus = 0 |
        [freq,freq],0,0.5)*, 0, 5, amp, doneAction: 2))}

this produce a synthdef file in my named folder… i think everything is fine with this

then in Spi (after activating the option to load external synth):

load_synthdefs "/Users/...myName.../Desktop/mySynths/"
use_synth "piTest"

live_loop :ping do
  play 60
  sleep 1

thats it… Spi run the code, not showing any error, but No sounds!
If you have any suggestion at this point, i would be so happy to ear my new synth :smiley: thx

There doesn’t seem to be anything wrong with the code (aside from the fact that it’s not in the format expected by Sonic Pi, so the note doesn’t actually control the frequency of the synth). I created the synth, then ran the Sonic Pi code and it generated sound on my machine.

hi emelyn,
not sure i understand what you are trying to say… the code i got is not correct for _sonic pi ?
this code works on your machine ? if yes, i need to check somewhere else to find the issue… if not, what whould be the correct code for this test ? please, seems you have experience in this :slight_smile: thx

As is, your Sonic Pi code above still plays a note for me (but only because the SynthDef file has a default value for freq).

Emlyn is right that the Sonic Pi code you have is not enough to change the actual note that the synth plays; the SynthDef expects an opt called freq - so in this case Sonic Pi must use that to affect the note/frequency played.

As for why you might not be hearing anything, not sure. It’s odd that your Sonic Pi seems to ‘lock up’ too.

Hi @uriel, sorry my response was not very clear - I just meant that the code as it is should doesn’t behave properly as a Sonic Pi synth (i.e. it doesn’t respond to the expected note), but it should at least create a sound. So if it is not doing that for you, there must be another problem with your setup (but unfortunately I’m not sure what that problem could be).

Hi Emelyn,
i have a doubt about the problem… before using Spi, i was on Tidal, and i had install SuperCollider by hand and some other softwares :frowning: (that was a mess really)

i have doubts because when i open supercollider (from this previous installation) i have sound, everything seems ok… even if i have some trouble with sclang on tidal.

In sonic pi, everything works fine, no trouble… but these new synth doesnt make any sounds :frowning:
i dont know if this can be the problem

thx for your help :slight_smile: uriel

Just a thought, but what version of Supercollider were you compiling the SynthDefs with?

hi Ethan,
SC Version 3.9.3

edit: Hooo. i just check the website and see that the last release of SC is 3.12.1 !!! problem may comes from this ! i am going to update SC and see if it is the same or not !
but mate… i didnt think about this… :slight_smile: thanks a looooooooooot :smiley:


Ah. Yes, I’m pretty certain there’s your problem :slightly_smiling_face:
SynthDefs depend on similar versions of scsynth (the sound engine of Supercollider/Sonic Pi) that they were built with, in order to play properly too :slightly_smiling_face:
(There may be some compatibility with other versions, but there are sometimes breaking changes).

Hourrra ! yeesss, perfect ! what a stupid error of mine to not check this out before :frowning: it is a shame.

Anyway… the sound is now coming out… so i can dive into this synth-maker tool will all my confidence…
by the way, do you have any extra recommendations? (i have read about in this forum and on the sonic pi website…) any other recommended sources?

ps: i do and teach synthesis from 15 years… so i know the thesis and concepts, but in case of supercollider, this is out of my knowledge right now. i just need a fresh overview of SC and a dedicate structure diagram to understand it quickly :wink:

Ah. Yes, I’m pretty certain there’s your problem :slightly_smiling_face:
SynthDefs depend on similar versions of scsynth (the sound engine of Supercollider/Sonic Pi) that they were built with, in order to play properly too :slightly_smiling_face:
(There may be some compatibility with other versions, but there are sometimes breaking changes).

Having said all that, my memory was a little faulty - I double checked, and that’s not quite right - Sorry!
There was a change in the format of the UGens in 3.9 though.

I’m not sure exactly which issue you were hitting, but it’s still probably likely that it was something to do with the old version :sweat_smile:

For learning Supercollider?

yes, 100% my fault to not having check the Sc version before… :slight_smile:

i am diving into supercollider now, of course, most of the classes and methods are quite clear and logic to me, i dont have too much pain to read it.
But Supercollider gots so much than just creating new synths for sonic pi, right!.
what i need, is more tutorials or documents regarding the creation of those synthdefs for SPi, is this is a bit special, maybe there is more tutorials out there (not only on Sc website or github)… i dont know, i just ask :slight_smile:

I’m not too sure personally of any in-depth tutorials specifically about creating SynthDefs.
There is bound to be plenty of material out there that includes information about creating SynthDefs amongst other things, even if it doesn’t focus on them specifically. It might be worth having a look at something like this? -

(For example, there is probably some useful information, if not exactly all about creating SynthDefs, then at the very least techniques for using the various UGens that make up the SynthDefs, in Scoring Sound by Thor Magnusson [Leanpub PDF/iPad/Kindle]).
Eli Fieldsteel’s Supercollider tutorial video series might have useful information in it too, even if it covers a wider range than just SynthDefs :slight_smile:)

Otherwise, maybe others including @xavierriley might know of more useful links :slight_smile:

actually, what i was looking for, came from one of your comment and from others.
as i understand (i may be wrong also), Sonic pi needs a specific writing from the synthdef… but i cant find what are those needs… what are the limitations (SC/Spi) ? and what are the special classes or methods that works when loading the synth in Spi…

About creating synthdef and play them in supercollider itself, no problem at all

Right. Yes, I mentioned that document above: (

The important constraints are mentioned in there :slight_smile:

1 Like

Ok, i didnt understand it correctly that time… sorry.
so, at final, i could use all the class and sound generators that Sc is offering, right ? there is no limitations in that sens. good to know now :slight_smile: excellent !
have an excellent day (i think you will not see me on the forum during a couple of days, until i produce my first complexe synth :wink: so coool


If they depend on UGens that are not part of either the built-in set or those that come with sc3-plugins (the community collection of UGens) then these new UGens will need to be added to Sonic Pi’s source code where we keep the plugins.

IIRC, (and someone correct me if I’m wrong!) it is not possible to use any of the language features from SCLang, as that is not bundled with Sonic Pi (we only make use of the server, not the language runtime currently).

1 Like