zynaddsubfx

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

commit 20ef9616811da98db7edd99d8b3dbd0df90f6e0b
parent b2d042cb3be35475d923d8e787ca9e7dc09dd735
Author: falkTX <falktx@gmail.com>
Date:   Fri,  8 Jan 2016 05:35:41 +0000

Merge branch 'master' of ssh://git.code.sf.net/p/zynaddsubfx/code into dpf-plugin

Diffstat:
Msrc/Synth/Envelope.cpp | 5++---
Msrc/Tests/AdNoteTest.h | 8++++----
Msrc/Tests/PadNoteTest.h | 6+++---
Msrc/Tests/SubNoteTest.h | 2+-
4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/Synth/Envelope.cpp b/src/Synth/Envelope.cpp @@ -45,11 +45,10 @@ Envelope::Envelope(EnvelopeParams &pars, float basefreq, float bufferdt) if((mode == 2) && linearenvelope) mode = 1; //change to linear - for(int i = 0; i < envpoints; ++i) { + for(int i = 0; i < MAX_ENVELOPE_POINTS; ++i) { const float tmp = pars.getdt(i) / 1000.0f * envstretch; if(tmp > bufferdt) - envdt[i] = - i == envpoints ? bufferdt / tmp : 1 / ceil(tmp / bufferdt); + envdt[i] = bufferdt / tmp; else envdt[i] = 2.0f; //any value larger than 1 diff --git a/src/Tests/AdNoteTest.h b/src/Tests/AdNoteTest.h @@ -138,19 +138,19 @@ class AdNoteTest:public CxxTest::TestSuite note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], -0.099167f, 0.0001f); + TS_ASSERT_DELTA(outL[255], -0.102197f, 0.0001f); note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], -0.108730f, 0.0001f); + TS_ASSERT_DELTA(outL[255], -0.111261f, 0.0001f); note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], -0.030751f, 0.0001f); + TS_ASSERT_DELTA(outL[255], -0.021375f, 0.0001f); note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], 0.146882f, 0.0001f); + TS_ASSERT_DELTA(outL[255], 0.149149f, 0.0001f); while(!note->finished()) { note->noteout(outL, outR); diff --git a/src/Tests/PadNoteTest.h b/src/Tests/PadNoteTest.h @@ -166,15 +166,15 @@ class PadNoteTest:public CxxTest::TestSuite note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], 0.062217f, 0.0005f); + TS_ASSERT_DELTA(outL[255], 0.060818f, 0.0005f); note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], 0.038359f, 0.0005f); + TS_ASSERT_DELTA(outL[255], 0.036895f, 0.0005f); note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], -0.006975f, 0.0001f); + TS_ASSERT_DELTA(outL[255], -0.006623f, 0.0001f); while(!note->finished()) { note->noteout(outL, outR); diff --git a/src/Tests/SubNoteTest.h b/src/Tests/SubNoteTest.h @@ -132,7 +132,7 @@ class SubNoteTest:public CxxTest::TestSuite note->noteout(outL, outR); sampleCount += synth->buffersize; - TS_ASSERT_DELTA(outL[255], -0.0014f, 0.0001f); + TS_ASSERT_DELTA(outL[255], -0.0013f, 0.0001f); note->noteout(outL, outR); sampleCount += synth->buffersize;