Skip to content

Commit

Permalink
LFO Type sends Automation message (#4711)
Browse files Browse the repository at this point in the history
The LFO Type control is a bit wierd in how it interacts
with the parameters, but this dormant code from my first
attempt in VST2 works fine now weare in juce land with the
corrected apis

Closes #1801
  • Loading branch information
baconpaul authored Jul 3, 2021
1 parent 9c91ffa commit 863fa20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3222,9 +3222,11 @@ int SurgeGUIEditor::findLargestFittingZoomBetween(
return result;
}

void SurgeGUIEditor::forceautomationchangefor(Parameter *p)
void SurgeGUIEditor::broadcastPluginAutomationChangeFor(Parameter *p)
{
std::cout << "FIXME - REMOVE THIS" << __func__ << std::endl;
juceEditor->beginParameterEdit(p);
repushAutomationFor(p);
juceEditor->endParameterEdit(p);
}
//------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/gui/SurgeGUIEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class SurgeGUIEditor : public Surge::GUI::IComponentTagValue::Listener,

public:
void refresh_mod();
void forceautomationchangefor(Parameter *p);
void broadcastPluginAutomationChangeFor(Parameter *p);

void effectSettingsBackgroundClick(int whichScene);

Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/LFOAndStepDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ void LFOAndStepDisplay::mouseDown(const juce::MouseEvent &event)
auto prior = lfodata->shape.val.i;
lfodata->shape.val.i = i;
sge->refresh_mod();
sge->forceautomationchangefor(&(lfodata->shape));
sge->broadcastPluginAutomationChangeFor(&(lfodata->shape));
repaint();
sge->lfoShapeChanged(prior, i);
}
Expand Down

0 comments on commit 863fa20

Please sign in to comment.