Quantcast

Ndef Synth Loss

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Ndef Synth Loss

emma.sue.mack
Hi All There -
I'm new to the list, so please let me know if I'm asking questions correctly.
So, I've set up a Node situation, with a pattern playing a SynthDef on
the first index point.
On the 10th index point, I've put a looping Task with a filtering
function that turns FreeVerb on and off..

Unfortunately, I get the following message:
*** ERROR: SynthDef temp__0-1867318382_1001 not found
FAILURE IN SERVER /s_new SynthDef not found

Any idea what I'm doing wrong?


This is the code:

a = NodeProxy.new;
a.play;

a.fadeTime=1;
a[0]=Pdef(\yada);

Pdef(\yada,
Pbind(
\instrument, \simmple,
\degree, Pseq([1, 2, 0, 3, -1, 4], inf),
\atk, 0.01,
\dec, 0.3,
\amp, 2,
\dur, 0.1,
\stretch, 2
));



SynthDef(\simmple, { arg out=0, amp=1, pan=0, gate=1, freq=120, dec=1, atk=0.1;
       var sig, killenv;
       killenv = EnvGen.ar(Env.adsr(0.01, 1, 0.2), gate, doneAction:2);
sig = SinOsc.ar(freq, 0, 0.8);
       sig = sig * EnvGen.ar(Env.perc(atk, dec)) * amp;
Out.ar(out, sig);
}).add;


a[10] =
Task({loop({
a[1001] = nil;
(1.0.rand+0.1).wait;
a[1001] = \filter->{|sig|FreeVerb.ar(sig, 1.0.rand, 1.0.rand, 1.0.rand)};
(1.0.rand+0.12).wait;

})});

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Ndef Synth Loss

Kuivila, Ronald
The problem is guaranteeing that the Server has time to create the Synth before getting rid of it.
A "sync" message should get rid of it  But you can also define a SynthDef to do the filtering...

Below is a SynthDef for the reverb and then the routine with the sync message added and the
synthdef alternative commented out:

SynthDef(\verb, { | out, fadeTime, gate = 1 |
        var xfade = Linen.kr(gate, fadeTime, 1, fadeTime, 2).squared;
        XOut.ar(out, xfade, FreeVerb.ar(In.ar(out, 1), Rand(0, 1.0), Rand(0, 1.0), Rand(0, 1.0)) )
}).add;

a[10] =
Task({loop({
a[1001] = nil;
(1.1).wait;
a[1001] = \filter->{|sig|FreeVerb.ar(sig, 1.0.rand, 1.0.rand, 1.0.rand)};
s.sync;
//a[1001] = \verb;
(1.0.rand+1.12).wait;

})});


RJK

> On May 12, 2017, at 5:38 AM, [hidden email] wrote:
>
> a = NodeProxy.new;
> a.play;
>
> a.fadeTime=1;
> a[0]=Pdef(\yada);
>
> Pdef(\yada,
> Pbind(
> \instrument, \simmple,
> \degree, Pseq([1, 2, 0, 3, -1, 4], inf),
> \atk, 0.01,
> \dec, 0.3,
> \amp, 2,
> \dur, 0.1,
> \stretch, 2
> ));
>
>
>
> SynthDef(\simmple, { arg out=0, amp=1, pan=0, gate=1, freq=120, dec=1, atk=0.1;
>       var sig, killenv;
>       killenv = EnvGen.ar(Env.adsr(0.01, 1, 0.2), gate, doneAction:2);
> sig = SinOsc.ar(freq, 0, 0.8);
>       sig = sig * EnvGen.ar(Env.perc(atk, dec)) * amp;
> Out.ar(out, sig);
> }).add;
>
>
> a[10] =
> Task({loop({
> a[1001] = nil;
> (1.0.rand+0.1).wait;
> a[1001] = \filter->{|sig|FreeVerb.ar(sig, 1.0.rand, 1.0.rand, 1.0.rand)};
> (1.0.rand+0.12).wait;
>
> })});
>


_______________________________________________
sc-users mailing list

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