[sc-users] Question about pops 'n' clicks with delay

Dave Della Costa dave at dubitable.com
Thu Dec 6 21:26:32 PST 2007


> In fact in this case you can do DelayL.ar(out, i/5, i/5, 0.1) and

Hmm...after trying this with the code below, I'm getting the "exception
in real time: alloc failed" message, and before that hits, still the
clicks.  Thoughts?


Nathaniel Virgo wrote:
> Hi,
> 
> The 0.6 in the call to DelayL is the maximum delay time, which tells
> it how big a buffer to allocate - if you set the delay time to greater
> than this you'll be more likely to get clicks and the like because
> you're accessing memory that hasn't been cleared.  If i>3 in this case
> then this will happen, because 3/5 = 0.6.  So to avoid the clicks you
> just need to set the max delay time to 10/5 = 2 or greater.
> 
> In fact in this case you can do DelayL.ar(out, i/5, i/5, 0.1) and
> avoid allocating more memory than you have to, because i is constant
> and known at the time the SynthDef is compiled.
> 
> Nathaniel
> 
> 
> On 05/12/2007, Dave Della Costa <dave at dubitable.com> wrote:
>> Hi SC folks,
>>
>> I'm trying to get a better understanding of delays and reverb in SC3,
>> and more generally of course how things work.  I'd call myself an
>> "advanced beginner" or "beginning intermediate" at SC3 and
>> computer-generated sound in general, although you can be the judge of
>> that...ha.
>>
>> Anyways, here's my code, based on playing around with the IXI tutorial #11:
>>
>> (
>> SynthDef("gross_pluck", {
>>         arg freq, gate = 1;
>>
>>         var out;
>>
>>         out = SinOsc.ar(freq, 0, 0.5) * EnvGen.kr(Env.perc, gate, doneAction:2);
>>         d = Mix.fill(10, {arg i; DelayL.ar(out, 0.6, (i/5), 0.1);});
>>
>>         Out.ar(0, [out, d]);
>>
>> }).load(s);
>> )
>>
>> (
>> Tempo.bpm = 60;
>>
>> Pbind(
>>         \instrument, "gross_pluck",
>>         \dur, Pseq([1, 0.25, 0.25, 0.25, 1, 1, 1], inf),
>>         \note, Pseq([1, 5, 2, 1, 6, 2, 4], inf)
>>         ).play
>> )
>>
>> If I lower the number in Mix.fill to below the divisor in the delaytime
>> argument (of the call to DelayL.ar()), that seems to (not always) relate
>> to getting less or no clicks in the delay sound after the initial
>> envelope.  Does that make sense?  What I'm trying to understand is where
>> those clicks originate, and how I can prevent them.  I sense that there
>> is something deeper going on here, but I'm not sure where to begin.
>> Does this have something to do with the amplitude level peaking?  Or is
>> it that when the next note hits in the Pbind, any delayed sounds get
>> "left behind" somehow?  Please enlighten me, or point me towards a help
>> file...I didn't have much luck with that or poking through the archives,
>> unfortunately.
>>
>> Many thanks!
>>
>> Dave D.
>> _______________________________________________
>> sc-users mailing list
>> sc-users at create.ucsb.edu
>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>>
> _______________________________________________
> sc-users mailing list
> sc-users at create.ucsb.edu
> http://www.create.ucsb.edu/mailman/listinfo/sc-users


More information about the sc-users mailing list