Added several controllers. Most of them are not ready...

pull/1/head
Holger Wirtz 8 years ago
parent f1e9078d17
commit c74b2b6635
  1. 464
      src/Dexed.ttl
  2. 54
      src/dexed.cpp
  3. 10
      src/dexed.h
  4. 14
      src/msfa/controllers.h
  5. 1107
      src/presets.ttl

File diff suppressed because it is too large Load Diff

@ -45,8 +45,8 @@ Dexed::Dexed(double rate) : lvtk::Synth<DexedVoice, Dexed>(p_n_ports, p_midi_in)
data_float[i]=static_cast<float>(data[i]); data_float[i]=static_cast<float>(data[i]);
currentNote = 0; currentNote = 0;
memset(&controllers.values_, 0, sizeof(controllers.values_));
controllers.values_[kControllerPitch] = 0x2000; controllers.values_[kControllerPitch] = 0x2000;
controllers.values_[kControllerPitchRange] = 12;
controllers.modwheel_cc = 0; controllers.modwheel_cc = 0;
controllers.foot_cc = 0; controllers.foot_cc = 0;
controllers.breath_cc = 0; controllers.breath_cc = 0;
@ -128,15 +128,15 @@ void Dexed::set_params(void)
_param_change_counter=0; _param_change_counter=0;
bool unisono=bool(*p(p_unisono)); bool polymono=bool(*p(p_polymono));
uint8_t engine=uint8_t(*p(p_engine)); uint8_t engine=uint8_t(*p(p_engine));
float f_gain=*p(p_output); float f_gain=*p(p_output);
float f_cutoff=*p(p_cutoff); float f_cutoff=*p(p_cutoff);
float f_reso=*p(p_resonance); float f_reso=*p(p_resonance);
// Dexed-Unisono // Dexed-Unisono
if(isMonoMode()!=unisono) if(isMonoMode()!=polymono)
setMonoMode(unisono); setMonoMode(polymono);
// Dexed-Engine // Dexed-Engine
if(controllers.core==NULL || getEngineType()!=engine) if(controllers.core==NULL || getEngineType()!=engine)
@ -316,12 +316,18 @@ void Dexed::set_params(void)
onParam(144,*p(p_transpose)); onParam(144,*p(p_transpose));
// 10 bytes (145-154) are the name of the patch // 10 bytes (145-154) are the name of the patch
// Pitch bend (added at the end of the data[]) // Controllers (added at the end of the data[])
onParam(156,*p(p_pitch_bend_range)); onParam(155,*p(p_pitch_bend_range));
onParam(157,*p(p_pitch_bend_step)); onParam(156,*p(p_pitch_bend_step));
onParam(158,*p(p_mod_wheel_range)); onParam(157,*p(p_mod_wheel_range));
onParam(159,*p(p_mod_wheel_step)); onParam(158,*p(p_mod_wheel_assign));
onParam(160,*p(p_master_tune)); onParam(159,*p(p_foot_ctrl_range));
onParam(160,*p(p_foot_ctrl_assign));
onParam(161,*p(p_breath_ctrl_range));
onParam(162,*p(p_breath_ctrl_assign));
onParam(163,*p(p_aftertouch_range));
onParam(164,*p(p_aftertouch_assign));
onParam(165,*p(p_master_tune));
if(_param_change_counter>PARAM_CHANGE_LEVEL) if(_param_change_counter>PARAM_CHANGE_LEVEL)
panic(); panic();
@ -678,7 +684,7 @@ void Dexed::onParam(uint8_t param_num,float param_val)
_param_change_counter++; _param_change_counter++;
if(param_num==160) if(param_num==165)
{ {
int32_t tune=param_val*0x4000; int32_t tune=param_val*0x4000;
controllers.masterTune=(tune<<11)*(1.0/12); controllers.masterTune=(tune<<11)*(1.0/12);
@ -693,17 +699,35 @@ void Dexed::onParam(uint8_t param_num,float param_val)
switch(param_num) switch(param_num)
{ {
case 156: case 155:
controllers.values_[kControllerPitchRange]=data[param_num]; controllers.values_[kControllerPitchRange]=data[param_num];
break; break;
case 157: case 156:
controllers.values_[kControllerPitchStep]=data[param_num]; controllers.values_[kControllerPitchStep]=data[param_num];
break; break;
case 157:
controllers.values_[kControllerModRange]=data[param_num];
break;
case 158: case 158:
//controllers.values_[kControllerModRange]=data[param_num]; controllers.values_[kControllerModAssign]=data[param_num];
break; break;
case 159: case 159:
//controllers.values_[kControllerModStep]=data[param_num]; controllers.values_[kControllerFootRange]=data[param_num];
break;
case 160:
controllers.values_[kControllerFootAssign]=data[param_num];
break;
case 161:
controllers.values_[kControllerBreathRange]=data[param_num];
break;
case 162:
controllers.values_[kControllerBreathAssign]=data[param_num];
break;
case 163:
controllers.values_[kControllerATRange]=data[param_num];
break;
case 164:
controllers.values_[kControllerATAssign]=data[param_num];
break; break;
} }

@ -121,9 +121,8 @@ class Dexed : public lvtk::Synth<DexedVoice, Dexed>
double _rate; double _rate;
uint8_t _param_counter; uint8_t _param_counter;
uint8_t _param_change_counter; uint8_t _param_change_counter;
float data_float[161]; float data_float[166];
//uint8_t data[160]; uint8_t data[166]={
uint8_t data[161]={
95, 29, 20, 50, 99, 95, 00, 00, 41, 00, 19, 00, 00, 03, 00, 06, 79, 00, 01, 00, 14, 95, 29, 20, 50, 99, 95, 00, 00, 41, 00, 19, 00, 00, 03, 00, 06, 79, 00, 01, 00, 14,
95, 20, 20, 50, 99, 95, 00, 00, 00, 00, 00, 00, 00, 03, 00, 00, 99, 00, 01, 00, 00, 95, 20, 20, 50, 99, 95, 00, 00, 00, 00, 00, 00, 00, 03, 00, 00, 99, 00, 01, 00, 00,
95, 29, 20, 50, 99, 95, 00, 00, 00, 00, 00, 00, 00, 03, 00, 06, 89, 00, 01, 00, 07, 95, 29, 20, 50, 99, 95, 00, 00, 00, 00, 00, 00, 00, 03, 00, 06, 89, 00, 01, 00, 07,
@ -135,8 +134,9 @@ class Dexed : public lvtk::Synth<DexedVoice, Dexed>
34, 33, 00, 00, 00, 04, 34, 33, 00, 00, 00, 04,
03, 24, 03, 24,
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
63, 01, 00, 99, 00, 99, 00, 99, 00, 99, 00,
01, 12, 12, 12, 00}; 63
};
}; };
#endif // PLUGINPROCESSOR_H_INCLUDED #endif // PLUGINPROCESSOR_H_INCLUDED

@ -31,6 +31,18 @@
const int kControllerPitch = 0; const int kControllerPitch = 0;
const int kControllerPitchRange = 1; const int kControllerPitchRange = 1;
const int kControllerPitchStep = 2; const int kControllerPitchStep = 2;
const int kControllerMod = 4;
const int kControllerModRange = 5;
const int kControllerModAssign = 6;
const int kControllerFoot = 7;
const int kControllerFootRange = 8;
const int kControllerFootAssign = 9;
const int kControllerBreath = 10;
const int kControllerBreathRange = 11;
const int kControllerBreathAssign = 12;
const int kControllerAT = 13;
const int kControllerATRange = 14;
const int kControllerATAssign = 15;
class FmCore; class FmCore;
@ -77,7 +89,7 @@ class Controllers {
} }
public: public:
int32_t values_[3]; int32_t values_[16];
char opSwitch[7]; char opSwitch[7];

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save