From bc88610cd8dc77eeb8342691355941d4efa12c0d Mon Sep 17 00:00:00 2001 From: DL1YCF Date: Sat, 8 May 2021 12:56:20 +0200 Subject: [PATCH] Restored "wheel speed" behaviour --- midi2.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/midi2.c b/midi2.c index ee2746d..72e03ae 100644 --- a/midi2.c +++ b/midi2.c @@ -73,17 +73,14 @@ void NewMidiEvent(enum MIDIevent event, int channel, int note, int val) { if (delta < desc->delay) break; last_wheel_tp = tp; } - // translate value to direction + // translate value to direction/speed new=0; - new=val-64; // FIXME: allow for different speed - /* - if ((val >= desc->vfl1) && (val <= desc->vfl2)) new=-100; - if ((val >= desc-> fl1) && (val <= desc-> fl2)) new=-10; + if ((val >= desc->vfl1) && (val <= desc->vfl2)) new=-16; + if ((val >= desc-> fl1) && (val <= desc-> fl2)) new=-4; if ((val >= desc->lft1) && (val <= desc->lft2)) new=-1; if ((val >= desc->rgt1) && (val <= desc->rgt2)) new= 1; - if ((val >= desc-> fr1) && (val <= desc-> fr2)) new= 10; - if ((val >= desc->vfr1) && (val <= desc->vfr2)) new= 100; - */ + if ((val >= desc-> fr1) && (val <= desc-> fr2)) new= 4; + if ((val >= desc->vfr1) && (val <= desc->vfr2)) new= 16; // g_print("WHEEL: val=%d new=%d thrs=%d/%d, %d/%d, %d/%d, %d/%d, %d/%d, %d/%d\n", // val, new, desc->vfl1, desc->vfl2, desc->fl1, desc->fl2, desc->lft1, desc->lft2, // desc->rgt1, desc->rgt2, desc->fr1, desc->fr2, desc->vfr1, desc->vfr2); -- 2.45.2