sargentpilcher
Well-known member
So I have a meter strip of DotStar LED's at 144 LED's per meter, and I'm lighting them up with MIDI messages. The problem I am currently facing is that MIDI maxes out at 128 numerical values, yet in my 144 LED strip since they are RGB's there are effectively 432 LED's. So my MIDI commands that I currently have only light up 1/4 of the entire strip.
I am trying to figure out how I can use MIDI Channel 1 to control 1/4 of the strip, MIDI Channel 2 to control the next 1/4 etc.
Currently the code goes like this:
I tried 2 different things and neither worked. One of them was changing the header at the top to say "Channel 3" like
and the other thing I tried was including the channel variable in with the note variable, but it also did not work.
Any help pushing me in the right direction, or an article, or a relevant sketch would be so helpful! I haven't found any sketches that require the use of more than 1 channel of MIDI.
Thanks in advance for any help!
I am trying to figure out how I can use MIDI Channel 1 to control 1/4 of the strip, MIDI Channel 2 to control the next 1/4 etc.
Currently the code goes like this:
Code:
void OnNoteOn(byte channel, byte note, byte velocity)
{
{
if (note == 0)
{
red0 = velocity*2;
}
if (note == 1)
{
green0 = velocity*2;
}
if (note == 2)
{
blue0 = velocity*2;
}
strip2.setPixelColor(0, red0, green0, blue0);
{
{
if (note == 3)
{
red1 = velocity*2;
}
if (note == 4)
{
green1 = velocity*2;
}
if (note == 5)
{
blue1 = velocity*2;
}
strip2.setPixelColor(1, red1, green1, blue1);
I tried 2 different things and neither worked. One of them was changing the header at the top to say "Channel 3" like
Code:
void OnNoteOn(byte channel3, byte note, byte velocity)
and the other thing I tried was including the channel variable in with the note variable, but it also did not work.
Code:
void OnNoteOn(byte channel, byte note, byte velocity)
{
{
if (Channel == 1, note == 0)
{
red0 = velocity*2;
}
if (Channel == 1, note == 1)
{
green0 = velocity*2;
}
if (Channel == 1, note == 2)
{
blue0 = velocity*2;
}
strip2.setPixelColor(0, red0, green0, blue0);
{
{
if (Channel == 2, note == 3)
{
red1 = velocity*2;
}
if (Channel == 2, note == 4)
{
green1 = velocity*2;
}
if (Channel == 2, note == 5)
{
blue1 = velocity*2;
}
strip2.setPixelColor(1, red1, green1, blue1);
Any help pushing me in the right direction, or an article, or a relevant sketch would be so helpful! I haven't found any sketches that require the use of more than 1 channel of MIDI.
Thanks in advance for any help!
Last edited: