MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / _clearActiveNotesMidiOut

Method _clearActiveNotesMidiOut

NeuralNote/Source/Player.cpp:203–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void Player::_clearActiveNotesMidiOut(MidiBuffer& outMidiBuffer)
204{
205 for (size_t i = 0; i < mActiveNotesMidiOut.size(); i++) {
206 int active_note = mActiveNotesMidiOut[i];
207 if (active_note > 0) {
208 // TODO: multiple note off events needed? Can it happen that active_note > 1?
209 for (int j = 0; j < active_note; j++) {
210 MidiMessage note_off_message = MidiMessage::noteOff(1, static_cast<int>(i));
211 outMidiBuffer.addEvent(note_off_message, 0);
212 }
213 }
214
215 mActiveNotesMidiOut[i] = 0;
216 }
217}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected