rserota Posted June 29, 2014 Share Posted June 29, 2014 Hello all, I'm the author of an open-source audio library that I think would be very useful to anyone making a game on the internet. WAD.js is the Web Audio DAW (digital audio workstation). The goal of WAD.js is to emulate the features you would find in a DAW like FL Studio, with an interface that is much, much simpler than working with native WebAudio. Instead of creating complex networks of audio nodes to make basic sounds, as you have to do in native web audio, WAD.js wraps everything that is needed for a single sound into a single object (a "wad") that has convenient methods that you can use to dynamically modify the sound. For example, if you want to simulate a bustling city, WAD.js makes it easy to pan sounds in 3-dimensions, so you can hear different people (or cars, or dogs, or whatever) moving around the main character. Or maybe your character just went into a tunnel, so you'll want to increase the reverb on all the sound effects. If you're really the DIY type, you can use WAD.js to combine oscillators, filters, and effects to make your own sound effects. WAD.js also supports MIDI input, so if you wanted to make some kind of rock-band like game, you could certainly do that without too much difficulty. I'm actively developing this project, so new features are being added all the time. Please check it out on github. Contributions are certainly welcome!https://github.com/rserota/wad Also, I have a demo online that shows off some of the basic features of this library, in case you want more information before you really dive into the code.http://www.codecur.io/us/songdemo codevinsky, Tilde, ashok277 and 1 other 4 Quote Link to comment Share on other sites More sharing options...
wies Posted March 16, 2015 Share Posted March 16, 2015 HiThank you for the lib. I am able to run the demo successfully.But when I tried to change input to mic I'm getting the follwing errors. Uncaught TypeError: Cannot read property 'interface' of undefinedwad.js:327 plugEmIn wad.js:575 Wad.play play.js:25 soundOn test.html:182 onclick wad.js:217 Uncaught TypeError: Cannot read property '0' of undefined wad.js:217 setUpMic wad.js:197 (anonymous function) This is the code I modified in play.js settings = {source : 'mic',filter : {type : 'highpass',frequency : 700},panning : -2} Please help me regardsWies Quote Link to comment Share on other sites More sharing options...
Tilde Posted February 11, 2016 Share Posted February 11, 2016 I love the functions that are there, but I'm getting killed by the lack of access to the sound data, such as playhead position or onDecoded events. Unless those actually are accessible through the audioContext and I just can't find them. Quote Link to comment Share on other sites More sharing options...
rserota Posted February 11, 2016 Author Share Posted February 11, 2016 If you want to know when the audio file is finished decoding, you can pass a callback to the Wad constructor. var bell = new Wad({ source : 'http://www.myserver.com/audio/bell.wav', callback : function(thisWad){ console.log(thisWad) } }) This function will run after the audio file has been downloaded and decoded, at the end of the audioContext's decodeAudioData callback. Playhead position is harder to access. As a workaround, you can check Wad.audioContext.currentTime when you trigger a sound, and then compare it to (e.g.) bell.decodedBuffer.duration, which tells you how long the audio clip is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.