Fixes for modwheel.

pull/2/head
Holger Wirtz 7 years ago
parent bcff44c0a3
commit 5feb790b60
  1. 4
      src/Makefile
  2. 1
      src/dexed.cpp
  3. 6
      src/msfa/controllers.h
  4. 2
      src/presets.ttl

@ -1,8 +1,8 @@
BUNDLE=dexed.lv2
TARGET=dexed.so
DEBUG=1
FILETRACE=1
#DEBUG=1
#FILETRACE=1
INSTALL_DIR=/zynthian/zynthian-plugins/lv2
INSTALL_MYPLUGINS_DIR=/zynthian/zynthian-my-plugins/lv2

@ -784,6 +784,7 @@ 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]);
break;
case 158:

@ -48,6 +48,7 @@ struct FmMod {
void setRange(uint8_t r) {
range = r < 0 && r > 127 ? 0 : r;
TRACE("range=%d",range);
}
void setTarget(uint8_t assign) {
@ -64,8 +65,9 @@ struct FmMod {
class Controllers {
void applyMod(int cc, FmMod &mod) {
float range = 0.01 * mod.range;
uint8_t total = cc * range;
TRACE("amp[%d]|pitch[%d]|eg[%d] %d",mod.amp,mod.pitch,mod.eg,total);
uint8_t total = (float)cc * range;
TRACE("amp[%d]|pitch[%d]|eg[%d]",mod.amp,mod.pitch,mod.eg);
TRACE("range=%f mod.range=%d total=%d cc=%d",range,mod.range,total,cc);
if(mod.amp)
amp_mod = max(amp_mod, total);

@ -34,7 +34,7 @@
pset:value 99.0
] , [
lv2:symbol "mod_wheel_assign" ;
pset:value 0.0
pset:value 7.0
] , [
lv2:symbol "foot_ctrl_range" ;
pset:value 99.0

Loading…
Cancel
Save