diff options
author | rekado <rekado@elephly.net> | 2013-01-16 20:16:12 +0800 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2013-01-16 20:16:12 +0800 |
commit | 53c71937b7106e8606edf5564c415a8213b6efea (patch) | |
tree | aaaf1a54c91e09e2ff311fae2eebf8af2bf03999 | |
parent | 143c53e1968bba66a4756255c4900507caaa1f38 (diff) |
replace note with m_key
-rw-r--r-- | src/mdaPianoVoice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp index 688f1df..00198fd 100644 --- a/src/mdaPianoVoice.cpp +++ b/src/mdaPianoVoice.cpp @@ -123,11 +123,11 @@ void mdaPianoVoice::release(unsigned char velocity) { if(sustain==0) { //no release on highest notes - if(note < 94 || note == SUSTAIN) { - dec = (float)exp(-iFs * exp(2.0 + 0.017 * (double)note - 2.0 * *p(p_envelope_release))); + if(m_key < 94 || m_key == SUSTAIN) { + dec = (float)exp(-iFs * exp(2.0 + 0.017 * (double)m_key - 2.0 * *p(p_envelope_release))); } } else { - note = SUSTAIN; + m_key = SUSTAIN; } //Mark the voice to be turned off later. It may not be set to |