about summary refs log tree commit diff
path: root/HexBoard_V1.1.ino
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-03-11 16:13:20 -0500
committerJared DeCook <jareddecook@Jareds-MacBook-Pro.local>2023-03-11 16:13:20 -0500
commit2d201bd278efe554a4c3329c21b4b6bda500682e (patch)
tree97d21bc58da5a7fc00cc406ffd42f2abed31d45d /HexBoard_V1.1.ino
parentdcab07e89b762bf7e5d4a17eabd74db80a2ff067 (diff)
downloadHexBoard-2d201bd278efe554a4c3329c21b4b6bda500682e.tar.gz
Sequencer: rely on the steps toggles instead of just playing all the time
lol
Diffstat (limited to 'HexBoard_V1.1.ino')
-rw-r--r--HexBoard_V1.1.ino13
1 files changed, 8 insertions, 5 deletions
diff --git a/HexBoard_V1.1.ino b/HexBoard_V1.1.ino
index 550f572..fe1c66b 100644
--- a/HexBoard_V1.1.ino
+++ b/HexBoard_V1.1.ino
@@ -689,15 +689,18 @@ void sequencerPlayNextNote(){
     if(lanes[i].state & STATE_MUTE){
       continue;
     }
-    // do the thing.
-    noteOn(midiChannel, lanes[i].instrument % 128, midiVelocity);
-    // TODO: Change when the noteoff is played?
-    noteOff(midiChannel, lanes[i].instrument % 128, 0);
+    int offset = lanes[i].bank * 16;
+    if(lanes[i].steps[sequencerStep+offset]){
+      // do the thing.
+      noteOn(midiChannel, lanes[i].instrument % 128, midiVelocity);
+      // TODO: Change when the noteoff is played?
+      noteOff(midiChannel, lanes[i].instrument % 128, 0);
+    }
   }
   
   // increment and confine to limit
   sequencerStep++;
-  sequencerStep%=32;
+  sequencerStep%=16;
 }
 
 // Return the first note that is currently held.