Repository navigation
Inline synthio_sat16 and use ssat - #11621
Merged
Merged
Conversation
It runs once or more per sample in synthio, the biquad filter and the audio effects, so the call cost more than the saturation. Rounding without a branch and using ssat where the core has it keeps the inlined copies small.
dhalbert
approved these changes
Oct 18, 2026
dhalbert
left a comment
Collaborator
There was a problem hiding this comment.
Thanks! Will be merged assuming the job that failed succeeds on a second run.
dhalbert
enabled auto-merge
October 18, 2026 23:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
synthio_sat16runs at least once per sample in synthio, the biquad filter, Freeverb, Phaser and Flanger. It was a normal function in another file, so every call cost more than the work it did. It is now inline, rounds without a branch, and uses the ssat instruction on cores that have it.Time per 1024-sample buffer on Fruit Jam (RP2350):
On the PicoPad (RP2040), the synth with biquad is 4% faster. The output is the same, bit for bit. Flash is 96 bytes smaller on RP2350 and 8 bytes smaller on RP2040.
Tested on Fruit Jam and PicoPad by reading the output with
audiocore.get_buffer(). The code was written with AI help.