From ed44cbdf9ea602b11f0fad98a839ce5e283777aa Mon Sep 17 00:00:00 2001 From: PolyMeilex Date: Thu, 28 Mar 2024 19:34:04 +0100 Subject: [PATCH] [CLI] Fix custom keyboard ranges --- neothesia-cli/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neothesia-cli/src/main.rs b/neothesia-cli/src/main.rs index 32093fbd..71ba1dd2 100644 --- a/neothesia-cli/src/main.rs +++ b/neothesia-cli/src/main.rs @@ -314,8 +314,9 @@ fn file_midi_events( _ => continue, }; + let range_start = keyboard.range().start() as usize; if keyboard.range().contains(key) && e.channel != 9 { - let id = key as usize - 21; + let id = key as usize - range_start; let key = &mut keyboard.key_states_mut()[id]; if is_on {