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. 14
      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"
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">

@ -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

@ -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);

@ -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]
//==============================================================================

@ -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)

@ -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);
}

@ -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) {

@ -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;
}

@ -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*> ctrl;

Loading…
Cancel
Save