[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] FreqScope Spasm Fix

Thanks for this fix Ryan.

One thing I've been wondering about is when using the logarithmic view (Frqscl) whether the lowest frequencies have to be so rugged? Would it be possible to interpolate between the values and make smoother waves? Or would that mean
"falsifying" what is really happening?

Just speculating

On 5 Feb 2008, at 01:09, Ryan Brown wrote:

There is a bug that most people who have used FreqScope are familar with where the spectrogram will occasionally jump around.

This is because of the way ScopeOut synchronizes with the lang. If the lang is copying the scope buffer then ScopeOut temporarily stops writing data to it's buffer. It is possible for the FFT magnitudes to get written starting mid-way through the scope buffer if the reading does not take an even amount of time. The FFT magnitudes continue to be given to ScopeOut even though ScopeOut isn't putting them in the buffer.

The fix for this is to continue incrementing the buffer position even if the lang is reading. When the entire buffer has been filled, which may involve wrapping around, the write count is incremented and the lang reads. Currently the write count is only incremented when the frame position reaches the end.

Attached is a patch for the bug. I've also changed SCFreqScope to take advantage of recent FFT improvements (using a Hann window and a larger window improves accuracy and appearance considerably).

I think this should go in 3.2 because of how annoying the bug is, but if time is short it can wait.



Sc-devel mailing list