Re: [Bug 21980] New: WaveTable is highly underspecified

---------------------------- Original Message ----------------------------

Subject: Re: [Bug 21980] New: WaveTable is highly underspecified

From: "Chris Rogers" <crogers@google.com>

Date: Thu, May 9, 2013 5:41 pm

To: rbj@audioimagination.com

Cc: "public-audio@w3.org" <public-audio@w3.org>

--------------------------------------------------------------------------



> On Thu, May 9, 2013 at 1:56 PM, <rbj@audioimagination.com> wrote:

>

>>

>>

>>

>> btw, i am curious about the cos(0.5 * omega) factors in SAWTOOTH and

>> TRIANGLE. (and not in SQUARE). what is that factor for?

>>

> Not sure off the top of my head, I think it just turned out to be the way

> the Fourier series worked out.

>

>

 
well, i still don't see where that factor comes from.  if you check out
http://en.wikipedia.org/wiki/Sawtooth_wave
and
http://en.wikipedia.org/wiki/Triangle_wave
 
they seem to verify what i remember from my first exposure to Fourier
series.
the saw coefficients should be ( (-1)^n )*(-2/pi)/n  for all n>0.
 
and the triangle coefs should be ( (-1)^((n-1)/2) )*(8/pi^2)/n^2  for odd n and 0 for even n.
but omega is dependent on n, and there should be no other
dependency.
 
oh... i think i get it.  cos(0.5 * omega) = cos(pi * n) which is (-1)^n for integer n.  so it might be valid, but it seems to be a computationally inefficient way to toggle the sign bit.
 
Chris, does this Java script code for note analysis
exist somewhere?  i don't know how to write Java or Java script, but what i have seen of Java looks a lot like C at the low level.  if there is a place for this analysis code, i can do this in C and let someone else wrap it up in Java.  it requires pitch tracking, interpolation for
the wavetable samples, and phase alignment of adjacent wavetables.  the initial dumb version could have a wavetable for every millisecond or maybe every 2 ms.  and, with a quick FFT on it, each extracted wavetable would have a line spectrum associated with it, in case someone wants to
knock off some harmonics (as well as for wavetable culling)
 
then we can discuss different ideas behind culling redundant wavetables.  there are some issues there, particularly when interpolating along other dimensions. culling should happen only when the array of wavetables
in *all* dimensions are being looked at.  and adjacent wavetables should be phase aligned in all dimensions, not just the slowtime dimension.  that spinning of wavetables (to align them) should happen before culling.  to within reasonable limits, there is not a time constraint on this
analysis and wavetable extraction, because it is not real time.  but you don't want to have to take a long coffee break during the analysis either.
 
L8r,
 
r b-j
 
 

Received on Friday, 10 May 2013 19:56:55 UTC