 
 // -----------------------------------------------------------------------------
 
-void handleGateChanged(bool inGateActive)
+inline void handleGateChanged(bool inGateActive)
 {
     digitalWrite(sGatePin, inGateActive ? HIGH : LOW);
 }
 
-void pulseGate()
+inline void pulseGate()
 {
     handleGateChanged(false);
     delay(1);


// -----------------------------------------------------------------------------

void handleNotesChanged()
{
    if (midiNotes.empty())
    {

        if (midiNotes.getLast(currentNote))
        {
            tone(sAudioOutPin, sNotePitches[currentNote]);
            
            if (isFirstNote)
            {
                handleGateChanged(true);
            }
            else
            {
                pulseGate(); // Retrigger envelopes. Remove for legato effect.
            }
        }
    }
}
