commit 10274e8ad053153f84bfd495c049d5fe53d3d098
parent 6f8a61f6ee74316e471495f040660318a339d0c7
Author: Daniel Sheeler <[email protected]>
Date: Sun, 9 Sep 2018 11:12:18 -0500
Now interpolate global amplitude
Diffstat:
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp
@@ -669,9 +669,6 @@ void ADnote::legatonote(LegatoParams lpars)
* VelF(
velocity,
pars.GlobalPar.PAmpVelocityScaleFunction); //velocity sensing
- globalnewamplitude = NoteGlobalPar.Volume
- * NoteGlobalPar.AmpEnvelope->envout_dB()
- * NoteGlobalPar.AmpLfo->amplfoout();
{
auto *filter = NoteGlobalPar.Filter;
diff --git a/src/Synth/PADnote.cpp b/src/Synth/PADnote.cpp
@@ -156,11 +156,13 @@ void PADnote::setup(float freq,
* powf(0.1f, 3.0f * (1.0f - pars.PVolume / 96.0f)) //-60 dB .. 0 dB
* VelF(velocity, pars.PAmpVelocityScaleFunction); //velocity sensing
- NoteGlobalPar.AmpEnvelope->envout_dB(); //discard the first envelope output
- globaloldamplitude = globalnewamplitude = NoteGlobalPar.Volume
- * NoteGlobalPar.AmpEnvelope->
- envout_dB()
- * NoteGlobalPar.AmpLfo->amplfoout();
+ if (!legato) {
+ NoteGlobalPar.AmpEnvelope->envout_dB(); //discard the first envelope output
+ globaloldamplitude = globalnewamplitude = NoteGlobalPar.Volume
+ * NoteGlobalPar.AmpEnvelope->
+ envout_dB()
+ * NoteGlobalPar.AmpLfo->amplfoout();
+ }
if(!legato) {
ScratchString pre = prefix;