Skip to content

Commit cf2449a

Browse files
refactor(examples): standardize Scene G on SysEx7
Showcase recipes emit a Universal SysEx Identity Reply over SysEx7 (MT 0x3, auto-fragmented), matching what MIDI 2.0 hosts in the field parse today.
1 parent 11bbcf0 commit cf2449a

18 files changed

Lines changed: 116 additions & 109 deletions

File tree

examples/arduino-nano-esp32-midi2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ timeout 30 aseqdump -p ${PORT}
6565
|---|---|---|
6666
| 0x0 Utility | M2-104-UM §3 | JR heartbeat 500 ms, Delta Clockstamp |
6767
| 0x4 MIDI 2.0 Channel Voice | M2-104-UM §7 | 32-bit CCs, Per-Note family, Note Attribute, RPN/NRPN, Relative RPN/NRPN |
68-
| 0x5 SysEx8 | M2-104-UM §9 | raw 8-bit |
68+
| 0x3 SysEx7 | M2-104-UM §7.7 | up to 6 bytes per packet, auto-fragmented |
6969
| 0xD Flex Data | M2-104-UM §10 | Tempo, Time Sig, Key Sig, Metronome, Chord Name, Start/End of Clip |
7070
| 0xF UMP Stream | M2-104-UM §11 | full Endpoint + FB Discovery |
7171

@@ -86,7 +86,7 @@ Per cycle (~22 s):
8686
| **D.** Program + Bank | Program Change with bank MSB/LSB in a single UMP | MIDI 1.0 needs three messages |
8787
| **E.** RPN/NRPN | RPN 0/0, NRPN, Relative RPN (+delta), Relative NRPN (-delta) | RPN/NRPN first-class + Relative |
8888
| **F.** Note Attribute | Note On with `attribute_type=0x03` (pitch_7_9), E4 +50 cents | Microtonal attribute |
89-
| **G.** SysEx8 | 16 raw 8-bit bytes, no 7-bit aliasing | MT 0x5 |
89+
| **G.** SysEx7 | Universal SysEx Identity Reply, 12 bytes, auto-fragmented (Start + End) | MT 0x3 |
9090
| **H.** Delta Clockstamp | DCTPQ=480 + Delta Clockstamp=240 ticks | MT 0x0 utility |
9191
| **I.** PE Notify | Broadcast `OverlayRate` change to subscribers (value increments per cycle) | Property Exchange |
9292
| **J.** End of Clip | Sequencer End of Clip marker | MT 0xF status 0x21 |

examples/arduino-nano-esp32-midi2/idf/main/main.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Scene D, Program Change with Bank in a single UMP
3232
* Scene E, RPN/NRPN 32-bit + Relative RPN/NRPN (incremental)
3333
* Scene F, Note On with Attribute pitch_7_9 (microtonal +50¢)
34-
* Scene G, SysEx8 emission (8-bit SysEx, no 7-bit aliasing)
34+
* Scene G, SysEx7 emission (fragmented Universal SysEx Identity Reply)
3535
* Scene H, Delta Clockstamp (DCTPQ + delta ticks)
3636
* Scene I, Property Exchange Notify (broadcast OverlayRate change
3737
* to any current subscribers)
@@ -380,15 +380,17 @@ static void scene_f_attribute(m2device& midi, Showcase& s, uint32_t t) {
380380
}
381381
}
382382

383-
static void scene_g_sysex8(m2device& midi, Showcase& s, uint32_t t) {
383+
static void scene_g_sysex7(m2device& midi, Showcase& s, uint32_t t) {
384384
if (s.g_done || t < kG_Ms) return;
385+
// Universal SysEx Identity Reply, 12 bytes of 7-bit data.
386+
// sendSysEx7 fragments automatically into Start + End packets (MT 0x3).
385387
static const uint8_t payload[] = {
386-
0x7E, 0x7F, 0x06, 0x01,
387-
0xFF, 0xC3, 0xA1, 0xB2, 0xC4, 0xD5, 0xE6,
388-
0xF7, 0x00, 0x80, 0xAA, 0x55,
388+
0x7E, 0x7F, 0x06, 0x02,
389+
0x7D, 0x01, 0x00, 0x40,
390+
0x00, 0x04, 0x00, 0x00,
389391
};
390-
midi.sendSysEx8(/*group*/ 0, /*streamId*/ 1, payload, sizeof(payload));
391-
std::printf("[G] SysEx8 emitted (%zu raw 8-bit bytes)\r\n", sizeof(payload));
392+
midi.sendSysEx7(/*group*/ 0, payload, sizeof(payload));
393+
std::printf("[G] SysEx7 emitted (%zu bytes, Identity Reply)\r\n", sizeof(payload));
392394
s.g_done = true;
393395
}
394396

@@ -441,7 +443,7 @@ static void showcase_step(m2device& midi, m2ci& ci, Showcase& s) {
441443
scene_d_program(midi, s, t);
442444
scene_e_rpn_nrpn(midi, s, t);
443445
scene_f_attribute(midi, s, t);
444-
scene_g_sysex8(midi, s, t);
446+
scene_g_sysex7(midi, s, t);
445447
scene_h_dctpq(midi, s, t);
446448
scene_i_pe_notify(ci, s, t);
447449
scene_j_clip_end(midi, s, t);

examples/esp32-p4-devkit-usb-midi2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Microsoft MIDI Services Console (Windows) shows `ESP32P4DevKit` with Native data
6363
|---|---|---|
6464
| 0x0 Utility | M2-104-UM §3 | JR heartbeat 500 ms, Delta Clockstamp |
6565
| 0x4 MIDI 2.0 Channel Voice | M2-104-UM §7 | 32-bit CCs, Per-Note family, Note Attribute, RPN/NRPN, Relative RPN/NRPN |
66-
| 0x5 SysEx8 | M2-104-UM §9 | raw 8-bit |
66+
| 0x3 SysEx7 | M2-104-UM §7.7 | up to 6 bytes per packet, auto-fragmented |
6767
| 0xD Flex Data | M2-104-UM §10 | Tempo, Time Sig, Key Sig, Metronome, Chord Name, Start/End of Clip |
6868
| 0xF UMP Stream | M2-104-UM §11 | full Endpoint + FB Discovery |
6969

@@ -83,7 +83,7 @@ Per cycle (~22 s):
8383
| **D.** Program + Bank | Program Change with bank MSB/LSB in a single UMP | MIDI 1.0 needs three messages |
8484
| **E.** RPN/NRPN | RPN 0/0, NRPN, Relative RPN (+delta), Relative NRPN (-delta) | RPN/NRPN first-class + Relative |
8585
| **F.** Note Attribute | Note On with `attribute_type=0x03` (pitch_7_9), E4 +50 cents | Microtonal attribute |
86-
| **G.** SysEx8 | 16 raw 8-bit bytes, no 7-bit aliasing | MT 0x5 |
86+
| **G.** SysEx7 | Universal SysEx Identity Reply, 12 bytes, auto-fragmented (Start + End) | MT 0x3 |
8787
| **H.** Delta Clockstamp | DCTPQ=480 + Delta Clockstamp=240 ticks | MT 0x0 utility |
8888
| **I.** PE Notify | Broadcast `OverlayRate` change to subscribers (value increments per cycle) | Property Exchange |
8989
| **J.** End of Clip | Sequencer End of Clip marker | MT 0xF status 0x21 |

examples/esp32-p4-devkit-usb-midi2/idf/main/main.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Scene D, Program Change with Bank in a single UMP
3434
* Scene E, RPN/NRPN 32-bit + Relative RPN/NRPN (incremental)
3535
* Scene F, Note On with Attribute pitch_7_9 (microtonal +50¢)
36-
* Scene G, SysEx8 emission (8-bit SysEx, no 7-bit aliasing)
36+
* Scene G, SysEx7 emission (fragmented Universal SysEx Identity Reply)
3737
* Scene H, Delta Clockstamp (DCTPQ + delta ticks)
3838
* Scene I, Property Exchange Notify (broadcast OverlayRate change
3939
* to any current subscribers)
@@ -382,15 +382,17 @@ static void scene_f_attribute(m2device& midi, Showcase& s, uint32_t t) {
382382
}
383383
}
384384

385-
static void scene_g_sysex8(m2device& midi, Showcase& s, uint32_t t) {
385+
static void scene_g_sysex7(m2device& midi, Showcase& s, uint32_t t) {
386386
if (s.g_done || t < kG_Ms) return;
387+
// Universal SysEx Identity Reply, 12 bytes of 7-bit data.
388+
// sendSysEx7 fragments automatically into Start + End packets (MT 0x3).
387389
static const uint8_t payload[] = {
388-
0x7E, 0x7F, 0x06, 0x01,
389-
0xFF, 0xC3, 0xA1, 0xB2, 0xC4, 0xD5, 0xE6,
390-
0xF7, 0x00, 0x80, 0xAA, 0x55,
390+
0x7E, 0x7F, 0x06, 0x02,
391+
0x7D, 0x01, 0x00, 0x40,
392+
0x00, 0x04, 0x00, 0x00,
391393
};
392-
midi.sendSysEx8(/*group*/ 0, /*streamId*/ 1, payload, sizeof(payload));
393-
std::printf("[G] SysEx8 emitted (%zu raw 8-bit bytes)\r\n", sizeof(payload));
394+
midi.sendSysEx7(/*group*/ 0, payload, sizeof(payload));
395+
std::printf("[G] SysEx7 emitted (%zu bytes, Identity Reply)\r\n", sizeof(payload));
394396
s.g_done = true;
395397
}
396398

@@ -443,7 +445,7 @@ static void showcase_step(m2device& midi, m2ci& ci, Showcase& s) {
443445
scene_d_program(midi, s, t);
444446
scene_e_rpn_nrpn(midi, s, t);
445447
scene_f_attribute(midi, s, t);
446-
scene_g_sysex8(midi, s, t);
448+
scene_g_sysex7(midi, s, t);
447449
scene_h_dctpq(midi, s, t);
448450
scene_i_pe_notify(ci, s, t);
449451
scene_j_clip_end(midi, s, t);

examples/esp32-s3-devkitc-usb-midi2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Microsoft MIDI Services Console (Windows) shows `ESP32S3DevKitC` with Native dat
8181
|---|---|---|
8282
| 0x0 Utility | M2-104-UM §3 | JR heartbeat 500 ms, Delta Clockstamp |
8383
| 0x4 MIDI 2.0 Channel Voice | M2-104-UM §7 | 32-bit CCs, Per-Note family, Note Attribute, RPN/NRPN, Relative RPN/NRPN |
84-
| 0x5 SysEx8 | M2-104-UM §9 | raw 8-bit |
84+
| 0x3 SysEx7 | M2-104-UM §7.7 | up to 6 bytes per packet, auto-fragmented |
8585
| 0xD Flex Data | M2-104-UM §10 | Tempo, Time Sig, Key Sig, Metronome, Chord Name, Start/End of Clip |
8686
| 0xF UMP Stream | M2-104-UM §11 | full Endpoint + FB Discovery |
8787

@@ -101,7 +101,7 @@ Per cycle (~22 s):
101101
| **D.** Program + Bank | Program Change with bank MSB/LSB in a single UMP | MIDI 1.0 needs three messages |
102102
| **E.** RPN/NRPN | RPN 0/0, NRPN, Relative RPN (+delta), Relative NRPN (-delta) | RPN/NRPN first-class + Relative |
103103
| **F.** Note Attribute | Note On with `attribute_type=0x03` (pitch_7_9), E4 +50 cents | Microtonal attribute |
104-
| **G.** SysEx8 | 16 raw 8-bit bytes, no 7-bit aliasing | MT 0x5 |
104+
| **G.** SysEx7 | Universal SysEx Identity Reply, 12 bytes, auto-fragmented (Start + End) | MT 0x3 |
105105
| **H.** Delta Clockstamp | DCTPQ=480 + Delta Clockstamp=240 ticks | MT 0x0 utility |
106106
| **I.** PE Notify | Broadcast `OverlayRate` change to subscribers (value increments per cycle) | Property Exchange |
107107
| **J.** End of Clip | Sequencer End of Clip marker | MT 0xF status 0x21 |

examples/esp32-s3-devkitc-usb-midi2/idf/main/main.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Scene D, Program Change with Bank in a single UMP
3333
* Scene E, RPN/NRPN 32-bit + Relative RPN/NRPN (incremental)
3434
* Scene F, Note On with Attribute pitch_7_9 (microtonal +50¢)
35-
* Scene G, SysEx8 emission (8-bit SysEx, no 7-bit aliasing)
35+
* Scene G, SysEx7 emission (fragmented Universal SysEx Identity Reply)
3636
* Scene H, Delta Clockstamp (DCTPQ + delta ticks)
3737
* Scene I, Property Exchange Notify (broadcast OverlayRate change
3838
* to any current subscribers)
@@ -382,15 +382,17 @@ static void scene_f_attribute(m2device& midi, Showcase& s, uint32_t t) {
382382
}
383383
}
384384

385-
static void scene_g_sysex8(m2device& midi, Showcase& s, uint32_t t) {
385+
static void scene_g_sysex7(m2device& midi, Showcase& s, uint32_t t) {
386386
if (s.g_done || t < kG_Ms) return;
387+
// Universal SysEx Identity Reply, 12 bytes of 7-bit data.
388+
// sendSysEx7 fragments automatically into Start + End packets (MT 0x3).
387389
static const uint8_t payload[] = {
388-
0x7E, 0x7F, 0x06, 0x01,
389-
0xFF, 0xC3, 0xA1, 0xB2, 0xC4, 0xD5, 0xE6,
390-
0xF7, 0x00, 0x80, 0xAA, 0x55,
390+
0x7E, 0x7F, 0x06, 0x02,
391+
0x7D, 0x01, 0x00, 0x40,
392+
0x00, 0x04, 0x00, 0x00,
391393
};
392-
midi.sendSysEx8(/*group*/ 0, /*streamId*/ 1, payload, sizeof(payload));
393-
std::printf("[G] SysEx8 emitted (%zu raw 8-bit bytes)\r\n", sizeof(payload));
394+
midi.sendSysEx7(/*group*/ 0, payload, sizeof(payload));
395+
std::printf("[G] SysEx7 emitted (%zu bytes, Identity Reply)\r\n", sizeof(payload));
394396
s.g_done = true;
395397
}
396398

@@ -443,7 +445,7 @@ static void showcase_step(m2device& midi, m2ci& ci, Showcase& s) {
443445
scene_d_program(midi, s, t);
444446
scene_e_rpn_nrpn(midi, s, t);
445447
scene_f_attribute(midi, s, t);
446-
scene_g_sysex8(midi, s, t);
448+
scene_g_sysex7(midi, s, t);
447449
scene_h_dctpq(midi, s, t);
448450
scene_i_pe_notify(ci, s, t);
449451
scene_j_clip_end(midi, s, t);

examples/rp2040-midi2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ timeout 30 aseqdump -p ${PORT}
5555
|---|---|---|
5656
| 0x0 Utility | M2-104-UM §3 | JR heartbeat 500 ms, Delta Clockstamp |
5757
| 0x4 MIDI 2.0 Channel Voice | M2-104-UM §7 | 32-bit CCs, Per-Note family, Note Attribute, RPN/NRPN, Relative RPN/NRPN |
58-
| 0x5 SysEx8 | M2-104-UM §9 | raw 8-bit |
58+
| 0x3 SysEx7 | M2-104-UM §7.7 | up to 6 bytes per packet, auto-fragmented |
5959
| 0xD Flex Data | M2-104-UM §10 | Tempo, Time Sig, Key Sig, Metronome, Chord Name, Start/End of Clip |
6060
| 0xF UMP Stream | M2-104-UM §11 | full Endpoint + FB Discovery |
6161

@@ -75,7 +75,7 @@ Per cycle (~22 s):
7575
| **D.** Program + Bank | Program Change with bank MSB/LSB in a single UMP | MIDI 1.0 needs three messages |
7676
| **E.** RPN/NRPN | RPN 0/0, NRPN, Relative RPN (+delta), Relative NRPN (-delta) | RPN/NRPN first-class + Relative |
7777
| **F.** Note Attribute | Note On with `attribute_type=0x03` (pitch_7_9), E4 +50 cents | Microtonal attribute |
78-
| **G.** SysEx8 | 16 raw 8-bit bytes, no 7-bit aliasing | MT 0x5 |
78+
| **G.** SysEx7 | Universal SysEx Identity Reply, 12 bytes, auto-fragmented (Start + End) | MT 0x3 |
7979
| **H.** Delta Clockstamp | DCTPQ=480 + Delta Clockstamp=240 ticks | MT 0x0 utility |
8080
| **I.** PE Notify | Broadcast `OverlayRate` change to subscribers (value increments per cycle) | Property Exchange |
8181
| **J.** End of Clip | Sequencer End of Clip marker | MT 0xF status 0x21 |

examples/rp2040-midi2/src/main.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Scene D — Program Change with Bank in a single UMP
3131
* Scene E — RPN/NRPN 32-bit + Relative RPN/NRPN (incremental)
3232
* Scene F — Note On with Attribute pitch_7_9 (microtonal +50¢)
33-
* Scene G — SysEx8 emission (8-bit SysEx, no 7-bit aliasing)
33+
* Scene G — SysEx7 emission (fragmented Universal SysEx Identity Reply)
3434
* Scene H — Delta Clockstamp (DCTPQ + delta ticks)
3535
* Scene I — Property Exchange Notify (broadcast OverlayRate change
3636
* to any current subscribers)
@@ -193,7 +193,7 @@ constexpr uint8_t kF_Note = 64; // E4
193193
constexpr uint32_t kF_OnMs = 14800;
194194
constexpr uint32_t kF_OffMs = 16500;
195195

196-
// Scene G: SysEx8
196+
// Scene G: SysEx7
197197
constexpr uint32_t kG_Ms = 17200;
198198

199199
// Scene H: Delta Clockstamp
@@ -420,17 +420,17 @@ static void scene_f_attribute(m2device& midi, Showcase& s, uint32_t t) {
420420
}
421421
}
422422

423-
static void scene_g_sysex8(m2device& midi, Showcase& s, uint32_t t) {
423+
static void scene_g_sysex7(m2device& midi, Showcase& s, uint32_t t) {
424424
if (s.g_done || t < kG_Ms) return;
425-
// Custom SysEx8 payload — full 8-bit bytes per packet, no 7-bit
426-
// aliasing. UNIQUE to MIDI 2.0 (MT 0x5).
425+
// Universal SysEx Identity Reply, 12 bytes of 7-bit data.
426+
// sendSysEx7 fragments automatically into Start + End packets (MT 0x3).
427427
static const uint8_t payload[] = {
428-
0x7E, 0x7F, 0x06, 0x01, // Universal SysEx Identity Reply prefix
429-
0xFF, 0xC3, 0xA1, 0xB2, 0xC4, 0xD5, 0xE6, // 8-bit bytes (would need MCoded7 in 1.0)
430-
0xF7, 0x00, 0x80, 0xAA, 0x55,
428+
0x7E, 0x7F, 0x06, 0x02, // Universal Non-Realtime, device 0x7F, Identity Reply
429+
0x7D, 0x01, 0x00, 0x40, // mfr id + family LSB/MSB + model LSB
430+
0x00, 0x04, 0x00, 0x00, // model MSB + version v0.4.0.0
431431
};
432-
midi.sendSysEx8(/*group*/ 0, /*streamId*/ 1, payload, sizeof(payload));
433-
std::printf("[G] SysEx8 emitted (%zu raw 8-bit bytes)\r\n", sizeof(payload));
432+
midi.sendSysEx7(/*group*/ 0, payload, sizeof(payload));
433+
std::printf("[G] SysEx7 emitted (%zu bytes, Identity Reply)\r\n", sizeof(payload));
434434
s.g_done = true;
435435
}
436436

@@ -489,7 +489,7 @@ static void showcase_step(m2device& midi, m2ci& ci, Showcase& s) {
489489
scene_d_program(midi, s, t);
490490
scene_e_rpn_nrpn(midi, s, t);
491491
scene_f_attribute(midi, s, t);
492-
scene_g_sysex8(midi, s, t);
492+
scene_g_sysex7(midi, s, t);
493493
scene_h_dctpq(midi, s, t);
494494
scene_i_pe_notify(ci, s, t);
495495
scene_j_clip_end(midi, s, t);

examples/sparkfun-promicro-rp2350-midi2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Plug straight into a laptop and inspect with Microsoft MIDI Services Console (Wi
5858
|---|---|---|
5959
| 0x0 Utility | M2-104-UM §3 | JR heartbeat 500 ms, Delta Clockstamp |
6060
| 0x4 MIDI 2.0 Channel Voice | M2-104-UM §7 | 32-bit CCs, Per-Note family, Note Attribute, RPN/NRPN, Relative RPN/NRPN |
61-
| 0x5 SysEx8 | M2-104-UM §9 | raw 8-bit |
61+
| 0x3 SysEx7 | M2-104-UM §7.7 | up to 6 bytes per packet, auto-fragmented |
6262
| 0xD Flex Data | M2-104-UM §10 | Tempo, Time Sig, Key Sig, Metronome, Chord Name, Start/End of Clip |
6363
| 0xF UMP Stream | M2-104-UM §11 | full Endpoint + FB Discovery |
6464

@@ -78,7 +78,7 @@ Per cycle (~22 s):
7878
| **D.** Program + Bank | Program Change with bank MSB/LSB in a single UMP | MIDI 1.0 needs three messages |
7979
| **E.** RPN/NRPN | RPN 0/0, NRPN, Relative RPN (+delta), Relative NRPN (-delta) | RPN/NRPN first-class + Relative |
8080
| **F.** Note Attribute | Note On with `attribute_type=0x03` (pitch_7_9), E4 +50 cents | Microtonal attribute |
81-
| **G.** SysEx8 | 16 raw 8-bit bytes, no 7-bit aliasing | MT 0x5 |
81+
| **G.** SysEx7 | Universal SysEx Identity Reply, 12 bytes, auto-fragmented (Start + End) | MT 0x3 |
8282
| **H.** Delta Clockstamp | DCTPQ=480 + Delta Clockstamp=240 ticks | MT 0x0 utility |
8383
| **I.** PE Notify | Broadcast `OverlayRate` change to subscribers (value increments per cycle) | Property Exchange |
8484
| **J.** End of Clip | Sequencer End of Clip marker | MT 0xF status 0x21 |

examples/sparkfun-promicro-rp2350-midi2/src/main.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Scene D, Program Change with Bank in a single UMP
3131
* Scene E, RPN/NRPN 32-bit + Relative RPN/NRPN (incremental)
3232
* Scene F, Note On with Attribute pitch_7_9 (microtonal +50¢)
33-
* Scene G, SysEx8 emission (8-bit SysEx, no 7-bit aliasing)
33+
* Scene G, SysEx7 emission (fragmented Universal SysEx Identity Reply)
3434
* Scene H, Delta Clockstamp (DCTPQ + delta ticks)
3535
* Scene I, Property Exchange Notify (broadcast OverlayRate change
3636
* to any current subscribers)
@@ -193,7 +193,7 @@ constexpr uint8_t kF_Note = 64; // E4
193193
constexpr uint32_t kF_OnMs = 14800;
194194
constexpr uint32_t kF_OffMs = 16500;
195195

196-
// Scene G: SysEx8
196+
// Scene G: SysEx7
197197
constexpr uint32_t kG_Ms = 17200;
198198

199199
// Scene H: Delta Clockstamp
@@ -420,17 +420,17 @@ static void scene_f_attribute(m2device& midi, Showcase& s, uint32_t t) {
420420
}
421421
}
422422

423-
static void scene_g_sysex8(m2device& midi, Showcase& s, uint32_t t) {
423+
static void scene_g_sysex7(m2device& midi, Showcase& s, uint32_t t) {
424424
if (s.g_done || t < kG_Ms) return;
425-
// Custom SysEx8 payload, full 8-bit bytes per packet, no 7-bit
426-
// aliasing. UNIQUE to MIDI 2.0 (MT 0x5).
425+
// Universal SysEx Identity Reply, 12 bytes of 7-bit data.
426+
// sendSysEx7 fragments automatically into Start + End packets (MT 0x3).
427427
static const uint8_t payload[] = {
428-
0x7E, 0x7F, 0x06, 0x01, // Universal SysEx Identity Reply prefix
429-
0xFF, 0xC3, 0xA1, 0xB2, 0xC4, 0xD5, 0xE6, // 8-bit bytes (would need MCoded7 in 1.0)
430-
0xF7, 0x00, 0x80, 0xAA, 0x55,
428+
0x7E, 0x7F, 0x06, 0x02, // Universal Non-Realtime, device 0x7F, Identity Reply
429+
0x7D, 0x01, 0x00, 0x40, // mfr id + family LSB/MSB + model LSB
430+
0x00, 0x04, 0x00, 0x00, // model MSB + version v0.4.0.0
431431
};
432-
midi.sendSysEx8(/*group*/ 0, /*streamId*/ 1, payload, sizeof(payload));
433-
std::printf("[G] SysEx8 emitted (%zu raw 8-bit bytes)\r\n", sizeof(payload));
432+
midi.sendSysEx7(/*group*/ 0, payload, sizeof(payload));
433+
std::printf("[G] SysEx7 emitted (%zu bytes, Identity Reply)\r\n", sizeof(payload));
434434
s.g_done = true;
435435
}
436436

@@ -489,7 +489,7 @@ static void showcase_step(m2device& midi, m2ci& ci, Showcase& s) {
489489
scene_d_program(midi, s, t);
490490
scene_e_rpn_nrpn(midi, s, t);
491491
scene_f_attribute(midi, s, t);
492-
scene_g_sysex8(midi, s, t);
492+
scene_g_sysex7(midi, s, t);
493493
scene_h_dctpq(midi, s, t);
494494
scene_i_pe_notify(ci, s, t);
495495
scene_j_clip_end(midi, s, t);

0 commit comments

Comments
 (0)