[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] ERROR: SynthDef xxx not found: Please help



Hi,

the problem here is that this SynthDef is not correct, when you try to add the SynthDef to the server it has several errors:
I can point out some incorrect code here, but I'm not sure I understand what you wanna achieve with this SynthDef

First error is here:
  freq2 = freq2*LFPulse.kr(6, add:1);
You are using freq2 variable, before assigning a value to it.

After that, when you put a signal in the Freeverb, that signal have to be audio rate, and not kr.

I guess you wanted to write something similar to this, but I still do not understand your dsp approach ;)

(
SynthDef.new(\pulseTest, {
  arg fund=40, maxPartial=8, width=0.5;
  var freq1, freq2, sig1, sig2;
  freq1 = LFNoise0.kr(4).exprange(fund, fund*maxPartial).round(fund);
  freq2 = LFNoise0.kr(4).exprange(fund, fund*maxPartial).round(fund);
  sig1 = freq1*LFPulse.ar(8, add:1);
  sig2 = freq2*LFPulse.ar(6, add:1);
  sig1 = FreeVerb.ar(sig1, 0.7, 0.8, 0.25);
  sig2 = FreeVerb.ar(sig2, 0.7, 0.8, 0.25);
  Out.ar(0, sig1);
  Out.ar(1, sig2);
}).add;
)

Now if you issue: x = Synth.new(\pulseTest); it will work ... this is a sort of 'broke your speaker' Synth, but anyway

Last advice, if you're a newbie try to use the least possible 'cut'n paste' , if you write each line of code you will discover implementation errors, logic errors and finally you will remember the classes and methods you're using.

have fun
:Dan

On 21 December 2016 at 14:37, battuta <onertaylanozturk@xxxxxxxxx> wrote:
I really get pissed, iam a newbie in sc and this "Synth", "SynthDef" commands
sometimes works sometimes dont
it gives the error message ERROR: `SynthDef pulseTest not found`

Same code starts to work sometimes. I couldnt get the logic: WHY?
i look for this on forums and some people suggest "s.synth" and "wait"
parametres, i tried all of these but still i got the problem.

Is there anybody, could explain the cause of the problem and suggest a
solution?

Thanks in advance

here is the code:

 (
    SynthDef.new(\pulseTest, {
        arg fund=40, maxPartial=8, width=0.5;
        var freq1, freq2, sig1, sig2;
        freq1 = LFNoise0.kr(4).exprange(fund, fund*maxPartial).round(fund);
        freq1 = LFNoise0.kr(4).exprange(fund, fund*maxPartial).round(fund);
        freq1 = freq1*LFPulse.kr(8, add:1);
        freq2 = freq2*LFPulse.kr(6, add:1);
        sig1 = FreeVerb.ar(sig1, 0.7, 0.8, 0.25);
        sig2 = FreeVerb.ar(sig2, 0.7, 0.8, 0.25);
        Out.ar(0, sig1);
        Out.ar(1, sig2);
 }).add;
)

   x = Synth.new(\pulseTest);




--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/ERROR-SynthDef-xxx-not-found-Please-help-tp7629648.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/