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

Large number of Filters causes Silence #686

Closed
JackCA opened this issue Jun 5, 2020 · 3 comments
Closed

Large number of Filters causes Silence #686

JackCA opened this issue Jun 5, 2020 · 3 comments

Comments

@JackCA
Copy link
Contributor

JackCA commented Jun 5, 2020

It appears that if a relatively large number of Tone.Filter objects are created, audio becomes completely silent.

Here's a reproduction.
Notes about it:

  • this doesn't happen with the native filters (there is a flag to demonstrate this in the repro)
  • the number I've chosen (500) is one that triggers the issue for me but I'm assuming it may be environment specific
@tambien
Copy link
Contributor

tambien commented Jun 7, 2020

Tone.Filter includes a number of other AudioNodes which enables the rolloff factor to be more than the default of -12db/octave. It seems like at some point over a few thousand AudioNodes the Web Audio API implementations just gives up trying to process.

The solution here would either be to write a simpler wrapper around the BiquadFilterNode which doesn't include the rolloff factor or just use the native Web Audio APIs and Tone.connect to connect things up.

@tambien tambien closed this as completed in 75617d3 Jun 8, 2020
@tambien
Copy link
Contributor

tambien commented Jun 8, 2020

adding Tone.BiquadFilter which is a basic wrapper around the BiquadFilterNode so should perform exactly the same as the WAA BiquadFilterNode but with the unit-conversions of Tone.Param

@JackCA
Copy link
Contributor Author

JackCA commented Jun 8, 2020

That's perfect. Thank you so much!

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