Add Pre/Off/Post EQ placement (closes #478)#637
Open
silvansky wants to merge 1 commit into
Open
Conversation
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.
Closes #478.
Adds a Pre / Off / Post control for the tone stack (EQ), so the EQ can run before the NAM model, after it, or be bypassed. The blocker noted in #478 (#459 — legacy unserializer) has since been resolved, and this PR routes the new parameter through that existing migration framework so old projects keep loading correctly.
What changed
kEQActivebool into a single 3-state enumkEQMode{"Pre","Off","Post"}(default Post, i.e. the current behavior). EnumEEQMode { kEQModePre, kEQModeOff, kEQModePost }.ProcessBlock): in Pre mode the tone stack processes the signal feeding the model (gate detection stays on the raw input); in Post mode it runs after the model as before; Off bypasses it. The tone stack is invoked exactly once (Pre XOR Post) and writes to its own buffer (no input/output aliasing).IVTabSwitchControl(Pre/Off/Post) plus a label, in the same spot. EQ knobs grey out in Off.Unserialization.cpp, version0.7.15→0.7.16): new_GetConfigFrom_0_7_16reader (param renamedToneStack→EQ), and a migration in_UpdateConfigFrom_0_7_14mapping the legacy bool (on → Post,off → Off). Because the older readers chain through_UpdateConfigFrom_0_7_14, presets from all prior versions migrate correctly; new presets round-trip via the 0.7.16 reader.Legacy presets can only map to Post (pre-model EQ didn't exist before) — intended.
Notes
*-Info.plistchanges are auto-generated from theconfig.hversion bump. Happy to renumber if you'd prefer a different version slot.format.bash: my local clang-format (v22) reformats unrelated pre-existing code (collapsing short brace-bodies per the repo's.clang-format), which would add churn. The added lines follow the surrounding style — let me know if you'd like me to apply your clang-format version.Testing (per CONTRIBUTING)
Plugin state+Plugin state restoration(exercises the new serialization/migration),Audio processingandNon-releasing audio processingacross 44.1/48/96 kHz × block sizes 64–1024,Automation,Parameters,Parameter thread safety, andFuzz parameters.