Closed Smashcat closed 2 years ago
The demo doesn't work for me.
Something that helped me in a similar situation was using transport.cancel(0)
which cancels all scheduleRepeats.
https://tonejs.github.io/docs/14.7.77/Transport#cancel
Hey, I think you can also make a note of the eventId for the scheduleRepeat and individually clear it using transport.clear(eventId)
After using the scheduleRepeat function, attempting to use another scheduleRepeat in the same page will cause the previous version to tick, along with the new one. This throws an error about Start time must be strictly greater than previous start.
Example: https://jsfiddle.net/oabcdnm6/
Expected behavior Should allow new values to be entered, and tones played, as they are the first time.
What I've tried Tried initialising, clearing vars etc. Seems like some global vars are being stored in the Tone.js library and cannot be cleared until a page reload.
Additional context Tried in Chrome and Firefox. Same result.