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 1438337..f67669c 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/Dexed.jucer b/Dexed.jucer index 9ae120a..33017b0 100644 --- a/Dexed.jucer +++ b/Dexed.jucer @@ -5,7 +5,7 @@ buildVST="1" buildAU="0" pluginName="Dexed" pluginDesc="Dexed" pluginManufacturer="Digital Suburban" pluginManufacturerCode="Manu" pluginCode="Plug" pluginChannelConfigs="{1, 1}, {2, 2}" pluginIsSynth="1" - pluginWantsMidiIn="1" pluginProducesMidiOut="0" pluginSilenceInIsSilenceOut="0" + pluginWantsMidiIn="1" pluginProducesMidiOut="1" pluginSilenceInIsSilenceOut="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="DexedAU" pluginRTASCategory="" aaxIdentifier="com.yourcompany.Dexed" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" jucerVersion="3.1.0" companyName="Digital Suburban"> diff --git a/JuceLibraryCode/AppConfig.h b/JuceLibraryCode/AppConfig.h index 80eef86..efdaf74 100644 --- a/JuceLibraryCode/AppConfig.h +++ b/JuceLibraryCode/AppConfig.h @@ -218,7 +218,7 @@ #define JucePlugin_WantsMidiInput 1 #endif #ifndef JucePlugin_ProducesMidiOutput - #define JucePlugin_ProducesMidiOutput 0 + #define JucePlugin_ProducesMidiOutput 1 #endif #ifndef JucePlugin_SilenceInProducesSilenceOut #define JucePlugin_SilenceInProducesSilenceOut 0 diff --git a/Source/GlobalEditor.cpp b/Source/GlobalEditor.cpp index 8d8b4c0..92e9c96 100644 --- a/Source/GlobalEditor.cpp +++ b/Source/GlobalEditor.cpp @@ -374,6 +374,7 @@ void GlobalEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... void GlobalEditor::bind(DexedAudioProcessor *parent) { + repaint(); parent->algo->bind(algo); parent->lfoRate->bind(lfoSpeed); parent->lfoDelay->bind(lfoDelay); diff --git a/Source/GlobalEditor.h b/Source/GlobalEditor.h index 86215e9..9893e68 100644 --- a/Source/GlobalEditor.h +++ b/Source/GlobalEditor.h @@ -50,6 +50,9 @@ public: void bind(DexedAudioProcessor *processor); void setSystemMessage(String msg); void setParamMessage(String msg); + + String systemMsg; + String paramMsg; //[/UserMethods] void paint (Graphics& g); @@ -62,8 +65,6 @@ public: private: //[UserVariables] -- You can add your own custom variables in this section. DexedAudioProcessor *processor; - String systemMsg; - String paramMsg; //[/UserVariables] //============================================================================== diff --git a/Source/OperatorEditor.cpp b/Source/OperatorEditor.cpp index cd01e05..c590ea1 100644 --- a/Source/OperatorEditor.cpp +++ b/Source/OperatorEditor.cpp @@ -302,47 +302,54 @@ void OperatorEditor::resized() void OperatorEditor::sliderValueChanged (Slider* sliderThatWasMoved) { //[UsersliderValueChanged_Pre] - envDisplay->repaint(); //[/UsersliderValueChanged_Pre] if (sliderThatWasMoved == s_egl1) { //[UserSliderCode_s_egl1] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egl1] } else if (sliderThatWasMoved == s_egl2) { //[UserSliderCode_s_egl2] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egl2] } else if (sliderThatWasMoved == s_egl3) { //[UserSliderCode_s_egl3] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egl3] } else if (sliderThatWasMoved == s_egl4) { //[UserSliderCode_s_egl4] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egl4] } else if (sliderThatWasMoved == s_egv1) { //[UserSliderCode_s_egv1] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egv1] } else if (sliderThatWasMoved == s_egv2) { //[UserSliderCode_s_egv2] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egv2] } else if (sliderThatWasMoved == s_egv3) { //[UserSliderCode_s_egv3] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egv3] } else if (sliderThatWasMoved == s_egv4) { //[UserSliderCode_s_egv4] -- add your slider handling code here.. + envDisplay->repaint(); //[/UserSliderCode_s_egv4] } else if (sliderThatWasMoved == opLevel) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 8672b0b..4c2d3cb 100755 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -177,10 +177,18 @@ void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChange void DexedAudioProcessorEditor::timerCallback() { int32_t env[6]; - - if ( processor->peekEnvStatus(env) == false ) + + if ( processor->refreshUI ) { + if ( processor->refreshUI & DexedAudioProcessor::REFRESH_COMP ) + updateUI(); + if ( processor->refreshUI & DexedAudioProcessor::REFRESH_MSG ) + global.repaint(); + processor->refreshUI = 0; + } + + if ( processor->peekEnvStatus(env) == false ) return; - + for(int i=0;i<6;i++) { operators[i].updateGain(sqrt(env[5 - i]) / 8196); } diff --git a/Source/PluginParam.cpp b/Source/PluginParam.cpp index 8895ca6..bccd199 100755 --- a/Source/PluginParam.cpp +++ b/Source/PluginParam.cpp @@ -420,7 +420,8 @@ void DexedAudioProcessor::unpackProgram(int idx) { } void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) { - + memcpy(data, rawdata, 160); + refreshUI = true; } void DexedAudioProcessor::setDxValue(int offset, int v) { diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index cdc5812..ddbbaca 100755 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -30,11 +30,13 @@ //============================================================================== DexedAudioProcessor::DexedAudioProcessor() { +#ifdef DEBUG Logger *tmp = Logger::getCurrentLogger(); if ( tmp == NULL ) { Logger::setCurrentLogger(FileLogger::createDateStampedLogger("Dexed", "DebugSession-", "log", "DexedAudioProcessor Created")); } TRACE("Hi"); +#endif Exp2::init(); Tanh::init(); @@ -174,12 +176,23 @@ void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) { // single voice dump if ( buf[2] == 0 ) { if ( sz < 155 ) { - TRACE("wrong single voice datasize %d", buf[2]); + TRACE("wrong single voice datasize %d", sz); return; } updateProgramFromSysex(buf+5); + refreshUI |= REFRESH_COMP; + return; } + // 32 voice dump + if ( buf[2] == 9 ) { + if ( sz < 4016 ) { + TRACE("wrong 32 voice datasize %d", sz); + return; + } + importSysex((const char *)buf+5); + refreshUI |= REFRESH_COMP; + } return; } diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index a40d6e2..1ebf216 100755 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -90,8 +90,11 @@ class DexedAudioProcessor : public AudioProcessor public : - bool refreshUI; - bool sendSysexChange; + static const int REFRESH_MSG = 1; + static const int REFRESH_COMP = 1 << 1; + + int refreshUI; + bool sendSysexChange = true; char data[161]; Array ctrl;