MCPcopy Create free account
hub / github.com/VCVRack/Rack / onKeyRelease

Method onKeyRelease

src/keyboard.cpp:155–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153 }
154
155 void onKeyRelease(int key) {
156 // Do nothing if no ports are subscribed
157 if (subscribed.empty())
158 return;
159 auto it = pressedNotes.find(key);
160 if (it == pressedNotes.end())
161 return;
162
163 int note = it->second;
164 // MIDI note off
165 midi::Message msg;
166 msg.setStatus(0x8);
167 msg.setNote(note);
168 msg.setValue(127);
169 onMessage(msg);
170
171 pressedNotes.erase(it);
172 }
173};
174
175

Callers

nothing calls this directly

Calls 4

setStatusMethod · 0.80
setNoteMethod · 0.80
emptyMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected