WebAudio sinusoidal buffers below 120Hz are inaudible
Reported by
alexande...@gmail.com,
Sep 8 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Example URL: https://jsfiddle.net/a55vLdcs/13/ Steps to reproduce the problem: 1. Synthesize a sinusoidal waveform below 120Hz from an AudioContext buffer. 2. Connect to a AudioContext destination and start What is the expected behavior? The audio signal should play back What went wrong? The audio signal is extremely low amplitude, rendering it inaudible Did this work before? N/A Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? No Firefox Chrome version: 52.0.2743.116 Channel: stable OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 22.0 r0 Strangely (or not?) rounding the values in the waveform to form a square wave at the same frequency plays back audibly, even when scaling the amplitude by 1/10.
,
Sep 9 2016
There's also a good chance this is a psychoacoustic effect and the real question is if the API should include an option to enable loudness correction.
,
Sep 9 2016
,
Sep 9 2016
I cannot reproduce this on the sample URL. I can hear output. For the webaudio synth URL, I do have problems hearing the very lowest sounds. I don't not hear clipping. For a quick and easy test, paste the following into hoch.github.io/canopy: // @channels 1 // @duration 1.0 // @sampleRate 44100 var osc = context.createOscillator(); var gain = context.createGain(); osc.frequency.value = 120; gain.gain.value = 1; osc.connect(gain); gain.connect(context.destination); osc.start(); Even for a frequency of 16.35, I see that the sinusoidal waveform is produced. I can't actually hear this though. Perhaps my headphones don't go that low or that I'm too old to hear it. I doubt webaudio will ever spec a loudness correction, but if this is important to you, file an issue on the spec at https://github.com/WebAudio/web-audio-api/issues
,
Sep 9 2016
First, I can clearly hear the left channel with my headphone (Sennheiser HD650) and the audio interface. I can even see the level meter from the audio interface is outputting the sound correctly. Try to mute the right channel. The perceptual loudness of square wave is much bigger than the pure sine with the same peak amplitude, so you might feel like you don't hear the left channel at all. In short, this is an issue about the inferior frequency response of the reproduction device (i.e. headphones, earbuds), not the web audio implementation.
,
Sep 9 2016
For the record, I didn't turn up the system volume high enough. When I do, I can hear all the notes from the synth.
,
Sep 12 2016
Please test again with different headphones/speakers. We are unable to reproduce this issue.
,
Sep 12 2016
Tried again on headphones - I can hear the frequencies without clipping. Previously I tried on 15" and 13" Macbook built-in speakers and couldn't hear anything.
,
Sep 13 2016
Thanks for confirming that things are working correctly with headphones! Closing as WontFix. Everything is working. |
||||
►
Sign in to add a comment |
||||
Comment 1 by alexande...@gmail.com
, Sep 8 2016