Giter Site home page Giter Site logo

Comments (5)

benji6 avatar benji6 commented on May 22, 2024

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.

MVSICA-FICTA avatar MVSICA-FICTA commented on May 22, 2024

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.

MVSICA-FICTA avatar MVSICA-FICTA commented on May 22, 2024

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:

  1. Have configurations defined as JSON with default or neutral values for all nodes defined in them.

  2. 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.

  3. 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).

  4. 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.

  5. 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.

benji6 avatar benji6 commented on May 22, 2024

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.

benji6 avatar benji6 commented on May 22, 2024

Going to close this for now, feel free to reopen if you want to discuss further!

from virtual-audio-graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.