expr pedal threshold
This commit is contained in:
parent
c75d61123a
commit
bcead0e0b5
1 changed files with 10 additions and 7 deletions
7
guitfx.c
7
guitfx.c
|
@ -88,9 +88,12 @@ static void on_process(void *userdata, struct spa_io_position *position)
|
|||
case 0x0b:
|
||||
// expr pedal
|
||||
float val_f = ((float)midi_data[2]) / 128.0;
|
||||
|
||||
float thres = 0.4;
|
||||
|
||||
if ( val_f > thres ) {
|
||||
printf("Expr Pedal %f\n", val_f);
|
||||
if ( val_f > 0.1 ) {
|
||||
data->delay.mix = val_f;
|
||||
data->delay.mix = (val_f - thres) / (1.0-thres);
|
||||
} else {
|
||||
data->delay.mix = 0.0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue