Tonejs / Tone.js

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

Code Sandbox runs code properly, but running on my computer breaks the audio #1008

Open 03kkim opened 2 years ago

03kkim commented 2 years ago

I have a React app with a range slider that controls the tempo and a number next to it that re-renders every time the range slider is moved. I tried to recreate the problem on codeSandbox, but it seems to work fine there: https://codesandbox.io/s/frosty-chatterjee-x0wg5?file=/src/App.js

I tried running the app itself (from localhost) on both chrome and safari, and safari gives me really bitcrushed noises when I change the tempo too much, while chrome cuts out the audio if I change the tempo too much (and too quickly). It doesn't matter if I change the tempo with the metronome on or off. It still gives me the same issue.

What could be the issue here?