Re: creating complex/wrapped nodes

Den 2012-07-19 23:42:37 skrev Matt Diamond <mdiamond@jhu.edu>:

> Hey all,
>
> This might be a naive question, but is there a simple way to create
> "extended" nodes with additional properties / prototype methods based on
> existing nodes?
>
> To clarify, if I wanted to build my own Envelope node, I could create an
> EnvelopeNode constructor that itself instantiates an internal gain node
> (e.g. this.gainNode), but an object created this way will fail to  
> interact
> normally with other native nodes... i.e. instead of
> osc.connect(myEnvelopeNode) you would have to use
> osc.connect(myEnvelopeNode.gainNode).

[snip]

> Any suggestions?
>

I think that this is a typical case where you'd want to use the JavaScript  
node (provided that it is fully featured), coupled with a DSP API to do  
the number crunching (see [1]). It would give you the necessary  
possibilities to interact normally with the node graph.

/Marcus


[1] http://lists.w3.org/Archives/Public/public-audio/2012JulSep/0155.html


-- 
Marcus Geelnard
Core Graphics Developer
Opera Software ASA

Received on Friday, 20 July 2012 06:57:03 UTC