aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--src/mdaPiano.cpp2
-rw-r--r--src/mdaPiano.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 536210b..c965726 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+mda-lv2 (1.2.3) unstable;
+
+ * Fix initial noise with Piano (zero comb filter and voices on startup)
+
+ -- David Robillard <d@drobilla.net> Tue, 15 Jul 2014 23:25:05 -0400
+
mda-lv2 (1.2.2) stable;
* Fix compilation against LV2 < 1.8.0
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp
index a81ed03..75df330 100644
--- a/src/mdaPiano.cpp
+++ b/src/mdaPiano.cpp
@@ -108,6 +108,7 @@ mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster,
//initialise...
for(int32_t v=0; v<NVOICES; v++)
{
+ memset(&voice[v], 0, sizeof(voice[v]));
voice[v].env = 0.0f;
voice[v].dec = 0.99f; //all notes off
}
@@ -115,6 +116,7 @@ mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster,
muff = 160.0f;
cpos = sustain = activevoices = 0;
comb = new float[256];
+ memset(comb, 0, sizeof(float) * 256);
guiUpdate = 0;
diff --git a/src/mdaPiano.h b/src/mdaPiano.h
index 012fcee..d03d2a8 100644
--- a/src/mdaPiano.h
+++ b/src/mdaPiano.h
@@ -127,7 +127,7 @@ private:
int32_t cmax;
float *comb, cdep, width, trim;
int32_t size, sustain;
- float tune, fine, random, stretch;
+ float fine, random, stretch;
float muff, muffvel, sizevel, velsens, volume;
};