New issue
Advanced search Search tips

Issue 645026 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

WebAudio sinusoidal buffers below 120Hz are inaudible

Reported by alexande...@gmail.com, Sep 8 2016

Issue description

UserAgent: 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.
 
Found another way of demonstrating - this handy WebAudio synth:

https://jsfiddle.net/remotesynth/69tQE/

The bottom 1/3 of the keys are nearly inaudibly and suffer from significant clipping.

Note that this example uses the Oscillator API instead of a buffer and has the same result.
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.
Components: -Internals>Media Blink>WebAudio

Comment 4 by rtoy@chromium.org, 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
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.
Screen Shot 2016-09-09 at 11.00.56 AM.png
44.6 KB View Download

Comment 6 by rtoy@chromium.org, 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.

Comment 7 by rtoy@chromium.org, Sep 12 2016

Labels: Needs-Feedback
Please test again with different headphones/speakers.

We are unable to reproduce this issue.
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.


Comment 9 by rtoy@chromium.org, Sep 13 2016

Status: WontFix (was: Unconfirmed)
Thanks for confirming that things are working correctly with headphones!

Closing as WontFix.  Everything is working.

Sign in to add a comment