weegreenblobbie / nsound

nsound is a C++ library and python module for real-time sound synthesis.
GNU General Public License v2.0
17 stars 1 forks source link

GuitarBass.cc: annoying click at the end of samples #3

Open weegreenblobbie opened 8 years ago

weegreenblobbie commented 8 years ago

While playing GuitarBass wtih:

    play(0.600000, 65.406391)
    play(0.600000, 97.998859)
    play(0.600000, 110.000000)
    play(0.300000, 97.998859)

there are audible clicks at the end of the sample. Get rid of the clicks!

weegreenblobbie commented 8 years ago

Seems like a loss of precision when converting from duration into samples:

audo duration = 3.0;
AudioSream sound << gen.generate(duration, freqs);
Buffer env = gen.drawFatGaussian(sound.getDuration(), 0.99);
assert(env.getLength() == sound.getLength())