Several fixes:

- MW/AT/FC/BC should now work.
- Fix for avoid crashing at removing plugin.
pull/2/head
Holger Wirtz 7 years ago
parent 5feb790b60
commit 58f8f4c3f8
  1. 35
      src/dexed.cpp
  2. 14
      src/msfa/controllers.h

@ -133,29 +133,31 @@ Dexed::~Dexed()
{
TRACE("Hi");
if(outbuf_!=NULL)
TRACE("0");
if(outbuf_)
delete [] outbuf_;
currentNote = -1;
TRACE("1");
for (uint8_t note = 0; note < MAX_ACTIVE_NOTES; ++note)
{
if ( voices[note].dx7_note != NULL )
if(voices[note].dx7_note)
{
delete voices[note].dx7_note;
voices[note].dx7_note = NULL;
}
voices[note].keydown = false;
voices[note].sustained = false;
voices[note].live = false;
}
TRACE("2");
if(engineMsfa)
delete(engineMkI);
delete(engineMsfa);
TRACE("3");
if(engineOpl)
delete(engineMkI);
delete(engineOpl);
TRACE("4");
if(engineMkI)
delete(engineMkI);
TRACE("5");
TRACE("Bye");
TRACE("--------------------------------------------------------------------------------");
@ -784,29 +786,44 @@ void Dexed::onParam(uint8_t param_num,float param_val)
controllers.values_[kControllerPitchStep]=data[param_num];
break;
case 157:
TRACE("wheel.setRange(%d)",data[param_num]);
controllers.wheel.setRange(data[param_num]);
controllers.wheel.setTarget(data[param_num+1]);
controllers.refresh();
break;
case 158:
controllers.wheel.setRange(data[param_num-1]);
controllers.wheel.setTarget(data[param_num]);
controllers.refresh();
break;
case 159:
controllers.foot.setRange(data[param_num]);
controllers.foot.setTarget(data[param_num+1]);
controllers.refresh();
break;
case 160:
controllers.foot.setRange(data[param_num-1]);
controllers.foot.setTarget(data[param_num]);
controllers.refresh();
break;
case 161:
controllers.breath.setRange(data[param_num]);
controllers.breath.setTarget(data[param_num+1]);
controllers.refresh();
break;
case 162:
controllers.breath.setRange(data[param_num-1]);
controllers.breath.setTarget(data[param_num]);
controllers.refresh();
break;
case 163:
controllers.at.setRange(data[param_num]);
controllers.at.setTarget(data[param_num+1]);
controllers.refresh();
break;
case 164:
controllers.at.setRange(data[param_num-1]);
controllers.at.setTarget(data[param_num]);
controllers.refresh();
break;
case 165:
tune=param_val*0x4000;

@ -52,13 +52,13 @@ struct FmMod {
}
void setTarget(uint8_t assign) {
TRACE("Target: %d", assign);
assign=assign < 0 && assign > 7 ? 0 : assign;
if(assign&1) // AMP
pitch=true;
if(assign&2) // PITCH
amp=true;
if(assign&4) // EG
eg=true;
pitch=assign&1; // AMP
amp=assign&2; // PITCH
eg=assign&4; // EG
TRACE("pitch[%d] amp[%d] eg[%d]", pitch,amp,eg);
}
};
@ -115,8 +115,6 @@ public:
if ( ! ((wheel.eg || foot.eg) || (breath.eg || at.eg)) )
eg_mod = 127;
TRACE("amp_mod %d pitch_mod %d", amp_mod, pitch_mod);
}
FmCore *core;

Loading…
Cancel
Save