diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-03-11 16:13:20 -0500 |
|---|---|---|
| committer | Jared DeCook <jareddecook@Jareds-MacBook-Pro.local> | 2023-03-11 16:13:20 -0500 |
| commit | 2d201bd278efe554a4c3329c21b4b6bda500682e (patch) | |
| tree | 97d21bc58da5a7fc00cc406ffd42f2abed31d45d /HexBoard_V1.1.ino | |
| parent | dcab07e89b762bf7e5d4a17eabd74db80a2ff067 (diff) | |
| download | HexBoard-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.ino | 13 |
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. |
