Comments (5)
Hey, this sounds very interesting, but I'm not sure I totally understand it right now. When you say "timbre configuration" do you mean some sort of object that represents a graph of audio nodes? And are you suggesting being able to specify that in a serializable way so it can be stored as JSON? I'm not sure how that would work if you wanted the graph to be customizable, like if you wanted to specify pitch or something like that. Maybe some code examples might help me understand better!
from virtual-audio-graph.
Right, "timbre configuration" would be the same configuration used in virtual-audio-graph and yes, I'm hoping there is a way to serialize it as JSON and then deserialize back to JS. I'll take a closer look at the docs example and the API to see how this might work and get back to you soon...
from virtual-audio-graph.
Looking closer at the API I now have a clearer idea of what virtual-audio-graph (VAG) is and how it might fit with what I am moving towards. I think it is important to have the right abstractions, so that is what I will try to express below.
The main thing I'm noticing is that what VAG does is hardwire all the values for nodes in a configuration. This is great for defining playable graphs but not so useful for more elaborate playback scenarios, like musical score structures. The kind of VAG configuration I would find useful would only define the nodes and their connections and then just default values or no values for the nodes.
Here is the scenario and abstractions I require:
-
Have configurations defined as JSON with default or neutral values for all nodes defined in them.
-
Fetch and load a JSON score structure and create a VAG for each track (or staff voice) defined in the score. The score contains references to specific JSON VAG configurations, so these would be fetched and loaded into the respective track VAG's that were created.
-
The initial configurations referenced at the start of each track would be loaded into it's respective VAG. Configuration references can be specified at any point in the score track timelines, so these would be fetched and updated into the respective VAG at runtime (or alternatively all would be resolved when a score loads or when a new reference is made via score editing tools).
-
As the score is played the data values in the score would be scheduled (this process is something I'm doing in a unique way so it would not have to be part of the VAG API). The note pitch, duration, volume and the various params specified in the score tracks would then be injected/updated into the respective VAGs for the score's tracks as playback advances.
-
The VAG's and their loaded node configurations would receive incremental scheduled values from the score, in contrast to being hardwired into configurations. The score would be the source of all editable and softwired values.
On another point of interest, the site ReadMe says that VAG was inspired by the React VDOM. So I'll just add that I recently discovered lit-html, which is a functional way to render ES6 template-literals. It has a whole new way of updating the DOM that does not use a VDOM approach, it might also be inspiring to you!
https://github.com/polymer/lit-html
from virtual-audio-graph.
Hey, thanks for your comment and I'm sorry it's taken a while to reply - life has been a bit hectic recently!
So I think maybe for your specific use-case virtual-audio-graph might not be the best tool, but you could definitely use it as a base for a library that did allow you to use the web audio API in that sort of way. It should be possible to map JSON scores to inputs that virtual-audio-graph would understand using virtual-audo-graph's custom virtual audio nodes.
And cheers for sharing lit-html - it reminds me of https://github.com/choojs/nanohtml but more advanced!
from virtual-audio-graph.
Going to close this for now, feel free to reopen if you want to discuss further!
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.