-
Notifications
You must be signed in to change notification settings - Fork 166
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
(WaveTableNormalization): WaveTable normalization in createWaveTable not clearly defined #91
Comments
I feel that the application of normalization in any form at all may be a serious problem with WaveTable. I do not think that PeriodicWave/Oscillator should be involved in messing with the coefficients in the Fourier series; this creates extra work for developers trying to figure out how to set those coefficients to produce a given overall dynamic level relative to other sounds. The philosophy here seems to be to remove control from developers and make PeriodicWave into a pure timbre spec, not the Fourier series that it actually is. But that drags in a lot of complications as Philip pointed out originally, Say one wants to produce two PeriodicWaves that differ in the value of only one coefficient but are otherwise identical in terms of volume. A developer would have to reverse engineer the normalization and correct all the other coefficients to produce this result. Even if we don't change this normalization behavior, it certainly needs to be much more carefully speced. |
Chris Rogers once said when I was poking at him about wavetable normalization "yeah, we probably should have a parameter to disable the normalization or something." |
TPAC resolution:
|
The normalization is done roughly like this:
This scale factor is used to scale the time domain signal for all frequencies used by the oscillator. |
Correction. This is how the normalization is done.
|
This fixes WebAudio#91 by adding the optional normalization parameter to createPeriodicWave. We also describe the basic waveform generation and the normalization process.
…icWave o Add optional normalization parameter to createPeriodicWave. o Define how normalization is done. o Define the waveform generation better.
Audio-ISSUE-84 (WaveTableNormalization): WaveTable normalization in createWaveTable not clearly defined [Web Audio API]
http://www.w3.org/2011/audio/track/issues/84
Raised by: Philip Jägenstedt
On product: Web Audio API
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-createWaveTable
"The created WaveTable will be used with an Oscillator and will represent a normalized time-domain waveform having maximum absolute peak value of 1. Another way of saying this is that the generated waveform of an Oscillator will have maximum peak value at 0dBFS. Conveniently, this corresponds to the full-range of the signal values used by the Web Audio API. Because the WaveTable will be normalized on creation, the real and imag parameters represent relative values."
This does not clearly define what normalization must be performed. Should/can the normalization be performed analytically, or should one period be generated and the maximum (absolute) value in that period be found? These approaches may not arrive at the exact same normalization level, so a sample-exact test suite would not be possible.
The text was updated successfully, but these errors were encountered: