Re: Linking parameters across Ndefs

[email protected] Fri, 30 Apr 2021 09:25:58 -0400
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <CANMt1ts2oQMuigNjSsU8kx=yHRn1NYTfJOuqjueH2XNiQTTb2A@mail.gmail.com>
Thanks Fredrik! I'll play around with both suggestions. The second one
might actually work better for me

On Fri, Apr 30, 2021 at 7:34 AM <[email protected]> wrote:

> i think the 'third Ndef' that you mention is really flexible...
>
> Ndef(\param, 0);
> Ndef(\a, {SinOsc.ar(Ndef(\param).kr(1).exprange(200, 2000), 0,
> 0.25)!2}).play;
> Ndef(\b, {Pan2.ar(WhiteNoise.ar(0.1), Ndef(\param).kr(1))}).play;
>
> Ndef(\param, 0.6);
> Ndef(\param, -0.6);
> Ndef(\param, {LFNoise1.kr(10)});
> Ndef(\param, 0);
> //etc. or set \param like above using midi or gui
>
> Ndef(\a).clear;
> Ndef(\b).clear;
> Ndef(\param).clear;
>
> i would use that.
>
> another way is to somehow collect all your Ndef and manually set the
> parameter.  e.g. by looking in the parent proxyspace.
>
> Ndef(\a, {|param= 0| SinOsc.ar(param.linexp(-1, 1, 200, 2000), 0,
> 0.25)!2}).play;
> Ndef(\b, {|param= 0| Pan2.ar(WhiteNoise.ar(0.1), param)}).play;
>
> //find other nodes in same proxyspace and set param
> Ndef(\a).proxyspace.do{|n| n.set(\param, 0.6)}
> Ndef(\a).proxyspace.do{|n| n.set(\param, -0.6)}
>
> //same thing as
> [Ndef(\a), Ndef(\b)].do{|n| n.set(\param, 0.6)};
> [Ndef(\a), Ndef(\b)].do{|n| n.set(\param, -0.6)};
>
> //and same
> Ndef.all.localhost.do{|n| n.set(\param, 0.6)}
> Ndef.all.localhost.do{|n| n.set(\param, -0.6)}
>
> Ndef(\a).clear;
> Ndef(\b).clear;
>
> _f
>
> > 29 apr. 2021 kl. 03:59 skrev [email protected]:
> >
> > Hi List,
> >
> > How would I go about linking parameters of separate Ndefs so that, for
> example, setting the \freq argument in Ndef(\a) also changes the \pan
> argument in Ndef(\b)?
> > I know it's possible to use a bus (or a third Ndef which can double as
> an LFO) and map that to the two other Ndefs, but I am wondering if there is
> a better/more convenient method.
> >
> > Thanks!
>
>
>   #|
>      fredrikolofsson.com     musicalfieldsforever.com
>   |#
>
>
> _______________________________________________
> 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/
>