MCPcopy Create free account
hub / github.com/christophhart/HISE / onNoteOff

Function onNoteOff

hi_scripting/scripting/HardcodedScriptProcessor.h:222–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 };
221
222 void onNoteOff() override
223 {
224 if (Message.getNoteNumber() == lastNote && Message.getChannel() == lastChannel)
225 {
226 Message.ignoreEvent(true);
227 Synth.noteOffByEventId(lastEventId);
228 }
229
230 int number = Message.getNoteNumber();
231
232 int channel = Message.getChannel();
233
234 if(number == possibleRetriggerNote && channel == possibleRetriggerChannel)
235 {
236 possibleRetriggerNote = -1;
237 possibleRetriggerChannel = -1;
238 }
239
240 if(number == lastNote)
241 {
242 if(possibleRetriggerNote != -1 && possibleRetriggerChannel != -1)
243 {
244 lastEventId = Synth.addNoteOn(possibleRetriggerChannel, possibleRetriggerNote, lastVelo, 0);
245
246 lastNote = possibleRetriggerNote;
247 lastChannel = possibleRetriggerChannel;
248 possibleRetriggerNote = -1;
249 possibleRetriggerChannel = -1;
250 }
251 else
252 {
253 lastNote = -1;
254 }
255 }
256 }
257
258
259

Callers 1

processHiseEventMethod · 0.70

Calls 15

noteOffByEventIdMethod · 0.80
addNoteOnMethod · 0.80
getMessageCopyMethod · 0.80
setTimeStampMethod · 0.80
addMessageFromHolderMethod · 0.80
getNoteNumberMethod · 0.45
getChannelMethod · 0.45
ignoreEventMethod · 0.45
getValueMethod · 0.45
getUptimeMethod · 0.45
getTableValueMethod · 0.45
getVelocityMethod · 0.45

Tested by

no test coverage detected