W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Re: creating complex/wrapped nodes

From: Marcus Geelnard <mage@opera.com>
Date: Fri, 20 Jul 2012 08:56:36 +0200
To: public-audio@w3.org, "Matt Diamond" <mdiamond@jhu.edu>
Message-ID: <op.whqf8macm77heq@mage-desktop>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 20 July 2012 06:57:03 GMT