as3fxr ( synth port to JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit b2bfe50 Sep 5, 2014


as3fxr ( synth port to JavaScript created for js13kGames

Licensed under Apache License 2.0

Current version contains various performance/browser compatibility improvements by @maettig

New minified size is 2517 bytes (Closure with Advanced Mode) thanks to improvements by @chandlerprall and @gheja.

Pull requests for further improvements are welcome ;)

Tested with FF 14, Chrome 21 and Opera 12


  1. Create a sound with as3sfxr (
  2. Copy settings string (Just use Ctrl+C on the as3fxr page) and save it as a JavaScript array
  • String looks something like this: "0,,0.1812,,0.1349,0.4524,,0.2365,,,,,,0.0819,,,,,1,,,,,0.5"
  • Should be passed as JavaScript array like this: [0,,0.1812,,0.1349,0.4524,,0.2365,,,,,,0.0819,,,,,1,,,,,0.5]
  1. Play sound in JS using the following code:
 // asfxr string gets passed into jsfxr as array
 var soundURL = jsfxr([0,,0.1812,,0.1349,0.4524,,0.2365,,,,,,0.0819,,,,,1,,,,,0.5]); 
 var player = new Audio();
 player.src = soundURL;;

Check out demo.html for some examples. Interactive demo is also available as jsFiddle