Add Pre/Off/Post EQ placement (closes #478) - #637
Open
silvansky wants to merge 1 commit into
Open
Conversation
Author
|
@sdatkinson any thoughts? |
silvansky
force-pushed
the
feature/eq-pre-post
branch
from
August 18, 2026 16:16
057ced4 to
4fbd152
Compare
silvansky
force-pushed
the
feature/eq-pre-post
branch
from
August 18, 2026 16:26
4fbd152 to
e275923
Compare
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.8.0→0.8.1): new_GetConfigFrom_0_8_1reader (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 — including current 0.8.0 — migrate correctly; new presets round-trip via the 0.8.1 reader.Legacy presets can only map to Post (pre-model EQ didn't exist before) — intended.
On the version slot
Rebased onto current
main(0.8.0), and the new reader is gated at_Version(0, 8, 1)rather than a patch of the 0.8.x line that already exists.This matters, because the serialized chunk stores unnamed ordered doubles: if the
EQreader were gated at any version ≤ 0.8.0, every preset written by the released 0.8.0 would be read with slot 8 (ToneStack, a bool) reinterpreted as theEQenum —1.0(tone stack on) →kEQModeOff,0.0(off) →kEQModePre. Inverted, and theToneStack → EQmigration would never run for that range. Gating at 0.8.1 keeps 0.7.14 … 0.8.0 on theToneStackreader where the migration applies.Happy to renumber if you'd prefer a different version slot — 0.8.1 is just the next patch; if you have your own 0.8.1 planned with different serialization, say the word and I'll move it.
Notes
*-Info.plistchanges and theinstaller/NeuralAmpModeler.issbump are auto-generated from theconfig.hversion bump, via this repo's ownscripts/update_version-mac.py,update_version-ios.pyandupdate_installer-win.py.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. It also wants to re-wrap two of the lines this PR adds — happy to apply whichever clang-format version you consider canonical if you'd like the added lines normalized.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.