UI / automation fix

pull/1/head
asb2m10 11 years ago
parent 55183f4a81
commit fec88d7287
  1. BIN
      Builds/MacOSX/Dexed.xcodeproj/project.xcworkspace/xcuserdata/asb2m10.xcuserdatad/UserInterfaceState.xcuserstate
  2. 8
      Source/PluginEditor.cpp
  3. 3
      Source/PluginFx.cpp
  4. 4
      Source/PluginParam.cpp
  5. 2
      Source/PluginProcessor.h

@ -138,6 +138,9 @@ void DexedAudioProcessorEditor::paint (Graphics& g) {
void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) { void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) {
if (buttonThatWasClicked == cartButton) { if (buttonThatWasClicked == cartButton) {
int result = cartPopup.show(); int result = cartPopup.show();
if ( result < 1 )
return;
processor->loadBuiltin(result-1); processor->loadBuiltin(result-1);
processor->setCurrentProgram(0); processor->setCurrentProgram(0);
rebuildProgramCombobox(); rebuildProgramCombobox();
@ -215,6 +218,11 @@ void DexedAudioProcessorEditor::comboBoxChanged (ComboBox* comboBoxThatHasChange
} }
void DexedAudioProcessorEditor::timerCallback() { void DexedAudioProcessorEditor::timerCallback() {
if ( processor->forceRefreshUI ) {
processor->forceRefreshUI = false;
updateUI();
}
if ( ! processor->peekVoiceStatus() ) if ( ! processor->peekVoiceStatus() )
return; return;

@ -115,14 +115,13 @@ void PluginFx::process(float *work, int sampleSize) {
// maybe smooth this value // maybe smooth this value
float g = rCutoff; float g = rCutoff;
float lpc = g / (1 + g);
for(int i=0; i < sampleSize; i++ ) { for(int i=0; i < sampleSize; i++ ) {
float s = work[i]; float s = work[i];
s = s - 0.45*tptlpupw(c,s,15,sampleRateInv); s = s - 0.45*tptlpupw(c,s,15,sampleRateInv);
s = tptpc(d,s,bright); s = tptpc(d,s,bright);
float lpc = g / (1 + g);
float y0 = NR24(s,g,lpc); float y0 = NR24(s,g,lpc);
//first low pass in cascade //first low pass in cascade

@ -130,6 +130,7 @@ void CtrlDX::setValueHost(float f) {
} }
void CtrlDX::setValue(int v) { void CtrlDX::setValue(int v) {
TRACE("setting value %d %d", dxOffset, v);
if (v >= steps) { if (v >= steps) {
TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v); TRACE("WARNING: value too big %s : %d", label.toRawUTF8(), v);
v = steps - 1; v = steps - 1;
@ -137,7 +138,7 @@ void CtrlDX::setValue(int v) {
dxValue = v; dxValue = v;
if (dxOffset >= 0) { if (dxOffset >= 0) {
if (parent != NULL) if (parent != NULL)
parent->setDxValue(dxOffset, v); parent->setDxValue(dxOffset, dxValue);
} }
} }
@ -385,6 +386,7 @@ float DexedAudioProcessor::getParameter(int index) {
void DexedAudioProcessor::setParameter(int index, float newValue) { void DexedAudioProcessor::setParameter(int index, float newValue) {
ctrl[index]->setValueHost(newValue); ctrl[index]->setValueHost(newValue);
forceRefreshUI = true;
} }
int DexedAudioProcessor::getNumPrograms() { int DexedAudioProcessor::getNumPrograms() {

@ -112,6 +112,8 @@ public :
CartridgeManager cartManager; CartridgeManager cartManager;
VoiceStatus voiceStatus; VoiceStatus voiceStatus;
bool forceRefreshUI;
Array<Ctrl*> ctrl; Array<Ctrl*> ctrl;
OperatorCtrl opCtrl[6]; OperatorCtrl opCtrl[6];

Loading…
Cancel
Save