# Compatible with Tone.js or raw Web Audio?

**URL:** <https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582>\
**Category:** Questions\
**Created:** [January 9, 2022, 3:47am UTC](https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582 "2022-01-09T03:47:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noaxis](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@noaxis](https://forum.babylonjs.com/u/noaxis)\
**Post date:** [January 9, 2022, 3:47am UTC](https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582/1 "2022-01-09T03:47:14Z")

</div>

Hello, I’m new to babylon.js and have been reviewing its audio capabilities. I see that libraries like [https://tonejs.github.io/](https://tonejs.github.io/) are also based on Web Audio and have extensive “DAW”-like capabilities that I think could work great in games.

My question is how one might integrate a Web Audio library like Tone.js with Babylon. For example, if I could define a chain of filters in Tone.js and then get the final Web Audio node, could I pass that into Babylon to link it to a mesh?

Thank you and sorry if the question isn’t very articulate. Still working on Web Audio vocabulary 🙂

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [January 9, 2022, 3:25pm UTC](https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582/2 "2022-01-09T15:25:23Z")

</div>

Hello and welcome!

Here is the initial example of Tone.js integration - [Babylon.js Playground](https://playground.babylonjs.com/#MR5TDR)  
Then one needs to connect `Tone.context` somehow with [AudioEngine | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/babylon.audioengine) and play [Sound | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/babylon.sound)

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [January 9, 2022, 4:00pm UTC](https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582/3 "2022-01-09T16:00:58Z")

</div>

You can just specify the framework’s context to be used by tone.js, according to the link

```auto
Tone.setContext(BABYLON.Engine.audioEngine.audioContext)

```

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [February 7, 2022, 11:36am UTC](https://forum.babylonjs.com/t/compatible-with-tone-js-or-raw-web-audio/26582/4 "2022-02-07T11:36:19Z")

</div>

Hi there @noaxis just checking in, was your question answered or can we help with anything more? 😃
