[Sc-devel] BUG: Pan2

Joshua Parmenter josh at realizedsound.net
Thu Jun 7 08:40:56 PDT 2007


Not happening for me... even with a Lag:

{Pan2.ar(WhiteNoise.ar(1), 0, Lag.kr(MouseX.kr(0, 1)))}.play(s)

I can still look at it though if you can send me a small chunk of  
code that is a problem for you.

Josh

On Jun 7, 2007, at 5:16 AM, James Harkins wrote:

> Moving to sc-devel --
>
> I'm having the same problem again this morning, but now I'm making  
> sure all the Pan2 inputs are not lagged.
>
>   unit 26 Pan2
>     in  0.0187226 0 0
>     out 2.13433e+14 2.13433e+14
>
> *** How can this be fixed? ***
>
> This is so obviously a bug. Since the level input to Pan2 here is  
> 0, the output should be 0. Where the @#$^ am I getting ...e+14?
>
> James
>
>
> On Jun 1, 2007, at 8:47 AM, James Harkins wrote:
>
>> On Jun 1, 2007, at 8:37 AM, James Harkins wrote:
>>
>>>   unit 29 Pan2
>>>     in  0.00127762 0 0
>>>     out -5.52374e+14 -5.52374e+14
>>
>> Eureka...
>>
>> This patch behaves as expected (output is silent until you trigger  
>> the "trig" input).
>>
>> Instr("droptest", { |hifreq = 8957, step = 20, tfstart = 1.2,  
>> tfend = 15, dur = 5, excdecay = 0.16, trig, pan, env|
>> 	var	tfreq = EnvGen.kr(Env([tfstart, tfstart, tfend], [0, dur]),  
>> trig),
>> 		droptrig = Dust.kr(tfreq) > 0,
>> 		decay = Decay2.kr(droptrig, 0.01, excdecay),
>> 		exc = PinkNoise.ar * decay,
>> 			// droptrig + trig because the reset trigger doesn't change the  
>> output value
>> 		fscale = Demand.kr(droptrig + trig, trig, Dseries(hifreq,  
>> step.neg, 100)),
>> 		sig = DynKlank.ar(`[ [ 0.51248059790605, 1, 0.25306136084297,  
>> 0.64040043562537 ],
>> 			[ 1, 0.76562500842071, 0.093364206025829, 0.5625000144355 ],
>> 			[ 0.050323592917544, 0.041781926270382, 0.015860049882627,  
>> 0.032199049788433 ] ],
>> 			exc, freqscale: fscale);
>> 	Pan2.ar(sig, pan, EnvGen.kr(env, trig, timeScale: dur,  
>> doneAction: 0));
>> }, [\freq, #[1, 100, \exp], #[0.5, 20, \exp], #[0.5, 20, \exp],  
>> NoLagControlSpec(1, 20), #[0.05, 0.5, \exp], TrigSpec.new,  
>> NoLagControlSpec(-1.0, 1.0, \lin, 0, 0), EnvSpec(Env.perc(0.01,  
>> 1.0))]);
>>
>> p = Patch("droptest", [nil, nil, nil, nil, nil, nil,  
>> SimpleTrigger.new]);
>> p.args[6].trig(1);
>> p.free;
>>
>>
>> This patch blows up (even before sending the trigger). Note that  
>> the duration argument's spec now allows a lag -- the working  
>> version uses NoLagControlSpec(1, 20), the bad one uses ControlSpec 
>> (1, 20).
>>
>> Instr("droptest", { |hifreq = 8957, step = 20, tfstart = 1.2,  
>> tfend = 15, dur = 5, excdecay = 0.16, trig, pan, env|
>> 	var	tfreq = EnvGen.kr(Env([tfstart, tfstart, tfend], [0, dur]),  
>> trig),
>> 		droptrig = Dust.kr(tfreq) > 0,
>> 		decay = Decay2.kr(droptrig, 0.01, excdecay),
>> 		exc = PinkNoise.ar * decay,
>> 			// droptrig + trig because the reset trigger doesn't change the  
>> output value
>> 		fscale = Demand.kr(droptrig + trig, trig, Dseries(hifreq,  
>> step.neg, 100)),
>> 		sig = DynKlank.ar(`[ [ 0.51248059790605, 1, 0.25306136084297,  
>> 0.64040043562537 ],
>> 			[ 1, 0.76562500842071, 0.093364206025829, 0.5625000144355 ],
>> 			[ 0.050323592917544, 0.041781926270382, 0.015860049882627,  
>> 0.032199049788433 ] ],
>> 			exc, freqscale: fscale);
>> 	Pan2.ar(sig, pan, EnvGen.kr(env, trig, timeScale: dur,  
>> doneAction: 0));
>> }, [\freq, #[1, 100, \exp], #[0.5, 20, \exp], #[0.5, 20, \exp],  
>> ControlSpec(1, 20), #[0.05, 0.5, \exp], TrigSpec.new,  
>> NoLagControlSpec(-1.0, 1.0, \lin, 0, 0), EnvSpec(Env.perc(0.01,  
>> 1.0))]);
>>
>>
>> p = Patch("droptest", [nil, nil, nil, nil, nil, nil,  
>> SimpleTrigger.new]);
>> p.free;
>>
>>
>> Pan2's level input is an EnvGen whose timeScale is controlled by  
>> the lagged "dur" synth control. This, apparently, in this  
>> situation causes Pan2 to output an incorrect signal.
>>
>> hjh
>>
>> : H. James Harkins
>> : jamshark70 at dewdrop-world.net
>> : http://www.dewdrop-world.net
>> .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
>>
>> "Come said the Muse,
>> Sing me a song no poet has yet chanted,
>> Sing me the universal."  -- Whitman
>>
>
>
> : H. James Harkins
> : jamshark70 at dewdrop-world.net
> : http://www.dewdrop-world.net
> .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
>
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal."  -- Whitman
>
> _______________________________________________
> Sc-devel mailing list
> Sc-devel at create.ucsb.edu
> http://www.create.ucsb.edu/mailman/listinfo/sc-devel

******************************************
Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own  
interpretation of how modern society is structured: whether actively  
or passively, consciously or unconsciously, he makes choices in this  
regard. He may be conservative or he may subject himself to continual  
renewal; or he may strive for a revolutionary, historical or social  
palingenesis." - Luigi Nono


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.create.ucsb.edu/pipermail/sc-devel/attachments/20070607/5dffc9c4/attachment-0001.htm


More information about the Sc-devel mailing list