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

Method _sanitizeVoices

NeuralNote/Source/SynthController.cpp:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void SynthController::_sanitizeVoices()
128{
129 // Insert note off event to avoid hanging notes
130 for (int i = 0; i < mSynth->getNumVoices(); i++) {
131 auto* voice = dynamic_cast<SynthVoice*>(mSynth->getVoice(i));
132 if (voice->isActive()) {
133 auto midi_note = voice->getCurrentMidiNote();
134
135 if (!_isNextOnOffEventNoteOff(midi_note)) {
136 voice->noteStopped(true);
137 }
138 }
139 }
140}
141
142void SynthController::_updateCurrentEventIndex()
143{

Callers

nothing calls this directly

Calls 3

isActiveMethod · 0.80
getCurrentMidiNoteMethod · 0.80
noteStoppedMethod · 0.80

Tested by

no test coverage detected