Live data from Hacker News

Typedrummer

typedrummer.com

71–80 of 137 posts

Re: Typedrummer

#72

When you unfocus the tab drum beats produces different sound. Is it a feature or bug?

It's how WebAudio works. If the tab loses focus, the callbacks to the Audio Thread are throttled so the sequencing might be a bit messed up.

Re: Typedrummer

#74
post #66

OK so basically we have 26 sounds ( http://typedrummer.com/audio/[a-z].mp3 ), an accel marker '(' (only 1 scale?), and a decelerator ')' (only 1 scale?). Anything else? And since everyone feels like sharing his own crap, I'm doing it as well http://typedrummer.com/j5c05o Edit: it's funny how Firefox (37) gets completely insane when it hasn't the focus on the tab anymore

In Chrome too, it is due to the JS engine working slowly when the focus is not on the tab anymore. To get around that issue he needs to wrap the setInterval function in a Web Worker, so the thread runs independently of the tab.

Re: Typedrummer

#76

When you unfocus the tab drum beats produces different sound. Is it a feature or bug?

I think it is more how any JS script works, Chrome and Firefox (at least) slow down the process (for CPU consumption, to save battery... etc). Since that script is working using a setInterval to look ahead, he needs to wrap the setInterval in a Web Worker, so that thread is never runned slowly.
Post reply on HN