| It's very simple really: in teh pvoc resynthesis code, this line is used
to track output phase:
lastphase[i] += C[freq] - i* fundamental;
(quoting from the F.R Moore book - the princeton sources are
essentially the same)
The problem is that what is being stored (in a float) is not phase +-
PI, but actual frequencies, and after a more-or-less long while, the
float value overflows. The result is progressive distortion of the
sound, over 15 - 30 mins.
My fix is to store a real wraparound phase instead, exactly as is done
already in the synthesis part:
float angledif;
angledif = (TWOPI / srate) * (C[freq] - i * fundamental);
lastphase[i] = fmod(lastphase[i] * angfledif, TWOPI);
The fmod is expensive, of course, but concise here.
And, of course, for the short pvoc runs which most people do, this
problem doesn't arise.
Richard Dobson
Paul Koonce wrote:
>
> On Mon, 9 Nov 1998, Richard Dobson wrote:
>
> > (though there is a little bug in the resynthesis, in all the public
> > distributions (F.R. Moore, book, princeton, etc) that has to be fixed,
> > to get the audio clean over long time-periods).
>
> I am very interested to know what the bug is that you have found.
> |