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

[sc-users] A(n old) PlayBuf problem



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

_______________________________________________
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/