diff --git a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate index 7d4ab43..e56b31d 100644 Binary files a/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate and b/Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Source/PluginParam.cpp b/Source/PluginParam.cpp index 8c1d411..78ff597 100644 --- a/Source/PluginParam.cpp +++ b/Source/PluginParam.cpp @@ -79,7 +79,7 @@ void Ctrl::sliderValueChanged(Slider* moved) { } void Ctrl::buttonClicked(Button* clicked) { - publishValue(clicked->getToggleStateValue() == 1 ? 1 : 0); + publishValue(clicked->getToggleState()); } void Ctrl::comboBoxChanged(ComboBox* combo) { @@ -160,10 +160,11 @@ String CtrlDX::getValueDisplay() { void CtrlDX::publishValue(float value) { Ctrl::publishValue(value / steps); - + DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) parent->getActiveEditor(); - if ( editor == NULL ) + if ( editor == NULL ) { return; + } String msg; msg << label << " = " << getValueDisplay(); editor->global.setParamMessage(msg); @@ -177,6 +178,10 @@ void CtrlDX::comboBoxChanged(ComboBox* combo) { publishValue(combo->getSelectedId() - 1); } +void CtrlDX::buttonClicked(Button *button) { + publishValue((int) button->getToggleState()); +} + void CtrlDX::updateComponent() { if (slider != NULL) { slider->setValue(getValue() + displayValue, @@ -185,11 +190,9 @@ void CtrlDX::updateComponent() { if (button != NULL) { if (getValue() == 0) { - button->setToggleState(false, - dontSendNotification); + button->setToggleState(false, dontSendNotification); } else { - button->setToggleState(true, - dontSendNotification); + button->setToggleState(true, dontSendNotification); } } @@ -418,6 +421,13 @@ void DexedAudioProcessor::setCurrentProgram(int index) { lfo.reset(data + 137); currentProgram = index; triggerAsyncUpdate(); + + // reset parameter display + DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) getActiveEditor(); + if ( editor == NULL ) { + return; + } + editor->global.setParamMessage(""); } const String DexedAudioProcessor::getProgramName(int index) { diff --git a/Source/PluginParam.h b/Source/PluginParam.h index eeabe2e..de2a5bb 100644 --- a/Source/PluginParam.h +++ b/Source/PluginParam.h @@ -96,6 +96,7 @@ public: void sliderValueChanged (Slider* moved); void comboBoxChanged (ComboBox* combo); + void buttonClicked (Button* buttonThatWasClicked); void updateComponent(); }; diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 69e6dae..d6ce275 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -226,14 +226,6 @@ void DexedAudioProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& mi } } -void DexedAudioProcessor::processSamples(int n_samples, float *buffer) { - int i; - - - - extra_buf_size = i - n_samples; -} - //============================================================================== // This creates new instances of the plugin.. diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 4613d9f..292a5be 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -83,7 +83,6 @@ class DexedAudioProcessor : public AudioProcessor, public AsyncUpdater void processMidiMessage(MidiMessage *msg); void keydown(uint8_t pitch, uint8_t velo); void keyup(uint8_t pitch); - void processSamples(int n_samples, float *buffer); /** * this is called from the Audio thread to tell