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:

>

>>

>>

>> Chris, i am studying the waveTable and OscillatorNode code. i'm sorta

>> assuming you're in the file's heritage, i dunno.

>>

> Yeah, I wrote it.

>
i'm understanding most of it. (exceptions noted.)


>

>

>>

>>

>> don't s'pose there's a pitch or period estimator in this, is there?

>>

>> are you guys doing any analysis tools that would take a recorded note and

>> extract either additive synth data (that can be fed to

>> createBandLimitedTables() or the extractive wavetable directly from the

>> pitch-tracked data?

>>

>> you might want the means to a more general wavetable definition than SINE,

>> SQUARE, SAWTOOTH, and TRIANGLE. it might be hard to find some of it, it's

>> very old (pre-1996), the computer that it lives on hasn't been turned on

>> for a while, but i did this before, including what you did defining

>> wavetables. and i might be able to find some MATLAB code of the same

>> vintage.

>>

> The idea is that you can do the analysis of a recorded note directly in

> JavaScript, then create a WaveTable object (which internally in

> WebKit/Blink would call into createBandLimitedTables(), but that's an

> implementation detail).
just an implementation detail?  you're gonna need to track pitch.  and you're gonna need to make sure adjacent wavetables are phase aligned.  and you might want to be able to automatically cull redundant wavetables.
> So, in other words it
already is more general than
> SINE, SQUARE, SAWTOOTH, and TRIANGLE, since you can create your own with

> the createWaveTable() method. The common waveforms are just there for

> convenience.

>

>

>

>>

>>

>> 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.

>

>

>

>> and i was looking for where CentsPerRange might be used. that would be

>> interesting code i presume building a "keymap" of ranges or whatever you

>> call the set of wavetables that correspond to different places on the

>> keyboard. in some semantics, a "wavetable" is an array of what we might be

>> calling a wavetable here (which is an array of a single period of samples).

>>

> Yes, sorry that the name WaveTable may have been a bit poorly chosen, and

> perhaps PeriodicWave might be better.
i've been calling them "wavetables", but i think that PPG calls an array of wavetables, a "wavetable".
 
but you might be right.  if you change the nomenclature (in the code), i'll stick with
it.
 
> I think there's an open bug about
> the naming here... I realize that it could be useful to have an array of

> these things. I think I remember reading a paper you wrote about this

> topic and the analysis techniques you used!

>
it's 101.  it was written sorta obtusely, because i didn't want to be explicit with the math for discrete time.  so i mostly did it referring to continuous time.


>

>

>>

>>

>> so you can have that array of wavetables with 2 or more dimensions ("slow

>> time", pitch, key velocity, key pressure, modwheel, pedal; joystick,

>> slider, i dunno whatever controller). and you can interpolate in any or

>> all of these dimensions, but it gets costly. you double the number of

>> linear-interpolations every time you add a dimension to interpolate in.

>>

> Yes, cool stuff.

>
 
well, doing 8 linear interpolations for so that you can morph wavetables according to time, varying pitch (keyboard location), and a modwheel or something (3 dimensions), is a pain in the arse.  and costs (but it should still be cheaper than straight additive synthesis
with 3 control parameters).
 
i'll see what i can come up with.  some of this code may even be on a Mac floppy disk, ca 1990.
 
if you can point me to an array that is the recorded note, i think i can come up with code that extracts wavetables out of
it.
 
r b-j
 

Received on Friday, 10 May 2013 04:34:48 UTC