[sc-users] Crucial conceptual gap (was: Re: Crucial Patch get current value)

Dionysis Athinaios adroid28 at yahoo.gr
Tue Apr 22 18:10:47 PDT 2008


Thanks you so much for your help felix. Get and Set is working perfectly now
:)

I have however encountered a new problem and hope you can help me... 
I am trying to create a class that uses an instrument as an input to create 
an InstrSpawner. In my mind I thought that an Instrument used in an
InstrSpawner
(or anywhere ellse)could produce multiple events from one definition. 
What happens though is that when I try to create more than one
InstrSpawner's
from the same instrument I get their controls mixed up! 

In the following example (use a short sound as buffer input) 
if I run the first spawner and then the second 
the pan argument gets messed up. It dont think it is replaced... 
maybe added or something...



> 
> (
> 
> Instr(\SoundCrumbleMain,{
>  
> arg rate=1.0, buf, volmin= 1.0, volmax= 1.0, pan=1.0, spread = 0.0, 
>        amp = 1.0, att = 0, rel = 0.1, dec = 0.1, conPan = 1.0;
>        
> var out, env,volRange;
> 
> out = Pan2.ar( PlayBuf.ar(1, buf, BufRateScale.kr(buf)*rate),
> (conPan*Rand(pan - spread, pan + spread)).fold(-1.0,1.0)); //conPan stands
> for movement of each individual sound
> env =  EnvGen.ar(Env.new([0,1.0,1.0,0],[att, dec, rel],'sine' ), 1.0, amp,
> doneAction: 2);
> volRange = Rand(volmin, volmax);
> env*volRange*out;
> 
>  }
> ,[\rate,
>   \rate,
>   [0, 300, \linear],
>   [0.0,1.0,\exp],
>   [0.0,1.0,\exp],
>   \pan,
>   [0.0,1.0,\linear],
>   \amp,
>   [0, 15, \linear],
>   [0, 15, \linear],
>   [0, 15, \linear],
>   \pan
>   ]);
> );
> 
> //////////////
> 
> InstrSpawner(\SoundCrumbleMain, [Pbeta(0.4, Prand((4,4.0001..15), inf), 1,
> 0.4, inf), 
>  Prand(~felos .collect{arg item, i; item.bufnum},inf),
>  1,
>  1, 
>  Patch({MouseY.kr(-1, 1)}), //pan
>  0,  
>  KrNumberEditor(1,\amp)], 0.1).play;
>  
>  //////
>  
> InstrSpawner(\SoundCrumbleMain, [Pbeta(0.4, Prand((4,4.0001..15), inf), 1,
> 0.4, inf),
> Prand(~wood_cracks_SFL .collect{arg item, i; item.bufnum},
>  inf),
>  1,
>  1,
>  Prand((-1,-0.99..1), inf), //pan
>  0,
> KrNumberEditor(1,\amp)], 0.05).play;
> 
> 

I'll be gratefull for any help

Best

Dionysis

-- 
View this message in context: http://www.nabble.com/Crucial-Patch-get-current-value-tp16789169p16828773.html
Sent from the Supercollider - User mailing list archive at Nabble.com.



More information about the sc-users mailing list