zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit c2d08b3b5784059501bc074c6574e28b1c96c63f
parent 5302e6d9c97ae6435bbc0d68a412dbfe3cb03044
Author: Paul <nop@nop-desktop.(none)>
Date:   Wed, 23 Sep 2009 20:58:22 +0300

Made unison frequency spread to depend on Bandwidth controllers and parameters

Diffstat:
MChangeLog | 4++--
Msrc/Synth/ADnote.cpp | 3++-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -901,4 +901,4 @@ 23 Sep 2009 (Paul Nasca) - Added unison invert phase - -\ No newline at end of file + - Made unison frequency spread to depend on Bandwidth controllers and parameters +\ No newline at end of file diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp @@ -776,6 +776,7 @@ void ADnote::compute_unison_freq_rap(int nvoice){ unison_freq_rap[nvoice][0]=1.0; return; }; + REALTYPE relbw=ctl->bandwidth.relbw*bandwidthDetuneMultiplier; for (int k=0;k<unison_size[nvoice];k++){ REALTYPE pos=unison_vibratto[nvoice].position[k]; REALTYPE step=unison_vibratto[nvoice].step[k]; @@ -788,7 +789,7 @@ void ADnote::compute_unison_freq_rap(int nvoice){ pos=1.0; step=-step; }; - unison_freq_rap[nvoice][k]=unison_base_freq_rap[nvoice][k]+pos*unison_vibratto[nvoice].amplitude; + unison_freq_rap[nvoice][k]=1.0+((unison_base_freq_rap[nvoice][k]-1.0)+pos*unison_vibratto[nvoice].amplitude)*relbw; unison_vibratto[nvoice].position[k]=pos; step=unison_vibratto[nvoice].step[k]=step;