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 d21650d..89b3c0d 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/PluginEditor.cpp b/Source/PluginEditor.cpp index 304c1f6..8045297 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -138,6 +138,9 @@ void DexedAudioProcessorEditor::paint (Graphics& g) { void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) { if (buttonThatWasClicked == cartButton) { int result = cartPopup.show(); + if ( result < 1 ) + return; + processor->loadBuiltin(result-1); processor->setCurrentProgram(0); rebuildProgramCombobox(); @@ -214,7 +217,12 @@ void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChange processor->updateHostDisplay(); } -void DexedAudioProcessorEditor::timerCallback() { +void DexedAudioProcessorEditor::timerCallback() { + if ( processor->forceRefreshUI ) { + processor->forceRefreshUI = false; + updateUI(); + } + if ( ! processor->peekVoiceStatus() ) return; diff --git a/Source/PluginFx.cpp b/Source/PluginFx.cpp index 6acbf34..4e6180f 100644 --- a/Source/PluginFx.cpp +++ b/Source/PluginFx.cpp @@ -115,14 +115,13 @@ void PluginFx::process(float *work, int sampleSize) { // maybe smooth this value float g = rCutoff; - + float lpc = g / (1 + g); + for(int i=0; i < sampleSize; i++ ) { float s = work[i]; s = s - 0.45*tptlpupw(c,s,15,sampleRateInv); s = tptpc(d,s,bright); - float lpc = g / (1 + g); - float y0 = NR24(s,g,lpc); //first low pass in cascade diff --git a/Source/PluginParam.cpp b/Source/PluginParam.cpp index dbcdf77..6cc36d7 100644 --- a/Source/PluginParam.cpp +++ b/Source/PluginParam.cpp @@ -130,6 +130,7 @@ void CtrlDX::setValueHost(float f) { } void CtrlDX::setValue(int v) { + TRACE("setting value %d %d", dxOffset, v); if (v >= steps) { TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v); v = steps - 1; @@ -137,7 +138,7 @@ void CtrlDX::setValue(int v) { dxValue = v; if (dxOffset >= 0) { if (parent != NULL) - parent->setDxValue(dxOffset, v); + parent->setDxValue(dxOffset, dxValue); } } @@ -385,6 +386,7 @@ float DexedAudioProcessor::getParameter(int index) { void DexedAudioProcessor::setParameter(int index, float newValue) { ctrl[index]->setValueHost(newValue); + forceRefreshUI = true; } int DexedAudioProcessor::getNumPrograms() { diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 70d9eae..dfcb2e6 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -112,6 +112,8 @@ public : CartridgeManager cartManager; VoiceStatus voiceStatus; + bool forceRefreshUI; + Array ctrl; OperatorCtrl opCtrl[6];