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

Re: [sc-users] Better way to deviate from a value



is this what you want?
(
{
	var dur= 1, dev= 0.1;
	var clock= Impulse.ar(dur);
	var trigger= Impulse.ar(dur, TGaussRand.ar(dur-dev, dur+dev, clock));
	[clock, trigger]*0.5;
}.play;
)
left channel steady click, right channel fluctuates around - sometimes early, sometimes late.
merged into your example...
(
Ndef(\playbuf, {| buf = 0, rate = 1, dur = 2, dev = 0.3 |
	var clock= Impulse.ar(dur);
	var trigger= Impulse.ar(dur, TGaussRand.ar(dur-dev, dur+dev, clock));
	c = PlayBuf.ar(1, buf, rate, trigger, 0, 1);
	c.dup / 2
}).play(0, 2);
)

but a better way to do this (avoid clicks etc) is to use Pbind with a Pgauss for the \lag spawning new playbuf synths.
_f

> 21 dec. 2017 kl. 20:05 skrev kv.syntaxerror@xxxxxxxxx:
> 
> But TRand acts as a trigger, right? 
> 
> I would like to deviate around the output of the Impulse. Am I missing something trivial?
> 
> On Thu, Dec 21, 2017 at 8:45 PM, <sludgefree@xxxxxxxxx> wrote:
> You may want to look into TRand instead of WhiteNoise, as it's more intuitive to what you're doing here and also demand-rate. 
> 
> Also, it looks like you're perhaps doing grainular synthesis? GrainBuf might be a better option than PlayBuf.
> 
> On Thu, Dec 21, 2017 at 1:13 PM, <kv.syntaxerror@xxxxxxxxx> wrote:
> Hi all,
> 
> I have this and I was wondering if this is the most efficient way to deviate from a value:
> 
> p = Platform.resourceDir +/+ "/sounds/";
> b = Buffer.read(s, p +/+ "a11wlk01-44_1.aiff");
> 
> (
> Ndef(\playbuf, {| buf = 0, rate = 1, dur = 0.01, dev = 0.01 |
>     var trigger = WhiteNoise.kr(Impulse.kr(BufDur.kr(buf).reciprocal / dur), dev); //using a WhiteNoise Ugen to deviate duration.
>     c = PlayBuf.ar(1, buf, rate, trigger.lag(0.3));
>     c.dup / 2
> }).play(0, 2);
> )
> 
> 
> Best,
> K.
> 
> 


  #|
     fredrikolofsson.com     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/