Calls a bang() after specified delay
timer = T("timeout", timeout=1000, ...);
// ... Input objects which will be processed
timer.timeout [Number]
timer.currentTime [Readonly]
// Start the timer
timer.on();
// Stop the timer
timer.off();
synth = T("*", T("adsr", 0, 0, 1.0, 3000).bang(),
T("wav", "public/audio/amen.wav", true).load()).play();
timer = T("timeout", 3000, function() {
synth.args[0].keyoff();
});
synth.onplay = function() {
timer.on();
};
synth.onpause = function() {
timer.off();
};
synth.onbang = function() {
synth.args[0].bang();
timer.on();
};