Fantastic, thank you Fredrik. This is exactly what I was hoping for. There was no specific reason to use BufWr. I am just learning how to work with buffersAm Di., 9. Okt. 2018 um 08:18 Uhr schrieb <f@xxxxxxxxxxxxxxxxxxx>:do you have a particular reason to record (BufWr) the envelope into the buffer like that, or will this technique work...
e= Env([0, 0, 0.5, 1, -1, 0], [0, 50, 200, 100, 100].normalize*512/s.sampleRate, \lin)
a= Buffer.loadCollection(s, e.asSignal)
a.plot
{|buf| SinOsc.ar*PlayBuf.ar(1, buf, doneAction:2)!2}.play(args: [\buf, a])
?
_f
> 9 okt. 2018 kl. 05:45 skrev klipklipklapklap@xxxxxxxxx:
>
> Dear list,
>
> This is a beginner question about buffers. I am trying to fill a buffer with an envelope.
>
> This comes close to the result I am looking for:
> (
> a = Buffer.alloc(s, 512, 1);
>
> (
> y={arg rate=1;
> var in;
> in=EnvGen.ar(
> Env(
> [0, 0, 0.5, 1, -1, 0],
> [0, 50, 200, 100, 100].normalize*512/SampleRate.ir,
> \lin
> ), Impulse.ar(100));
> BufWr.ar(in, a, Phasor.ar(0, BufRateScale.kr(a) * rate, 0, BufFrames.kr(a)));
> 0.0 //quiet
> }.play;
> )
>
> But would it be possible to write just one cycle of the envelope into the buffer?
>
> Thank you!
> Max
#|
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/