New issue
Advanced search Search tips

Issue 627111 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature



Sign in to add a comment

Implement "preserve pitch" on Web Audio API when changing playbackRate

Reported by bmfitzge...@gmail.com, Jul 11 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Example URL:
https://www.lexoapp.com/lesson/hola-soy-tony

Steps to reproduce the problem:
1. Adjust the playbackRate property on an audio file loaded into the Web Audio API 

2. OR, using the url above, simply click the clock icon next to the play button.

What is the expected behavior?
Playback rate should be adjusted without affecting the pitch of the audio.

What went wrong?
The pitch is affected along with the playback rate, leading to "alvin and the chipmunks voice" when speeding up (or the reverse when slowing down).

Did this work before? No 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? No Firefox (47.0.1)

Chrome version: 51.0.2704.103  Channel: stable
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0

preservePitch: true

For what it's worth, audio controlled with HTML5 <audio> (as opposed to the Web Audio API) allows you to affect the playback rate while still preserving pitch.
 

Comment 1 by shrike@chromium.org, Jul 11 2016

Labels: -Type-Bug -OS-Mac OS-All Type-Feature
Status: Available (was: Unconfirmed)
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 12 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: dalecur...@chromium.org
Components: -Internals>Media Internals>Media>Audio
Dale, I can repro this issue but I think this behavior is not a regression. Safari behaves the same. increase or decrease playbackrate does change audio pitch.
can you justify if this is by design?
Components: -Internals>Media>Audio Blink>WebAudio
This is a WebAudio issue.
Just to chime in on why I originally filed this issue. In language learning applications, for example, it is very important to be able to slow down the speed of audio as it plays back (for better comprehension), however, ideally you don't want it to sound like the speaker is suddenly a baritone opera singer.

By the same token, if you want to speed-up playback, for example to listen to a podcast in your native language more quickly, you don't want it to sound like alvin and the chipmunks.

Thanks,
Brian

Comment 6 by d...@danbovey.uk, Jul 12 2017

This can now be done in Chrome 44+, Firefox 40+ and Edge 38+, with use of the playbackRate and the detune property.

They can be used together like this: https://webaudio.github.io/web-audio-api/#the-oscillatornode-interface
(where it says "They are used together to determine a computedFrequency value")

Comment 7 by d...@danbovey.uk, Jul 12 2017

Sorry above link is wrong, the only place it actually uses that formula with playbackRate and detune is in the code block in this section: https://webaudio.github.io/web-audio-api/#looping-AudioBufferSourceNode

Comment 8 by rtoy@chromium.org, Jul 12 2017

Status: WontFix (was: Untriaged)
This is by design and is the intended behavior.

I think if you adjusted detune and playbackRate so that kind of cancelled each other, the net effect is that the playback isn't sped up, which isn't what you want.

Changing this will require a change in the spec.  Please file an issue at https://github.com/WebAudio/web-audio-api/issues/new.

Closing this as WontFix (WAI).  If the spec is changed, we'll update Chrome appropriately.

Sign in to add a comment