pizzicato icon indicating copy to clipboard operation
pizzicato copied to clipboard

Unable to play sounds one after the other

Open Benoit1980 opened this issue 3 years ago • 1 comments

Hello,

I need to be able to play tiny wav files one after the other(with BPM sync). At the moment I coded;

            var sound = [];
            this.samples.forEach((item, i) => {
                sound[i] = new Pizzicato.Sound({
                    source: 'file',
                    options: { path: item.sampleUrl }
                }, () => {
                    sound[i].play();
                });
            })

My first problem is that all the files are playing like on a sprite(all at once). How to have them playing sequentially and only once please?

It looks like the library does not have a BPM function, am I correct? ie: Play the give files on a beat at 125BPM,135BPM and so on.

Thank you for the great library!

Benoit1980 avatar Apr 10 '21 17:04 Benoit1980

Maybe you could consider Pizzicato.Group?

1hko avatar Jan 19 '23 17:01 1hko