Rolfdegen
Well-known member
I am unable to change the `envelope.sustain` in Paul's audio library in real time. The AI suggested this solution to me, but unfortunately, it doesn't work. The only thing that works is a brief `envelope.noteOff` followed by `envelope.noteOn`. However, that causes clicking sounds 
Envelope sustain phase not realtime
C:
if (abs(currentSustain - lastSustainLevel) > 0.01) {
envelope1.sustain(currentSustain);
// If the note is sustained, briefly force it into an ultra-short decay phase
if (envelope1.isSustain()) {
envelope1.decay(1); // Switches immediately and seamlessly to the new level
}
lastSustainLevel = currentSustain;
}
Envelope sustain phase not realtime
Last edited: