Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.41k stars 976 forks source link

PolySynth playing nonstop when calling Transport.Stop() before it ended #924

Closed noaLeibman closed 2 years ago

noaLeibman commented 3 years ago

Hi!

I'm using Tone.js in a React web app (Tone is awesome thank you). I've encountered this issue: I have a PolySynth that's synced to the transport. If I call Transport.stop() before the duration of the PolySynth's schedualed notes is over, the notes keeps playing nonstop, until I refresh the page.

Please see this codeSandBox (if you click play, and then click stop less then 2 seconds after, it will reproduce).

Any thing I can do about it? Thanks!:)

tambien commented 2 years ago

Here's a fork of your sandbox using the latest build, this issue should now be fixed

https://codesandbox.io/s/busy-haibt-kvx3r?file=/src/App.js