Sysex support

pull/1/head
asb2m10 11 years ago
parent b8509e07af
commit f37cdbdfd8
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 2
      Dexed.jucer
  3. 2
      JuceLibraryCode/AppConfig.h
  4. 1
      Source/GlobalEditor.cpp
  5. 5
      Source/GlobalEditor.h
  6. 9
      Source/OperatorEditor.cpp
  7. 8
      Source/PluginEditor.cpp
  8. 3
      Source/PluginParam.cpp
  9. 15
      Source/PluginProcessor.cpp
  10. 7
      Source/PluginProcessor.h

@ -5,7 +5,7 @@
buildVST="1" buildAU="0" pluginName="Dexed" pluginDesc="Dexed" buildVST="1" buildAU="0" pluginName="Dexed" pluginDesc="Dexed"
pluginManufacturer="Digital Suburban" pluginManufacturerCode="Manu" pluginManufacturer="Digital Suburban" pluginManufacturerCode="Manu"
pluginCode="Plug" pluginChannelConfigs="{1, 1}, {2, 2}" pluginIsSynth="1" 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="" pluginEditorRequiresKeys="0" pluginAUExportPrefix="DexedAU" pluginRTASCategory=""
aaxIdentifier="com.yourcompany.Dexed" pluginAAXCategory="AAX_ePlugInCategory_Dynamics" aaxIdentifier="com.yourcompany.Dexed" pluginAAXCategory="AAX_ePlugInCategory_Dynamics"
jucerVersion="3.1.0" companyName="Digital Suburban"> jucerVersion="3.1.0" companyName="Digital Suburban">

@ -218,7 +218,7 @@
#define JucePlugin_WantsMidiInput 1 #define JucePlugin_WantsMidiInput 1
#endif #endif
#ifndef JucePlugin_ProducesMidiOutput #ifndef JucePlugin_ProducesMidiOutput
#define JucePlugin_ProducesMidiOutput 0 #define JucePlugin_ProducesMidiOutput 1
#endif #endif
#ifndef JucePlugin_SilenceInProducesSilenceOut #ifndef JucePlugin_SilenceInProducesSilenceOut
#define JucePlugin_SilenceInProducesSilenceOut 0 #define JucePlugin_SilenceInProducesSilenceOut 0

@ -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... //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void GlobalEditor::bind(DexedAudioProcessor *parent) { void GlobalEditor::bind(DexedAudioProcessor *parent) {
repaint();
parent->algo->bind(algo); parent->algo->bind(algo);
parent->lfoRate->bind(lfoSpeed); parent->lfoRate->bind(lfoSpeed);
parent->lfoDelay->bind(lfoDelay); parent->lfoDelay->bind(lfoDelay);

@ -50,6 +50,9 @@ public:
void bind(DexedAudioProcessor *processor); void bind(DexedAudioProcessor *processor);
void setSystemMessage(String msg); void setSystemMessage(String msg);
void setParamMessage(String msg); void setParamMessage(String msg);
String systemMsg;
String paramMsg;
//[/UserMethods] //[/UserMethods]
void paint (Graphics& g); void paint (Graphics& g);
@ -62,8 +65,6 @@ public:
private: private:
//[UserVariables] -- You can add your own custom variables in this section. //[UserVariables] -- You can add your own custom variables in this section.
DexedAudioProcessor *processor; DexedAudioProcessor *processor;
String systemMsg;
String paramMsg;
//[/UserVariables] //[/UserVariables]
//============================================================================== //==============================================================================

@ -302,47 +302,54 @@ void OperatorEditor::resized()
void OperatorEditor::sliderValueChanged (Slider* sliderThatWasMoved) void OperatorEditor::sliderValueChanged (Slider* sliderThatWasMoved)
{ {
//[UsersliderValueChanged_Pre] //[UsersliderValueChanged_Pre]
envDisplay->repaint();
//[/UsersliderValueChanged_Pre] //[/UsersliderValueChanged_Pre]
if (sliderThatWasMoved == s_egl1) if (sliderThatWasMoved == s_egl1)
{ {
//[UserSliderCode_s_egl1] -- add your slider handling code here.. //[UserSliderCode_s_egl1] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egl1] //[/UserSliderCode_s_egl1]
} }
else if (sliderThatWasMoved == s_egl2) else if (sliderThatWasMoved == s_egl2)
{ {
//[UserSliderCode_s_egl2] -- add your slider handling code here.. //[UserSliderCode_s_egl2] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egl2] //[/UserSliderCode_s_egl2]
} }
else if (sliderThatWasMoved == s_egl3) else if (sliderThatWasMoved == s_egl3)
{ {
//[UserSliderCode_s_egl3] -- add your slider handling code here.. //[UserSliderCode_s_egl3] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egl3] //[/UserSliderCode_s_egl3]
} }
else if (sliderThatWasMoved == s_egl4) else if (sliderThatWasMoved == s_egl4)
{ {
//[UserSliderCode_s_egl4] -- add your slider handling code here.. //[UserSliderCode_s_egl4] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egl4] //[/UserSliderCode_s_egl4]
} }
else if (sliderThatWasMoved == s_egv1) else if (sliderThatWasMoved == s_egv1)
{ {
//[UserSliderCode_s_egv1] -- add your slider handling code here.. //[UserSliderCode_s_egv1] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egv1] //[/UserSliderCode_s_egv1]
} }
else if (sliderThatWasMoved == s_egv2) else if (sliderThatWasMoved == s_egv2)
{ {
//[UserSliderCode_s_egv2] -- add your slider handling code here.. //[UserSliderCode_s_egv2] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egv2] //[/UserSliderCode_s_egv2]
} }
else if (sliderThatWasMoved == s_egv3) else if (sliderThatWasMoved == s_egv3)
{ {
//[UserSliderCode_s_egv3] -- add your slider handling code here.. //[UserSliderCode_s_egv3] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egv3] //[/UserSliderCode_s_egv3]
} }
else if (sliderThatWasMoved == s_egv4) else if (sliderThatWasMoved == s_egv4)
{ {
//[UserSliderCode_s_egv4] -- add your slider handling code here.. //[UserSliderCode_s_egv4] -- add your slider handling code here..
envDisplay->repaint();
//[/UserSliderCode_s_egv4] //[/UserSliderCode_s_egv4]
} }
else if (sliderThatWasMoved == opLevel) else if (sliderThatWasMoved == opLevel)

@ -178,6 +178,14 @@ void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChange
void DexedAudioProcessorEditor::timerCallback() { void DexedAudioProcessorEditor::timerCallback() {
int32_t env[6]; int32_t env[6];
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 ) if ( processor->peekEnvStatus(env) == false )
return; return;

@ -420,7 +420,8 @@ void DexedAudioProcessor::unpackProgram(int idx) {
} }
void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) { void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) {
memcpy(data, rawdata, 160);
refreshUI = true;
} }
void DexedAudioProcessor::setDxValue(int offset, int v) { void DexedAudioProcessor::setDxValue(int offset, int v) {

@ -30,11 +30,13 @@
//============================================================================== //==============================================================================
DexedAudioProcessor::DexedAudioProcessor() { DexedAudioProcessor::DexedAudioProcessor() {
#ifdef DEBUG
Logger *tmp = Logger::getCurrentLogger(); Logger *tmp = Logger::getCurrentLogger();
if ( tmp == NULL ) { if ( tmp == NULL ) {
Logger::setCurrentLogger(FileLogger::createDateStampedLogger("Dexed", "DebugSession-", "log", "DexedAudioProcessor Created")); Logger::setCurrentLogger(FileLogger::createDateStampedLogger("Dexed", "DebugSession-", "log", "DexedAudioProcessor Created"));
} }
TRACE("Hi"); TRACE("Hi");
#endif
Exp2::init(); Exp2::init();
Tanh::init(); Tanh::init();
@ -174,12 +176,23 @@ void DexedAudioProcessor::processMidiMessage(MidiMessage *msg) {
// single voice dump // single voice dump
if ( buf[2] == 0 ) { if ( buf[2] == 0 ) {
if ( sz < 155 ) { if ( sz < 155 ) {
TRACE("wrong single voice datasize %d", buf[2]); TRACE("wrong single voice datasize %d", sz);
return; return;
} }
updateProgramFromSysex(buf+5); 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; return;
} }

@ -90,8 +90,11 @@ class DexedAudioProcessor : public AudioProcessor
public : public :
bool refreshUI; static const int REFRESH_MSG = 1;
bool sendSysexChange; static const int REFRESH_COMP = 1 << 1;
int refreshUI;
bool sendSysexChange = true;
char data[161]; char data[161];
Array<Ctrl*> ctrl; Array<Ctrl*> ctrl;

Loading…
Cancel
Save