dsp56300 / gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
https://dsp56300.wordpress.com/
GNU General Public License v3.0
411 stars 47 forks source link

fixes #132: non-GUI triggered parameter changes now update the GUI control label #134

Closed dreddi closed 1 year ago

dreddi commented 1 year ago

Fixes #132

Solution:

We patch Virus::Controller::sendParameterChange to update the GUI control label on every parameter change.

This is achieved by implementing a new VirusEditor::updateControlLabel that takes a pluginLib::Parameter as an argument, and updates the control label using its fields. We refactor the existing code to ensure that FocusedParameterTooltip behaviour continues as before.

Examples:

  1. In single mode, updating 'Portamento Time' via midi controller or DAW plugin wrapper will display 'Portamento Time' in the control label.
  2. In multi mode, you get the same behaviour, but also
  3. if channel 5 is the currently active part, updating channel 2's 'Portamento Time' will display 'Ch 2 Portamento Time' rather than 'Portamento Time', to reduce ambiguity.

Other changes:

  1. source/juceUiLib/tabgroup.h: We introduce a unique ID for each juce::Component during template <typename T> T* UiObject::createJuceObject(Editor& _editor, T* _object) , so that we can match on this key by calling component.getComponentID(), for example. We use this when checking whether a component exists on a particular page (for FocusedParameterTooltip).

Possible improvements:

dreddi commented 1 year ago

Bug: control label only updates correctly for the channel selected in the GUI (Ch1 in single mode, the selected channel in multi mode). Control label gets stuck when a different channel's value is changed. Will fix.

dreddi commented 1 year ago

Bugs fixed, ready to merge. Original post has been updated.

dreddi commented 1 year ago

Ran clang-format on the lines of code I touched, using source/.clang-format as a ruleset

dsp56300 commented 1 year ago

thanks for the suggestion, I added it meanwhile