From d2fd1c1403de3be1de395e00af52c93331febdb9 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 29 Jul 2023 21:36:05 +0100 Subject: [PATCH] update midi example to test input sliders 0-7 --- examples/midi/main.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/midi/main.rb b/examples/midi/main.rb index b0450af..c9d7aef 100644 --- a/examples/midi/main.rb +++ b/examples/midi/main.rb @@ -21,8 +21,8 @@ class Main end def midi_handler(i, val) - if i.between?(1, 8) - @vm.strip[i - 1].gainlayer[GAINLAYER].gain = (val * 72 / 127) - 60 + if i.between?(0, 7) + @vm.strip[i].gainlayer[GAINLAYER].gain = (val * 72 / 127) - 60 end end end