|
|
@ -65,7 +65,6 @@ void Ctrl::unbind() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ************************************************************************
|
|
|
|
// ************************************************************************
|
|
|
|
// CtrlInt ================================================================
|
|
|
|
// CtrlInt ================================================================
|
|
|
|
CtrlDX::CtrlDX(String name, int steps, int offset, bool starts1) : |
|
|
|
CtrlDX::CtrlDX(String name, int steps, int offset, bool starts1) : |
|
|
@ -129,14 +128,17 @@ void CtrlDX::comboBoxChanged (ComboBox* combo) { |
|
|
|
void CtrlDX::updateComponent() { |
|
|
|
void CtrlDX::updateComponent() { |
|
|
|
//TRACE("setting for %s %d", label.toRawUTF8(), getValue());
|
|
|
|
//TRACE("setting for %s %d", label.toRawUTF8(), getValue());
|
|
|
|
if (slider != NULL) { |
|
|
|
if (slider != NULL) { |
|
|
|
slider->setValue(getValue() + add1, NotificationType::dontSendNotification); |
|
|
|
slider->setValue(getValue() + add1, |
|
|
|
|
|
|
|
NotificationType::dontSendNotification); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (button != NULL) { |
|
|
|
if (button != NULL) { |
|
|
|
if (getValue() == 0) { |
|
|
|
if (getValue() == 0) { |
|
|
|
button->setToggleState(false, NotificationType::dontSendNotification); |
|
|
|
button->setToggleState(false, |
|
|
|
|
|
|
|
NotificationType::dontSendNotification); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
button->setToggleState(true, NotificationType::dontSendNotification); |
|
|
|
button->setToggleState(true, |
|
|
|
|
|
|
|
NotificationType::dontSendNotification); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -171,7 +173,8 @@ void DexedAudioProcessor::initCtrl() { |
|
|
|
|
|
|
|
|
|
|
|
String opLevel; |
|
|
|
String opLevel; |
|
|
|
opLevel << opName << "-EGL" << (j + 1); |
|
|
|
opLevel << opName << "-EGL" << (j + 1); |
|
|
|
opCtrl[opVal].egLevel[j] = new CtrlDX(opLevel, 100, opTarget+j+4); |
|
|
|
opCtrl[opVal].egLevel[j] = new CtrlDX(opLevel, 100, |
|
|
|
|
|
|
|
opTarget + j + 4); |
|
|
|
ctrl.add(opCtrl[opVal].egLevel[j]); |
|
|
|
ctrl.add(opCtrl[opVal].egLevel[j]); |
|
|
|
} |
|
|
|
} |
|
|
|
String opVol; |
|
|
|
String opVol; |
|
|
@ -206,12 +209,14 @@ void DexedAudioProcessor::initCtrl() { |
|
|
|
|
|
|
|
|
|
|
|
String sclLeftDepth; |
|
|
|
String sclLeftDepth; |
|
|
|
sclLeftDepth << opName << "-SCL_LFT_DEPTH"; |
|
|
|
sclLeftDepth << opName << "-SCL_LFT_DEPTH"; |
|
|
|
opCtrl[opVal].sclLeftDepth = new CtrlDX(sclLeftDepth, 100, opTarget+9); |
|
|
|
opCtrl[opVal].sclLeftDepth = new CtrlDX(sclLeftDepth, 100, |
|
|
|
|
|
|
|
opTarget + 9); |
|
|
|
ctrl.add(opCtrl[opVal].sclLeftDepth); |
|
|
|
ctrl.add(opCtrl[opVal].sclLeftDepth); |
|
|
|
|
|
|
|
|
|
|
|
String sclRightDepth; |
|
|
|
String sclRightDepth; |
|
|
|
sclRightDepth << opName << "-SCL_RHT_DEPTH"; |
|
|
|
sclRightDepth << opName << "-SCL_RHT_DEPTH"; |
|
|
|
opCtrl[opVal].sclRightDepth = new CtrlDX(sclRightDepth, 100, opTarget+10); |
|
|
|
opCtrl[opVal].sclRightDepth = new CtrlDX(sclRightDepth, 100, |
|
|
|
|
|
|
|
opTarget + 10); |
|
|
|
ctrl.add(opCtrl[opVal].sclRightDepth); |
|
|
|
ctrl.add(opCtrl[opVal].sclRightDepth); |
|
|
|
|
|
|
|
|
|
|
|
String sclLeftCurve; |
|
|
|
String sclLeftCurve; |
|
|
@ -221,7 +226,8 @@ void DexedAudioProcessor::initCtrl() { |
|
|
|
|
|
|
|
|
|
|
|
String sclRightCurve; |
|
|
|
String sclRightCurve; |
|
|
|
sclRightCurve << opName << "-SCL_RHT_CURVE"; |
|
|
|
sclRightCurve << opName << "-SCL_RHT_CURVE"; |
|
|
|
opCtrl[opVal].sclRightCurve = new CtrlDX(sclRightCurve, 4, opTarget+12); |
|
|
|
opCtrl[opVal].sclRightCurve = new CtrlDX(sclRightCurve, 4, |
|
|
|
|
|
|
|
opTarget + 12); |
|
|
|
ctrl.add(opCtrl[opVal].sclRightCurve); |
|
|
|
ctrl.add(opCtrl[opVal].sclRightCurve); |
|
|
|
|
|
|
|
|
|
|
|
String sclRate; |
|
|
|
String sclRate; |
|
|
@ -275,11 +281,18 @@ int DexedAudioProcessor::importSysex(const char *imported) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
for (int j = 0; j < 10; j++) { |
|
|
|
char c = (unsigned char) patchNames[i][j]; |
|
|
|
char c = (unsigned char) patchNames[i][j]; |
|
|
|
switch (c) { |
|
|
|
switch (c) { |
|
|
|
case 92: c = 'Y'; break; /* yen */ |
|
|
|
case 92: |
|
|
|
case 126: c = '>'; break; /* >> */ |
|
|
|
c = 'Y'; |
|
|
|
case 127: c = '<'; break; /* << */ |
|
|
|
break; /* yen */ |
|
|
|
|
|
|
|
case 126: |
|
|
|
|
|
|
|
c = '>'; |
|
|
|
|
|
|
|
break; /* >> */ |
|
|
|
|
|
|
|
case 127: |
|
|
|
|
|
|
|
c = '<'; |
|
|
|
|
|
|
|
break; /* << */ |
|
|
|
default: |
|
|
|
default: |
|
|
|
if (c < 32 || c > 127) c = 32; |
|
|
|
if (c < 32 || c > 127) |
|
|
|
|
|
|
|
c = 32; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
patchNames[i][j] = c; |
|
|
|
patchNames[i][j] = c; |
|
|
@ -328,7 +341,6 @@ void DexedAudioProcessor::unpackProgram(int idx) { |
|
|
|
data[160] = 1; |
|
|
|
data[160] = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) { |
|
|
|
void DexedAudioProcessor::updateProgramFromSysex(const uint8 *rawdata) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -401,7 +413,6 @@ const String DexedAudioProcessor::getProgramName (int index) { |
|
|
|
void DexedAudioProcessor::changeProgramName(int index, const String& newName) { |
|
|
|
void DexedAudioProcessor::changeProgramName(int index, const String& newName) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const String DexedAudioProcessor::getParameterName(int index) { |
|
|
|
const String DexedAudioProcessor::getParameterName(int index) { |
|
|
|
return ctrl[index]->label; |
|
|
|
return ctrl[index]->label; |
|
|
|
} |
|
|
|
} |
|
|
@ -418,24 +429,23 @@ void DexedAudioProcessor::getStateInformation (MemoryBlock& destData) { |
|
|
|
destData.insert(data, 161, 0); |
|
|
|
destData.insert(data, 161, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void DexedAudioProcessor::setStateInformation (const void* source, int sizeInBytes) { |
|
|
|
void DexedAudioProcessor::setStateInformation(const void* source, |
|
|
|
|
|
|
|
int sizeInBytes) { |
|
|
|
// You should use this method to restore your parameters from this memory block,
|
|
|
|
// You should use this method to restore your parameters from this memory block,
|
|
|
|
// whose contents will have been created by the getStateInformation() call.
|
|
|
|
// whose contents will have been created by the getStateInformation() call.
|
|
|
|
memcpy((void *) data, source, sizeInBytes); |
|
|
|
memcpy((void *) data, source, sizeInBytes); |
|
|
|
updateUI(); |
|
|
|
updateUI(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
//==============================================================================
|
|
|
|
void DexedAudioProcessor::getCurrentProgramStateInformation (MemoryBlock& destData) { |
|
|
|
void DexedAudioProcessor::getCurrentProgramStateInformation( |
|
|
|
|
|
|
|
MemoryBlock& destData) { |
|
|
|
destData.insert(data, 161, 0); |
|
|
|
destData.insert(data, 161, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void DexedAudioProcessor::setCurrentProgramStateInformation (const void* source, int sizeInBytes) { |
|
|
|
void DexedAudioProcessor::setCurrentProgramStateInformation(const void* source, |
|
|
|
|
|
|
|
int sizeInBytes) { |
|
|
|
memcpy((void *) data, source, sizeInBytes); |
|
|
|
memcpy((void *) data, source, sizeInBytes); |
|
|
|
updateUI(); |
|
|
|
updateUI(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|