Skip to content
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

Make NAM disablable - bypass dry signal #494

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marmal95
Copy link

This PR implements #431.

Changes:

  1. New UI control added - clickable "NEURAL AMP MODELER" logo title.
  2. Clicking logo toggles NAM state between enabled/disabled. Title color also changes between white/black - depending on state.
  3. Dry signal is passed to output directly when NAM is disabled - meters are still showing audio levels.
  4. All UI controls get disabled when whole NAM is disabled.
  5. Mouse events on switches are ignored to prevent enabling noise gate or EQ section. Although it would not impact the signal, disabling them make their state consintent with the whole NAM state and make it more readable for user that those signal chain elements are bypassed.
  6. Knobs are still editable in disabled state - they do not impact the signal until NAM is enabled again.

"NEURAL AMP MODELER" logo in now clickable.
It changes color between white and black - depending if NAM is enabler or disabled.
UI controls are disabled when whole NAM was disabled - dry signal is passed to output.

nam_disabled

Copy link
Owner

@sdatkinson sdatkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very nice first attempt. Thanks for your work! But, there's a number of things that I think I've caught that would introduce bugs (see comments).

[This PR is also a nice reminder that I should work on a better PR template so that I can think through the sorts of changes that happen so that contributors can work through a checklist to make sure their contributions take into account all of the considerations.]

NeuralAmpModeler/NeuralAmpModeler.h Outdated Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModeler.cpp Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModeler.cpp Outdated Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModeler.cpp Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModeler.cpp Outdated Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModeler.cpp Outdated Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModelerControls.h Show resolved Hide resolved
NeuralAmpModeler/NeuralAmpModelerControls.h Show resolved Hide resolved
Copy link
Owner

@sdatkinson sdatkinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to check, but first let me do that version bump for you.


if (strcmp(version.Get(), "0.7.10") == 0)
{
pos = _UnserializeStateLegacy_0_7_9(chunk, pos);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, as I think of this, it might not be right--I think that one of the params' names was changed in v0.7.10:

ddd5ff8#diff-583ead9e08b2afc1f331a5073c88faea9cc55bdbfde16d357dee55438e63f19dL78

I think I thought that would make the unserialization behave differently. Let me check...

Yeah: ebd1352#diff-583ead9e08b2afc1f331a5073c88faea9cc55bdbfde16d357dee55438e63f19dR839

But the funny thing is that I managed to code it (I think) in a way that still works for v0.7.10--newNames.find(oldName) will miss on "Threshold" and will just use "Threshold"...which will work (I think)! Not sure if past me did that on purpose, but I'm glad he did 😉

If you could double-check this for me that it does in fact work as expected (after I bump the version) that'd be super-appreciated.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like, it works as you described.
After bumping the plugin version to 0.7.11 locally, I was able to properly open my DAW session (saved with 0.7.10) and restore correct params values.


void NeuralAmpModeler::_SetDisabledForAllControl(const bool disabled)
{
if (const auto ui = GetUI(); ui != nullptr)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something that makes this try again later if GetUI() returns null?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but (although I am not very familiar with iPlug) I think that GetUI() should never return null when GUI was attached unless there's there's some problem, but please correct me if I am wrong.

NeuralAmpModeler/NeuralAmpModeler.h Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants