WebAudio ahoy..


At last Firefox and Chrome seem to be making steps forward with regard to audio 🙂 .. giving me an opportunity to migrate my Flash based music player (see previous experiment) to an HTML5-only implementation.


Using Emscripten I compiled my C code into JavaScript and hooked it up to the new experimental WebAudio APIs (ScriptProcessor, etc)… what can I say.. it works (see here).

PS: Unfortunately Chrome and Firefox still don’t seem to be on the same page with regard to correct chaining of Nodes.. still some work to be done.


Posted on August 2, 2013, in C, Chiptune, Compilers, Emscripten, HW emulation, JavaScript, Languages, SID, Web programming, WebAudio and tagged . Bookmark the permalink. 3 Comments.

  1. Great thing! I wonder if there is any news since last year!

    I have been trying to reduce speed a bit, since it sounds like it’s playing in NTSC speed or just a bit too fast?

    • The problem is that the emu still uses a hard-coded sample rate of 44100 and does not consider the actual replayRate of the AudioContext (which in Chome might likely be 48000 or even more – depending on your OS settings). I haven’t touched the code since the initial release but I’ll fix that problem when I find the time. (Meanwhile you could use Firefox as a workaround.)

      UPDATE: The player now uses proper resampling so that the music should now play with the same speed in all browsers.. (see http://www.wothke.ch/websid/)

      • So nice! Working on some new sid sounds that will slightly nudge the world of sid (wanted to type something like: change the world of sid forever, but that’s kinda hard to do 🙂 )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: