Bob Razowsky Posted February 10, 2016 Share Posted February 10, 2016 Hi everyone! I'd like to apply Web Audio API filters on babylon sounds. ( http://www.html5rocks.com/en/tutorials/webaudio/intro/ , middle of the page) Is there a way to do it with Babylon? If not, can I access the source and destination? Thx! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 12, 2016 Share Posted February 12, 2016 Hi Bob! Good to see you again. I'm not qualified to answer this question... I think @davrous and @Stvsynrj are the local web audio heroes. Allow me to try to look foolish, for ya. Check out https://github.com/BabylonJS/Babylon.js/tree/master/src/Audio , or more specifically... https://github.com/BabylonJS/Babylon.js/blob/master/src/Audio/babylon.audioEngine.js Notice the term audioContext showing-up often in that file? Well, I believe that audioContext is the same as... https://www.w3.org/TR/webaudio/ See sections 2.27 and 2.28. In theory, once you have a ref to the audioContext, you have access to those filters. You might be interested in Stvsynrj's analyser tutorial, too. Everything needed for that demo... was recently added to BJS (one layer above core). I'm not REAL sure what the analyser does, but it certainly COULD be a "spectrum analyser". In the audioEngine source, you'll see mention of it. if (this._connectedAnalyser), etc. Spectrum analysers are quite related to graphic equalizers, as you likely know. I think they are quite dependent upon the use of filters. Maybe this helps. Hopefully, smarter people than I will respond soon. Be well. Stvsynrj 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2016 Share Posted February 12, 2016 Actually, I don't think that the filters are implemented at the BJS level. But as it is just a layer ontop the WebAudio API, you can use them if you want. About Sounds and Music in BJS, all is documented here : http://doc.babylonjs.com/tutorials/16._Playing_sounds_and_music Wingnut 1 Quote Link to comment Share on other sites More sharing options...
davrous Posted February 13, 2016 Share Posted February 13, 2016 Hi! I haven't implemented it yet. This is on my to do for 2.4 (convolver and velocity/Doppler). In the meantime as said by @Wingnut, you can take the web audio context created by babylonjs. Cheers, David 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.