Skip to content

Commit d3cdcff

Browse files
committed
All note app send out on all ports
1 parent a914c29 commit d3cdcff

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

Applications/Note/NoteControlBar.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool NoteControlBar::KeyEvent(Point xy, KeyInfo* keyInfo) {
7373
else if(xy == Point(0, CTL_BAR_Y - 1)) {
7474
if(keyInfo->State() == PRESSED) {
7575
if(ShiftActive()) {
76-
MatrixOS::MIDI::Send(MidiPacket::Stop());
76+
MatrixOS::MIDI::Send(MidiPacket::Stop(), MIDI_PORT_ALL);
7777
}
7878
else {
7979
pitch_down = MatrixOS::SYS::Millis();
@@ -86,13 +86,13 @@ bool NoteControlBar::KeyEvent(Point xy, KeyInfo* keyInfo) {
8686
int32_t pitch_val = 8192 - (((uint16_t)keyInfo->Force() * 8192) >> 16);
8787
if(pitch_val < 0) {pitch_val = 0;}
8888
MLOGD("Note", "Pitch Bend: %d", pitch_val);
89-
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, pitch_val));
89+
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, pitch_val), MIDI_PORT_ALL);
9090
}
9191
}
9292
else if(keyInfo->State() == RELEASED) {
9393
if(pitch_down != 0 && pitch_down > pitch_up)
9494
{
95-
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, 8192));
95+
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, 8192), MIDI_PORT_ALL);
9696
}
9797
pitch_down = 0;
9898
}
@@ -102,7 +102,7 @@ bool NoteControlBar::KeyEvent(Point xy, KeyInfo* keyInfo) {
102102
else if(xy == Point(1, CTL_BAR_Y - 1)) {
103103
if(keyInfo->State() == PRESSED) {
104104
if(ShiftActive()) {
105-
MatrixOS::MIDI::Send(MidiPacket::Start());
105+
MatrixOS::MIDI::Send(MidiPacket::Start(), MIDI_PORT_ALL);
106106
}
107107
else {
108108
pitch_up = MatrixOS::SYS::Millis();
@@ -114,13 +114,13 @@ bool NoteControlBar::KeyEvent(Point xy, KeyInfo* keyInfo) {
114114
{
115115
int32_t pitch_val = 8192 + (((uint16_t)keyInfo->Force() * 8191) >> 16);
116116
if(pitch_val > 16383) {pitch_val = 16383;}
117-
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, pitch_val));
117+
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, pitch_val), MIDI_PORT_ALL);
118118
}
119119
}
120120
else if(keyInfo->State() == RELEASED) {
121121
if(pitch_up != 0 && pitch_up >= pitch_down)
122122
{
123-
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, 8192));
123+
MatrixOS::MIDI::Send(MidiPacket::PitchBend(notePad[0]->rt->config->channel, 8192), MIDI_PORT_ALL);
124124
}
125125
pitch_up = 0;
126126
}

Applications/Note/NotePad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ NotePad::NotePad(Dimension dimension, NotePadRuntime* rt) {
3939
}
4040

4141
NotePad::~NotePad() {
42-
MatrixOS::MIDI::Send(MidiPacket::ControlChange(rt->config->channel, 123, 0)); // All notes off
42+
MatrixOS::MIDI::Send(MidiPacket::ControlChange(rt->config->channel, 123, 0), MIDI_PORT_ALL); // All notes off
4343
activeKeys.clear();
4444
}
4545

0 commit comments

Comments
 (0)