|
|
|
@ -22,7 +22,7 @@ float ccToLFOStep(int x) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
float ccToLFOPitchMod(int x) { |
|
|
|
|
return 0.01 * exp(x * 7.090076835776092 / 127.0); |
|
|
|
|
return pow(x / 127.0, 2) * 6; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Channel::loadPreset(const Preset * preset) { |
|
|
|
@ -51,7 +51,7 @@ void Channel::loadPreset(const Preset * preset) { |
|
|
|
|
settings.keyTrack = preset->keyTrack / 127.0; |
|
|
|
|
settings.lfoStep = ccToLFOStep(preset->lfoFreq); |
|
|
|
|
settings.lfoPitchMod = ccToLFOPitchMod(preset->lfoPitchMod); |
|
|
|
|
settings.lfoFltMod = preset->lfoFltMod / 127.0; |
|
|
|
|
settings.lfoFltMod = (preset->lfoFltMod - 64) / 126.0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Channel::noteOn(int note, int velocity) { |
|
|
|
@ -141,7 +141,7 @@ void Channel::control(int code, int value) { |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case CC_LFO_FLT: // LFO Filter Modulation
|
|
|
|
|
settings.lfoFltMod = value / 127.0; |
|
|
|
|
settings.lfoFltMod = (value - 64) / 126.0; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |