projects
/
software
/
lv2-mdametapiano.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e494353
)
remove commented code
author
rekado
<rekado@elephly.net>
Fri, 18 Jan 2013 10:26:39 +0000
(18:26 +0800)
committer
rekado
<rekado@elephly.net>
Fri, 18 Jan 2013 12:25:57 +0000
(20:25 +0800)
src/mdaPianoVoice.cpp
patch
|
blob
|
history
diff --git
a/src/mdaPianoVoice.cpp
b/src/mdaPianoVoice.cpp
index 7ccd9d5e4fab8bfc4a3ce8945df6b686862a6906..45dc9662fac5406166c76281eda72b1c85ff6464 100644
(file)
--- a/
src/mdaPianoVoice.cpp
+++ b/
src/mdaPianoVoice.cpp
@@
-56,22
+56,6
@@
void mdaPianoVoice::on(unsigned char note, unsigned char velocity)
if(velocity>0)
{
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
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
{
}
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);
}
}
}
}