diff options
-rw-r--r-- | src/mdaPianoVoice.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp index 00198fd..9f75839 100644 --- a/src/mdaPianoVoice.cpp +++ b/src/mdaPianoVoice.cpp @@ -200,6 +200,11 @@ r = 0.0f; p(p_left)[frame] += l + x; p(p_right)[frame] += r - x; } + + // turn off further processing when the envelope has rendered the voice silent + if (env < SILENCE) { + m_key = LV2::INVALID_KEY; + } } |