PencilCode / musical.js

musical.js: a sequencing WebAudio synthesizer that supports ABC notation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sound is broken on Firefox 43.0.4

timaschew opened this issue · comments

It's playing but there is on each pitch a strange noise.
I'm on OS X 10.11.2

Same with Chrome on Android. Very slow tunes come fine. But faster ones show lots of noise.

It sounds like the sound system gets too much requests at the same time and can not handle them properly. It looks like too many initialisations or something around that. Easliy reproducible with musical.js/test/demo/interact.html

My suspection is, that keeping the Audion API busy and alive during playing might fix the bug?

Removing setValueAtTime() and linearRampToValueAtTime() appears to eliminate the initial clicks/noice. See
https://bugzilla.mozilla.org/show_bug.cgi?id=1228207
The bug report suggests ambiguities inside the web-audio-api, for handling volume relative to specified time and enabling smooth transitions.

Disabling the above mentioned calls in musical.js produces a sound which is not as expected, but improves much for FF on Android and even Chrome on Android :-/

Some more input:
The metronome app in the following tutorial does work as expected. It might be worth to look at how scheduling/look ahead is done there:
https://www.html5rocks.com/en/tutorials/audio/scheduling/
A more complex example from a presentation:
http://webaudiodemos.appspot.com/slides/#/14

I also tried the metronome app in my environment. It really seems to work. Would be glad if musical.js could be updated accordingly.