Add BlockBiquad shelf & peaking, AudioFilter support #9804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@relic-se @gamblor21 @todbot for interest.
A potential limitation is:
(besides which, LFOs can now be used with AudioFilters, BlockBiquads, and other types of objects; LFOs, Math blocks and BlockBiquads should in the medium term be moved out of synthio into their own modules and the documentation updated to reflect what they can be used with)
AudioFilter is more likely to be used with AudioMixer. But you can't have one LFO drive the filters of two different AudioFilter objects.
I honestly don't know what the fix for this is. The
lfo_tick
routine needs to run once every SYNTHIO_MAX_DUR samples, but other parts of the audio pipeline produce or consume in different chunks. Using AudioMixer to gather up multiple chunks of synthio data is a common trick, but you still want the LFOs to tick every 256 samples even if AudioMixer is gathering 1024 samples at a time (ssay) In fact, this is making me doubt that a BlockBiquad with varying inputs is even working right in Filter with a single Filter and no mixer since it is using buffer_size of 512 bytes which might or might not be 256 samples.This needs more thought, so I'm entering this as a draft.