Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange cracking noises with PolySynth #1228

Open
olivdee opened this issue Feb 25, 2024 · 2 comments
Open

Strange cracking noises with PolySynth #1228

olivdee opened this issue Feb 25, 2024 · 2 comments

Comments

@olivdee
Copy link

olivdee commented Feb 25, 2024

I would like to use tone.js for my next art project, but experience strange cracking noises, when playing back 2 or more tones at once.

To Reproduce
Please find the code I am using attached.
tone.js.testcase.zip

Expected behavior
No cracking noises.

What I've tried
All kinds of different settings for the oscillator and envelope, also tried out the code on the latest versions of chrome, firefox and edge.

@dirkk0
Copy link

dirkk0 commented Feb 27, 2024

It's not ideal to provide code only as a ZIP especially when it doesn't contain all the files.
Also, you don't need jQuery for such a basic example. I recommend to create a codepen or a glitch.com so that it's easier for people to help.
You can fork this as a starting point:
https://codepen.io/dirkk0/pen/OJdMGPY

Good luck!

@olivdee
Copy link
Author

olivdee commented Apr 9, 2024

Thank you Dirk and sorry for the late reply!
I finaly got to create a pin, thanks for the codepen starting point:
https://codepen.io/olivnewton/pen/qBwYmJa

I did have some trouble with this way of using PolySynth though: as long as I was defining the "polyphony" as seen in https://tonejs.github.io/docs/r13/PolySynth ...new Tone.PolySynth(3, Tone.Synth)... it was not working (strangely it is working this way in my project - but with the cracking noises). As soon as I removed the number of voices it started working. Why is that?

Anyway, your example with gain helped a lot of debugging this - now I now how to correctly use the gain in order to remove the cracking noises. Hopefully I can implement this in my project.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants