Skip to content

Commit

Permalink
Merge pull request #1162 from todbot/master
Browse files Browse the repository at this point in the history
Properly handle Program Change and Channel Aftertouch messages
  • Loading branch information
hathach authored Oct 25, 2021
2 parents 55e0b58 + 9f014b0 commit 39c7fa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/class/midi/midi_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const*
stream->buffer[0] = (cable_num << 4) | msg;
stream->total = 4;
}
else if ( msg == 0xC || msg == 0xD)
{
// Channel Voice Messages, two-byte variants (Program Change and Channel Pressure)
stream->buffer[0] = (cable_num << 4) | msg;
stream->total = 3;
}
else if ( msg == 0xf )
{
// System message
Expand Down

0 comments on commit 39c7fa1

Please sign in to comment.