and yet more buzz ...

From: John Lazzaro (lazzaro@CS.Berkeley.EDU)
Date: Tue Jun 06 2000 - 13:27:42 EDT


Hi Robin,

        Here's SAOL's current buzz math -- to view this message,
use a fixed font and make the window really wide, or else the
equations will be unreadable. I think this exposition addresses
the issues in your posting ...

Definitions:

l = lowharm
H = nharm
a = rolloff
T = 2*pi*phase, where phase [0:1]
scale = (1 - abs(a))/(1 - abs(a^H))

N = L + H + 2
Q = L + 1

bigscale = scale*a^(H+1)

Main equation:

buzz = (1 - a*cos(T))*(scale*cos(Q*T) - bigscale*cos(N*T)) + a*sin(T)*(bigscale*sin(N*T) - scale*sin(Q*T))
       ----------------------------------------------------------------------------------------------------
                                             1 - 2*a*cos(T) + a*a

Note that there are nice reductions if a == 1, a == -1,
and L = 0 (maybe some other cases too). Right now sfront
uses none of these. Neither does it convert the "nharm,
rolloff, and lowharm constant" case to a simple table
player. Basically, priority one right now is shaking out
the remaining bugs, so the goal is to run this code all
the time to test it thoroughly.

The major source of artifacts using table lookups gets
triggeres when the denominator is too close to 0 (at
least using my simplistic table lookups, maybe your
two-table method is sufficiently accurate so that its
not an issue). Right now, I just check to see if the
denominator is less that 0.02, and if so I revert to
computing the sin() and cos() from functions. The
amount of time this code gets tripped is very small,
from profiling I did (maybe 1 time per second, at that),
but each time it does, a giant spike in the output gets
replaces with a happy data point, and the "shot noise"
sort of artifacts go away.

Another sort of artifact happened when "scale" was outside
the the equation -- bad roundoff for large rolloff values.
The "scale" and "bigscale" trick in the equation above
fixes that.

Finally, even you when compute sine() and cos(), there
is a narrow regime of trouble where the denominator is
extremely close to zero. After careful listening, I
decided that simple bumping rolloff a bit to fix the
problem worked just as well as determining the limiting
values for this case, so that's what sfront does currently.

-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:57 EST