5 * Translates text from standard input to a hex-formatted System Exclusive (SysEx) message for Roland MT-32,
6 * which instructs the unit to show given text on the display.
8 * Roland MT-32 is capable to display 20 characters.
9 * Longer messages are silently truncated by the MT-32 unit (this software does not check the length).
11 * The SysEx message contains a checksum.
12 * If the checksum is wrong, the MT-32 unit shows the "Exc. Checksum error" message for few seconds
13 * and then returns back to the default screen.
16 * amidi --port="hw:2,0,0" --send-hex="$(echo -n ' Run GNU/Linux ' | ./mt-32-display )"
22 int main(int argc, char**argv) {
23 std::cout << "f0 41 10 16 12 20 00 00 ";
24 std::cout << std::hex << std::setfill('0');
28 // 20 00 00 = display message
33 for (char ch; std::cin.read(&ch, 1).good();) {
34 std::cout << std::setw(2) << ((int) ch) << " ";
40 std::cout << std::setw(2) << sum;
43 std::cout << std::endl;