diff --git a/plugins/zynaddsubfx/ChangeLog b/plugins/zynaddsubfx/ChangeLog index 88562858a..5506f7066 100644 --- a/plugins/zynaddsubfx/ChangeLog +++ b/plugins/zynaddsubfx/ChangeLog @@ -901,4 +901,6 @@ 23 Sep 2009 (Paul Nasca) - Added unison invert phase - - Made unison frequency spread to depend on Bandwidth controllers and parameters \ No newline at end of file + - Made unison frequency spread to depend on Bandwidth controllers and parameters + - bugfixes: Voice Amplitude Envelope and FM + \ No newline at end of file diff --git a/plugins/zynaddsubfx/src/Synth/ADnote.cpp b/plugins/zynaddsubfx/src/Synth/ADnote.cpp index 8f7e70e43..057d738b2 100644 --- a/plugins/zynaddsubfx/src/Synth/ADnote.cpp +++ b/plugins/zynaddsubfx/src/Synth/ADnote.cpp @@ -1213,7 +1213,7 @@ inline void ADnote::ComputeVoiceOscillatorFrequencyModulation(int nvoice,int FMm }; - //normalize makes all sample-rates, oscil_sizes toproduce same sound + //normalize: makes all sample-rates, oscil_sizes to produce same sound if (FMmode!=0) {//Frequency modulation REALTYPE normalize=OSCIL_SIZE/262144.0*44100.0/(REALTYPE)SAMPLE_RATE; for (int k=0;k=1.0) { - poslo=fmod(freqlo,1.0); + poslo=fmod(poslo,1.0); poshi++; }; @@ -1385,6 +1385,7 @@ int ADnote::noteout(REALTYPE *outl,REALTYPE *outr) // Amplitude REALTYPE oldam=oldamplitude[nvoice]*unison_amplitude; REALTYPE newam=newamplitude[nvoice]*unison_amplitude; + if (ABOVE_AMPLITUDE_THRESHOLD(oldam,newam)) { int rest=SOUND_BUFFER_SIZE; //test if the amplitude if raising and the difference is high @@ -1419,9 +1420,10 @@ int ADnote::noteout(REALTYPE *outl,REALTYPE *outr) //check if the amplitude envelope is finished, if yes, the voice will be fadeout if (NoteVoicePar[nvoice].AmpEnvelope!=NULL) { - if (NoteVoicePar[nvoice].AmpEnvelope->finished()!=0) + if (NoteVoicePar[nvoice].AmpEnvelope->finished()!=0){ for (i=0;i