Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WaveTable is poorly named #170

Closed
olivierthereaux opened this issue Sep 11, 2013 · 11 comments
Closed

WaveTable is poorly named #170

olivierthereaux opened this issue Sep 11, 2013 · 11 comments

Comments

@olivierthereaux
Copy link
Contributor

Originally reported on W3C Bugzilla ISSUE-19561 Tue, 16 Oct 2012 20:41:47 GMT
Reported by Chris Rogers
Assigned to

It's been pointed out off-list that the WaveTable name is poor, since this name has other connotations involving synthesis techniques which sweep through through multiple waves:
http://en.wikipedia.org/wiki/Wavetable_synthesis

Suggested renaming is:
WaveTable -> PeriodicWave

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Wilson on W3C Bugzilla. Tue, 16 Oct 2012 20:49:05 GMT

Maybe AdditiveHarmonics? FourierHarmonics? It would be nice to capture that this is a set of harmonics being added to generate the waveform. All Oscillators are periodic waveforms.

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Rogers on W3C Bugzilla. Tue, 16 Oct 2012 21:21:41 GMT

(In reply to comment #1)

Maybe AdditiveHarmonics? FourierHarmonics? It would be nice to capture that
this is a set of harmonics being added to generate the waveform. All
Oscillators are periodic waveforms.

I much prefer PeriodicWave because this captures the essence of what it is. The OscillatorNode generates a periodic output based on a representation of a single cycle -- this is what I'm calling PeriodicWave

@olivierthereaux
Copy link
Contributor Author

Original comment by Marcus Geelnard (Opera) on W3C Bugzilla. Wed, 17 Oct 2012 08:16:12 GMT

I think I'm with Chris Wilson here. I find it a bit counterintuitive to have "Wave" in the name at all, since to me, a wave is a time domain thing but the WaveTable object holds frequency domain data (it's the OscillatorNode that produces the wave, not the WaveTable object).

More precisely, the data held in the object is the Fourier series of a periodic wave, but I guess PeriodicWaveFourierSeries is a bit too wordy to be practical?

As usual, interface naming is about the hardest thing you can do in computer science ;)

Here's another thought: You could treat the WaveTable object in a way that is independent of frequency/time domain. For instance, if the interface provided a way to set the object state from a time domain signal as well as from a frequency domain signal, and let it be up to the implementation to choose how to store the data internally (could be frequency domain for hi quality synthesis or time domain for low quality synthesis), and use FFT/IFFT internally for the setters, as appropriate for the implementation.

If so, I think "PeriodicWave" would be a very fitting name.

@olivierthereaux
Copy link
Contributor Author

Original comment by Jussi Kalliokoski on W3C Bugzilla. Wed, 17 Oct 2012 14:21:11 GMT

What about FormantTable?

@olivierthereaux
Copy link
Contributor Author

Original comment by Jussi Kalliokoski on W3C Bugzilla. Wed, 17 Oct 2012 14:52:36 GMT

(In reply to off-issue-tracker comment)

Formant implies an absolute frequency.

The WaveTable entries are harmonics, i.e. relative to the oscillator's
current fundamental frequency.

You're absolutely right, HarmonicTable is more accurate.

I didn't notice your earlier comment because it was made on the mailing list, please refrain from commenting on issues off the issue tracker to avoid the discussion from getting fragmented. :)

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Rogers on W3C Bugzilla. Tue, 04 Dec 2012 19:56:01 GMT

(In reply to comment #3)

I think I'm with Chris Wilson here. I find it a bit counterintuitive to have
"Wave" in the name at all, since to me, a wave is a time domain thing but
the WaveTable object holds frequency domain data (it's the OscillatorNode
that produces the wave, not the WaveTable object).

More precisely, the data held in the object is the Fourier series of a
periodic wave, but I guess PeriodicWaveFourierSeries is a bit too wordy to
be practical?

As usual, interface naming is about the hardest thing you can do in computer
science ;)

Here's another thought: You could treat the WaveTable object in a way that
is independent of frequency/time domain. For instance, if the interface
provided a way to set the object state from a time domain signal as well as
from a frequency domain signal, and let it be up to the implementation to
choose how to store the data internally (could be frequency domain for hi
quality synthesis or time domain for low quality synthesis), and use
FFT/IFFT internally for the setters, as appropriate for the implementation.

If so, I think "PeriodicWave" would be a very fitting name.

Actually, the object as it's currently implemented in WebKit does internally represent the data in the time-domain (in multiple tables to avoid aliasing at different playback rates -- this is an implementation technique I can share more details about...). And I do think it's conceivable that we could have a way to create these objects given a time-domain array of data.

So this object isn't really tied to frequency-domain or time-domain and the current way of constructing it is simply a matter of convenience.

So I hope that "PeriodicWave" will be a good name.

@olivierthereaux
Copy link
Contributor Author

Original comment by Marcus Geelnard (Opera) on W3C Bugzilla. Thu, 06 Dec 2012 08:50:12 GMT

Chris (R), do you think it's a good idea to add another method for creating the WaveTable (aka PeriodicWave) object from time-domain data?

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Rogers on W3C Bugzilla. Mon, 17 Jun 2013 20:28:29 GMT

(In reply to comment #7)

Chris (R), do you think it's a good idea to add another method for creating
the WaveTable (aka PeriodicWave) object from time-domain data?

Hi Marcus, sorry for the long delay. I think it's useful to add another method, but not critical we add it right now into the spec.

@olivierthereaux
Copy link
Contributor Author

Original comment by Chris Rogers on W3C Bugzilla. Mon, 17 Jun 2013 20:29:01 GMT

Fixed:
https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57

@olivierthereaux
Copy link
Contributor Author

Original comment by Marcus Geelnard (Opera) on W3C Bugzilla. Tue, 18 Jun 2013 06:19:06 GMT

(In reply to comment #9)

Fixed:
https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57

Looks good to me. And yes, it's not critical to add another time-domain function right now.

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Fri, 05 Jul 2013 09:36:01 GMT

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant