Giter VIP home page Giter VIP logo

Comments (10)

geloescht avatar geloescht commented on August 23, 2024

I kind of like option two. Audio params are as far as I know always inputs (except for some non-standard browser implementations). So maybe we can get rid of the conversion for audio streams and only provide AsAudioParam (Value)? We'd have to prevent feeding values into real audio input pins, though.
In my opinion option one would be nice only if doable without breaking VVVV compatibility.

from vvvv.js.

zauner avatar zauner commented on August 23, 2024

You said it, the normal Audio Signal pins can't be confused with the Param pins. That's why i think it's inevitable to have this VVVV.PinTypes.AudioParam. Just for pretending it's something different, while it's actually either a float, or an api node.

The AsAudioParam nodes would actually do nothing but feed the value from one pin type to the other, without doing any conversion.

One thing to consider in any case is, what happens if such a pin gets disconnected. E.g. the Oscillator has a default frequency of 440 ... i change the value to 200 ... i (somehow) connect another Oscillator to the frequency pin, and things get all FMy. Then i disconnect the pin again -- what should happen? Should the value get back to 200, or to 440 or to 'the current modulator value' (if it's even possible to retreive this) ?

from vvvv.js.

geloescht avatar geloescht commented on August 23, 2024

Actually, what happens inside API nodes is even more complicated. The value gets modulated by any audio stream feeding into a parameter. See this part of the spec: http://webaudio.github.io/web-audio-api/#computation-of-value
So maybe we have to provide two input pins per audio param. One for the base value (pin type Value) and modulation (pin type WebAudio).

from vvvv.js.

zauner avatar zauner commented on August 23, 2024

ok so if i do

myOsc.freq = 300;
otherOsc.connect(myOsc.freq)

300 and the modulator signal are added up? Well then the decision is easy, and it's two pins per param, right?

@artofmus suggested this as well, I initially considered this impractical. But it might be the right thing.

from vvvv.js.

geloescht avatar geloescht commented on August 23, 2024

In theory yes. I will try and implement that. Although it could get confusing whith some nodes that have a high number of params, such as BiquadFilterNode. But when it is implemented we can worry about that.

from vvvv.js.

geloescht avatar geloescht commented on August 23, 2024

Implemented in a06d946. FM synthesis is sweet. DynamicsCompressor (HTML5 Audio) gets pretty large with 13 input pins (should be 11 really, browsers incorrectly implement DynamicsCompressorNode.reduction as an AudioParam).

from vvvv.js.

zauner avatar zauner commented on August 23, 2024

That's really fun to play with. I wish I had a clue about harmonics, though :)

Merged it into master.

from vvvv.js.

artofmus avatar artofmus commented on August 23, 2024

Looked, looks great) I would like to see at some sort of mixer, because without it, nothing really can be done. Although if you implement the spreads concept it need not be, possible to make the nodes something like vec2d(join) vec2d(split) stallone etc.,and it would, I think, a very innovative and correctly.) More interesting to know whether you will add ScriptProcessorNode? Would have been the height of perfection if you make something like shader code editor only for audio processing. And a little lacking ReverbNode full of happiness)

from vvvv.js.

geloescht avatar geloescht commented on August 23, 2024

ScriptProcessorNode is deprecated in favor of AudioWorker, which, sadly, isn't implemented yet by any browser vendor. If we add a script processor node now we should be extra careful to make it portable to AudioWorker.
Reverb is possible using Convolver (HTML5 Audio). You'll need an impulse response sample - you can download one for free from http://www.openairlib.net/ and load it via FileAudioBuffer (HTML5 Audio).

from vvvv.js.

artofmus avatar artofmus commented on August 23, 2024

oops) seemed to me that there is a separate ReverbNode) About AudioWorker I missed it, I'll know.

from vvvv.js.

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.