summaryrefslogtreecommitdiff
path: root/src/mdaPianoVoice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mdaPianoVoice.cpp')
-rw-r--r--src/mdaPianoVoice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp
index f7824d7..e23dc78 100644
--- a/src/mdaPianoVoice.cpp
+++ b/src/mdaPianoVoice.cpp
@@ -31,6 +31,7 @@ void mdaPianoVoice::reset() {
muff = 160.0f;
volume = 0.2f;
sustain = 0;
+ m_key = LV2::INVALID_KEY;
}
@@ -44,6 +45,9 @@ float mdaPianoVoice::p_helper(unsigned short id, Param d) {
void mdaPianoVoice::on(unsigned char note, unsigned char velocity)
{
+ // store key that turned this voice on (used in 'get_key')
+ m_key = key;
+
// TODO: replace with this voice's local copy
float * param = programs[curProgram].param;
float l=99.0f;