From 552d3aece2a3db5c11c149b30cd9ba80ef39640f Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 23 Sep 2009 23:49:11 +0300 Subject: [PATCH] Made unison vibratto LFO smoother (cherry picked from commit c129dc9382485212f8dc8842d19649f79290cc5d) --- plugins/zynaddsubfx/src/Synth/ADnote.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/zynaddsubfx/src/Synth/ADnote.cpp b/plugins/zynaddsubfx/src/Synth/ADnote.cpp index 5a6499d43..20ee83a19 100644 --- a/plugins/zynaddsubfx/src/Synth/ADnote.cpp +++ b/plugins/zynaddsubfx/src/Synth/ADnote.cpp @@ -788,7 +788,8 @@ void ADnote::compute_unison_freq_rap(int nvoice){ pos=1.0; step=-step; }; - unison_freq_rap[nvoice][k]=1.0+((unison_base_freq_rap[nvoice][k]-1.0)+pos*unison_vibratto[nvoice].amplitude)*relbw; + REALTYPE vibratto_val=pos-0.3*pos*pos*pos;//make the vibratto lfo smoother + unison_freq_rap[nvoice][k]=1.0+((unison_base_freq_rap[nvoice][k]-1.0)+vibratto_val*unison_vibratto[nvoice].amplitude)*relbw; unison_vibratto[nvoice].position[k]=pos; step=unison_vibratto[nvoice].step[k]=step;