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