summaryrefslogtreecommitdiff
path: root/src/mdaPianoVoice.cpp
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-16 20:16:12 +0800
committerrekado <rekado@elephly.net>2013-01-16 20:16:12 +0800
commit53c71937b7106e8606edf5564c415a8213b6efea (patch)
treeaaaf1a54c91e09e2ff311fae2eebf8af2bf03999 /src/mdaPianoVoice.cpp
parent143c53e1968bba66a4756255c4900507caaa1f38 (diff)
replace note with m_key
Diffstat (limited to 'src/mdaPianoVoice.cpp')
-rw-r--r--src/mdaPianoVoice.cpp6
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