[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] [linux] Impulse question



I know this is only partly related, but I wonder why the folling 
produces no sound, while it does when I set the \freq arg to > 0:

SynthDef(\single_impulse,{ 
	arg gate=1, amp=1, freq=0;
	var imp = Impulse.ar(freq);
	imp = imp.dup * EnvGen.ar(Env.asr(0,1.0,0.1), gate:gate, levelScale:amp, doneAction:2);
	Out.ar(0, LPF.ar(imp,7400))
}).play(s,[\freq,0])

How come the firts impulse gets swallowed by the filter? 

Best,

Karsten

Fredrik Olofsson said :
> hi,
> (this question is so common it should go into the faq.)
>
> the {}.play construction adds a short envelope and thereby takes out the 
> initial impulse.  use a synthdef or {Impulse.ar(1)}.play(fadeTime:0) if 
> you must.
> _f
>
> 6 maj 2009 kl. 03.37 skrev Karsten Gebbert:
>
>> Hi All,
>>
>> I found something strange which is at least to me quite  
>> counterintuitive
>> and feels wrong:
>>
>> 	{ Impulse.ar(1) }.play
>>
>> does not output the first impulse properly (or at all). Is this
>> intendet behaviour? Can others replicate that? I would expect the
>> behaviour to be that the first samples output by the ugen is the  
>> impulse
>> so that:
>>
>> 	{ Impulse.ar(0) }.play
>>
>> would output exactly one impulse and never progress any further. Am I
>> wrong in my assumptions or is this a possible bug? I think at least  
>> that
>> even when supplying a very low value like 0.00001 to the freq argument
>> it should definitely output the first impulse no matter what, no?
>>
>> I use 3.3 on Debian/Lenny.
>>
>> Thanks to all,
>>
>> karsten
>>
>> -- 
>> -- http://krgn.goto10.org
>
>
>   #|
>      fredrikolofsson.com     klippav.org     musicalfieldsforever.com
>   |#
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>

-- 
-- http://krgn.goto10.org

Attachment: signature.asc
Description: Digital signature