Skip to content

Instantly share code, notes, and snippets.

@peterleif
Last active April 25, 2020 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterleif/e8bd5e678b5c3a76e39d4eb2d8268555 to your computer and use it in GitHub Desktop.
Save peterleif/e8bd5e678b5c3a76e39d4eb2d8268555 to your computer and use it in GitHub Desktop.
改変版sysex.node
<Comment>
Copyright (c) 2018-2020, sigboost, inc., All Rights Reserved.
This file is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license.
<I/O>
input Int : Trigger output
output MidiSysEx : Output
<Description>
Construct MIDI System Exclusive Message.
Message must contain the initial 0xF0 and the last 0xF7 byte!!!
Otherwise no SysEx message is sent out.
<Parameter>
parameter Message = "0xF0, 0xF7" : Comma-separated list of message bytes including F0 and F7
<Code>
static const std::vector<uint8_t> message{${Message}};
static MidiSysEx sysex(message.size(), message.data());
if (@in0){
if (Midiglue::is_valid(sysex)){
out0 = sysex;
}
else{
Midiglue::Debug::write_log("sysex_node: invalid");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment