up expr threshold

This commit is contained in:
Michael Sippel 2025-02-13 18:00:59 +01:00
parent e36a4635e8
commit ce2212708a
Signed by: senvas
GPG key ID: 060F22F65102F95C

View file

@ -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;
} }