SC tries to add zombie synthdefs when booting resulting not being able to add new synthdefs

Hello!

I did some NRT synthesis in which I generated a lot of instances of a synthdef. Everything worked fine,
but when I reopen SC and s.boot I get this repeated too many times

ERROR: Could not add SynthDef [ sin1064 ].
Try adjusting ServerOptions:maxSynthDefs or the -d cmdline flag.

this is repeated so many times that I cannot see anything else in the Post window and when I try to scroll up. When I want to add a new synth I get the same error having as a result not being able to run any SynthDef at all

ERROR: Could not add SynthDef ws.
Try adjusting ServerOptions:maxSynthDefs or the -d cmdline flag.

How could I remove all those zombie synths from loading when booting so I can load a synthdef again? even if I increase the number of maxSynthDefs nothing happens…

I tried Server.killAll etc but no luck

thank you

SynthDef.synthDefDir.openOS and delete them.

Many NRT tutorials recommend .writeDefFile to set up synthdefs for NRT. I strongly discourage this practice for exactly the reason you found: the defs never get deleted from disk, and then you’re stuck with them forever.

Non-Realtime Synthesis (NRT) | SuperCollider 3.12.2 Help says:

For SynthDef, there is no addMsg or recvMsg method. Add SynthDefs into the Score as follows:

[0.0, ['/d_recv', SynthDef(...).asBytes]]

hjh

@jamshark70
Thank you for the reply! that did the job!
May I ask if the synthdefs folder is suposed to be empty, because there are some other synthdefs there, should I erase all of them? There might be there from previous times, but I do not want to delete something I am not supposed to, that’s why asking…

thanx a lot!!!