ElectroTechnique / TSynth-Teensy4.1

TSynth for Teensy 4.1
149 stars 41 forks source link

Held note silenced #136

Closed ElectroTechnique closed 10 months ago

ElectroTechnique commented 10 months ago

Hold voice 1 and play 12 notes. Instead of taking a no longer held voice, it steals voice1 and silences it. Originally posted by @biamau962 in https://github.com/ElectroTechnique/TSynth-Teensy4.1/discussions/135

ElectroTechnique commented 10 months ago

VoiceGroup.h

` // Get the oldest free voice, if none free, get the oldest active voice. Voice getVoice() { Voice result = nullptr;

    for (uint8_t i = 0; i < voices.size(); i++)
    {
        if (result == nullptr || !voices[i]->on() || result->on())
        {
            if (result == nullptr || voices[i]->timeOn() < result->timeOn())
            {
                result = voices[i];
            }
        }

    }
    return result;
}`
ElectroTechnique commented 10 months ago

Fixed in V2.36