Replies: 1 comment
-
It looks like you have a state management problem: you're using the same stateful "source of truth" (the ssPaterns array), but with two different inputs. Since you seem to have a "track" for each of the instruments, you could define those separately, and resolve to computing the correct byte values for the SysEx array when sending it: byte ssPatterns[18] = {
0xf0, 0x42, 0x30, 0x00, 0x01, 0x49, 0x41, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7
};
bool kickDrumPattern[16] = {
true, false, false, false,
true, false, false, false,
true, false, false, false,
true, false, false, false,
};
bool hiHatPattern[16] = {
true, false, true, false,
true, false, true, false,
true, false, true, false,
true, false, true, false,
};
const byte stepIndices[16] = {
0x1b, 0x1e, 0x21, 0x24,
0x27, 0x2a, 0x2d, 0x30,
0x33, 0x36, 0x39, 0x3c,
0x3f, 0x42, 0x45, 0x48,
};
void sendStepConfig(byte stepIndex)
{
ssPatterns[11] = stepIndices[stepIndex];
ssPatterns[15] = hiHatPattern[stepIndex] ? 0x10 : 0x00;
ssPatterns[16] = kickDrumPattern[stepIndex] ? 0x01 : 0x00;
MIDI.sendSysEx(18, ssPatterns, true);
}
for (byte i = 0; i < 16; ++i)
{
sendStepConfig(i);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am trying to control the steps of the Korg Kross2 Step Sequencer.
This is the SysEx array I use as a base:
Korg in his wisdom separated the sounds that the Step Seq uses into two groups, one group uses byte 16 and the other group uses byte 15.
So I'm trying to take advantage of that order by having the possibility of having two separate parts in the same pattern.
For example:
The Kick Drum and Snare Drum at byte 16, and the HiHat at byte 15.
Then I would have the possibility to make each part work without affecting the other.
This is the way I'm using it:
Where the kickDrum part uses byte16 and the HiHat part uses byte15
How can I change only byte 16 of the array without affecting byte 15, and vice versa, change byte 15 without affecting byte 16?
Or maybe I should ask the question differently:
How to send an 18 byte array without affecting byte 15?
either
Send an 18 Byte array without affecting byte 16
Beta Was this translation helpful? Give feedback.
All reactions