Created
May 8, 2017 09:17
-
-
Save applecargo/169564e3a7a8043aad0d7ab11abc7eb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for example, if we have a mp3 at "audio/tuba@7/01.mp3" | |
var test = new Tone.Player("audio/tuba@7/01.mp3").toMaster(); // load and connect | |
test.retrigger = true; // enable retrigger | |
test_srcs = []; // prepare an array to keep track of sounds.. | |
test_srcs.push(test.start()._source); // start playbacks and collect their '_source's.. | |
test_srcs.push(test.start()._source); | |
//... | |
// do it as much as u want. over and over.. it will accumulate on and on. | |
//... | |
// and then, to stop all at once. --> | |
test_srcs.forEach(function(item){item.stop()}); | |
//Viola! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment