[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] A(n old) PlayBuf problem
yes, indeed very strange. (same problem in sc357 bytheway).
to temporarily solve it you can add a dummy DC.ar(1) and make it into a BinaryOpUGen. then it seems to work...
sig = PlayBuf.ar(1, file, BufRateScale.kr(file), loop: 0)*DC.ar(1); //ok
sig = PlayBuf.ar(1, file, BufRateScale.kr(file), loop: 0); //bad
_f
29 dec 2013 kl. 08:13 skrev Lucas Samaruga <samarugalucas@xxxxxxxxx>:
> Hi
>
> I have a problem (at least one). Can't understand why this seems to
> behave differently. I believe that the correct result is the point 2
> and point 1 should behave the same way. What I did wrong?
>
> s.boot;
> f = Buffer.read(s, "~/Desktop/sound.wav".standardizePath);
> b = Buffer.alloc(s, s.sampleRate * 5);
> //b.play // should be empty
>
> (
> SynthDef(\test, { arg buf, file;
> var sig, rec, out;
>
> // 1) if the signal is a PlayBuf the second
> // PlayBuf seems to replay it while recording. (?)
> sig = PlayBuf.ar(1, file, BufRateScale.kr(file), loop: 0);
>
> // 2) if the signal is a generator the second
> // PlayBuf seems to replay the sound after
> // the first pass is complete.
> //sig = SinOsc.ar * 0.2;
>
> rec = RecordBuf.ar(sig, buf, offset: 0, recLevel: 1, preLevel:
> 0.8, loop: 1);
> out = PlayBuf.ar(1, buf, 1, startPos: 0, loop: 1);
>
> Out.ar(0, out.dup);
> }).add;
> )
>
> x = Synth(\test, [buf: b, file: f]);
> x.free; b.free;
>
> best
> lucas
#|
fredrikolofsson.com 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/