-
Notifications
You must be signed in to change notification settings - Fork 69
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
oscillator waveforms are not band limited #195
Comments
I did discover the PolyBlep node after digging around a little, but for some reason I'm not able to schedule frequency changes on this node. polyBlep->frequency()->setValueAtTime(110, currentTime); // does not work, but does work on oscilltor node Connecting nodes for an LFO, like oscillator->gain->(polyBlep.frequency) also does not work, but works fine for oscillators. |
I managed to fix this by basically duplicating the amplitude logic for frequencies in PolyBLEPNode::processPolyBLEP |
Another problem is the lack of detune param on the PolyBLEPNode. |
I managed to implement the detune param for the polyBlepNode as well by studying the code for oscillator. |
For the polyBlepNode to be a useful substitution for the oscillatorNode, it might also be a good idea to support a pure sine waveform. I added this to my fork, so I don't have to swap out the node just to get a sinewave. |
Thanks for these notes. PolyBLEP is still under construction, but should ultimately be controllable as you note. We haven't worked on PolyBLEP recently, but parameter rate control was the thing holding back a replacement of the OscillatorNode implementation. I'd be delighted to get a pull request that takes PolyBLEP over the finish line. |
It seems like all the non sine waveforms are not band limited, which creates a ton of aliasing when generating sound.
Are there any plans to implement this? It's an important part of the web audio spec on oscillators.
It could be that I'm just missing a custom node that does this, so if there already is a solution for this, I'd love to hear it :)
The text was updated successfully, but these errors were encountered: