aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-07-16 03:30:54 +0000
committerDavid Robillard <d@drobilla.net>2014-07-16 03:30:54 +0000
commitc2d51675287343c9006256397ae50709ed2cc892 (patch)
treed05ee8630dc5cec1f196e363d67780b2b5e91224 /src
parent03d899b7c4b04be2bee9d0eca22f73bf59c34d2f (diff)
downloadmda.lv2-c2d51675287343c9006256397ae50709ed2cc892.tar.gz
mda.lv2-c2d51675287343c9006256397ae50709ed2cc892.tar.bz2
mda.lv2-c2d51675287343c9006256397ae50709ed2cc892.zip
Fix initial noise with Piano (zero comb filter and voices on startup) (fix #974).
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/mda.lv2@5415 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/mdaPiano.cpp2
-rw-r--r--src/mdaPiano.h2
2 files changed, 3 insertions, 1 deletions
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;
};