MCPcopy Create free account
hub / github.com/VCVRack/Befaco / setPredef

Method setPredef

src/MidiThing.cpp:159–169  ·  view source on GitHub ↗

request that MidiThing loads a pre-defined template, 1-4

Source from the content-addressed store, hash-verified

157
158 // request that MidiThing loads a pre-defined template, 1-4
159 void setPredef(uint8_t predef) {
160 predef = clamp(predef, 1, 4);
161 midi::Message msg;
162 msg.bytes.resize(8);
163 // Midi spec is zeroo indexed
164 uint8_t predefToSend = predef - 1;
165 msg.bytes = {0xF0, 0x7D, 0x17, 0x00, 0x00, 0x02, 0x00, predefToSend, 0xF7};
166 midiOut.setChannel(0);
167 midiOut.sendMessage(msg);
168 // DEBUG("Predef %d msg request sent: %s", predef, msg.toString().c_str());
169 }
170
171 void setMidiMergeViaSysEx(bool mergeOn) {
172 midi::Message msg;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected