summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-18 18:26:39 +0800
committerrekado <rekado@elephly.net>2013-01-18 20:25:57 +0800
commite392144b8565284f2a8c4bfea3fa777bfeb633a6 (patch)
treeaf49cf4f12569893e51c37530c36b98a7019c011
parente4943532bf733d3af8e38532c2b9c08763aa8b52 (diff)
remove commented code
-rw-r--r--src/mdaPianoVoice.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp
index 7ccd9d5..45dc966 100644
--- a/src/mdaPianoVoice.cpp
+++ b/src/mdaPianoVoice.cpp
@@ -56,22 +56,6 @@ void mdaPianoVoice::on(unsigned char note, unsigned char velocity)
if(velocity>0)
{
- // TODO: move this to mdaPiano.cpp
- /*
- if(activevoices < poly) //add a note
- {
- vl = activevoices;
- activevoices++;
- }
- else //steal a note
- {
- for(v=0; v<poly; v++) //find quietest voice
- {
- if(voice[v].env < l) { l = voice[v].env; vl = v; }
- }
- }
- */
-
k = (note - 60) * (note - 60);
l = fine + random * ((float)(k % 13) - 6.5f); //random & fine tune
if(note > 60) l += stretch * (float)k; //stretch
@@ -111,11 +95,7 @@ void mdaPianoVoice::on(unsigned char note, unsigned char velocity)
}
else //note off
{
- // TODO: move the loop to mdaPiano.cpp
- //for(v=0; v<NVOICES; v++) if(voice[v].note==note) //any voices playing that note?
- //{
- release(0);
- //}
+ release(0);
}
}