[Sc-devel] BUG: Pan2

Joshua Parmenter josh at realizedsound.net
Thu Jun 7 13:11:23 PDT 2007


Then it doesn't seem like bug with Pan2. If you need Instr or Patch  
to do it, there seems to be a bug in Instr or Patch.

Josh

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

> Use the Instr/Patch quoted in my email.
>
> Like you, I can't reproduce it with a very simple synthdef.
> hjh
>
>> 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
>
> -- 
> James Harkins /// dewdrop world
> 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





More information about the Sc-devel mailing list