[flocking-users] Play buffer from the beginning

roger pibernat rogerpibernat at gmail.com
Mon Jan 13 08:58:28 EST 2014

Hi there,

I've been trying to play a buffer from the beginning every time I hit a
button, but I can't reset it.  If I stop it and hit play again, it keeps
running where it stopped.  I'm using readBuffer, because on the demo it
works just fine.  How does it work?  Here's my code.

    var synth = flock.synth({
        synthDef: {
            ugen: "flock.ugen.readBuffer",
            buffer: {
                id: "chord",
                url: "data/audio/piano-C3.wav"
            phase: {
                ugen: "flock.ugen.lfSaw",
                freq: (1/4),
                mul: 0.5,
                add: 0.5

    function playSynth()
        console.log("playing synth");

    function stopSynth()
        console.log("stopping synth");



(+34) 639 81 26 71
http:// <http://doodledeedoo.wordpress.com/>www.wucollective.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idrc.ocad.ca/pipermail/flocking/attachments/20140113/a3d50fa2/attachment.html>

More information about the flocking mailing list