diff --git a/guitfx.c b/guitfx.c index 052e37a..a512079 100644 --- a/guitfx.c +++ b/guitfx.c @@ -87,13 +87,16 @@ static void on_process(void *userdata, struct spa_io_position *position) switch( midi_data[1] ) { case 0x0b: // expr pedal - float val_f = ((float)midi_data[2]) / 128.0; - printf("Expr Pedal %f\n", val_f); - if ( val_f > 0.1 ) { - data->delay.mix = val_f; - } else { - data->delay.mix = 0.0; - } + float val_f = ((float)midi_data[2]) / 128.0; + + float thres = 0.4; + + if ( val_f > thres ) { + printf("Expr Pedal %f\n", val_f); + data->delay.mix = (val_f - thres) / (1.0-thres); + } else { + data->delay.mix = 0.0; + } break; case 0x42: