Comments (7)
Looks like a fine integration, nicer than I had expected 😄 Will investigate and have a few more questions / suggestions...
from virtual-audio-graph.
Thanks! Yeah I think it's possible. I'm not sure what the API should be though. My initial thought is to let the user call addModule
themselves and provide something like a createWorkletNode
function that is called with the worklet node's name and returns a virtual audio node creator function that works in the same way as all the standard ones provided (e.g. oscillator
, gain
etc.):
const audioContext = new AudioContext()
const virtualAudioGraph = createVirtualAudioGraph({audioContext})
audioContext.audioWorklet.addModule('my-node.js').then(() => {
const myNode = createWorkletNode('my-node')
virtualAudioGraph.update({
0: myNode('output'),
1: oscillator(0),
})
})
I'm a bit unsure about how testing is going to work for this as I've been using https://github.com/mohayonao/web-audio-test-api and it doesn't look like it has AudioWorklet support so will have to have a think about that 🤔
What do you think about the API though? Any suggestions?
from virtual-audio-graph.
Cheers, when I've got a bit of spare time I'll start looking at building it!
from virtual-audio-graph.
Awesome! So the way I understand this is that an AudioWorklet can be used in a virtual-audio-graph like any other audio node and connected to other AudioContext nodes. Does this also allow the params the AudioWorklet might expose to be updated by the virtualAudioGraph.update
function?
Have you seen Genish.js? Looks like it will also be able to work with AudioWorklets according to charlieroberts/genish.js#8
from virtual-audio-graph.
Hey, yep that's exactly how I envision it working!
And I've not seen Genish.js before - looks really cool, thanks for sharing :)
from virtual-audio-graph.
🎉 This issue has been resolved in version 1.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from virtual-audio-graph.
Hey! I've added support for AudioWorklets now. It's working in the new documentation, but I am lacking unit test coverage atm. I don't think that's a major issue right now because it's so new and experimental so can come back to that later! Thanks for raising the issue and let me know if you have any questions! :)
from virtual-audio-graph.
Related Issues (20)
- AudioContext in Safari always 'suspended' HOT 1
- The automated release is failing 🚨
- create node with no output? HOT 1
- Persisting audio graph definitions using functions HOT 8
- Access to currently playing sound? HOT 2
- The automated release is failing 🚨
- Code in custom node is interpreted in a different way HOT 4
- A custom node inside of a custom node HOT 5
- LFO HOT 1
- Support OfflineAudioContext (repeat #8) HOT 4
- How to use in browser. HOT 2
- Thank you so much for virtual-audio-graph
- The automated release is failing 🚨 HOT 1
- Redundant `exponentialRampToValueAtTime` calls cause click noises HOT 4
- The automated release is failing 🚨
- Only 1 layer of custom nodes? HOT 3
- v1.1.1 release don't include the compiled module HOT 1
- Possible bug with offset HOT 3
- Example connect to a source from a file HOT 5
- VAG samples not working in safari HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtual-audio-graph.