zauner / vvvv.js

http://vvvvjs.com
MIT License
511 stars 69 forks source link

Audio Nodes: Mixing #23

Closed zauner closed 9 years ago

zauner commented 9 years ago

As follow up to pull request #20

just saying ;)

geloescht commented 9 years ago

A few options here:

  1. Follow the example of VAudio and implement as "Add (HTML5 Audio)". The underlying API node could be GainNode which could or could not export its gain parametre.
  2. Implement as "Mixer (HTML5 Audio)" and export multiple gain parametres as well as audio inputs.

Additional, non-exclusive possibility:

  1. Implement as "Add (HTML5 Audio Spectral)" or "Mixer (HTML5 Audio Spectral)" and use spreads for mixing. See #22 for discussion on spreadability of audio nodes.

Feel free to add your suggestions :)

zauner commented 9 years ago

I must say, I can't decide which one I would prefer :)

From a patching point of view, only having a Mixer node would be ok. I can leave the gain pins alone, if I just want to add signals.

On the implementation side however, this means that there are always multiple underlying gain api nodes in the Mixer, even if I don't change the input signals' amplitudes. In that case, the Add node would save api nodes. Don't know if that matters, though :)

But maybe both are legit and can coexist?

Spectral variants are a great idea, in any case.

artofmus commented 9 years ago

Spreads, I think, it's innovative and correctly and follows the general logic of vvvv. But until then not a bad thing to get mixer node through GainNode.

geloescht commented 9 years ago

Commit 488dd0f674693c91437375c75ca3681bf761d46f now includes Add (HTML5 Audio) that can be used to mix audio streams. It is based on GainNode but does not export any params. I think this is a good compromise between performance and simplicity.

zauner commented 9 years ago

superb, thanks