pull/1/head
asb2m10 11 years ago
parent 9b4b92753e
commit 0768632125
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 52
      Source/PluginParam.cpp

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

Loading…
Cancel
Save