W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

Re: Wrapper for combination of nodes

From: Srikumar Subramanian <srikumarks@gmail.com>
Date: Tue, 18 Dec 2012 11:27:17 +0530
Message-ID: <5906703730479044893@unknownmsgid>
To: Stuart Memo <stuartmemo@gmail.com>
Cc: Audio Working Group <public-audio@w3.org>
I believe the stand taken by the group regarding such higher level
constructs is that they should be handled by a JS library and not be part
of the spec. A de facto standard may happen if this is a common requirement.

Given how small the GraphNode function is to provide the necessary
abstraction, such objects can be expected to interoperate without much
difficulty.

Best,
Kumar

On 17-Dec-2012, at 11:38 PM, Stuart Memo <stuartmemo@gmail.com> wrote:

Many thanks for this Kumar. That's great as an interim measure, but I feel
that there should be some sort of standard way of doing this. Without a way
of wrapping up nodes, sharing created effects or managing large projects
becomes much more difficult.

Thoughts?
On 17 Dec 2012 06:36, "Srikumar Subramanian" <srikumarks@gmail.com> wrote:

> You may find the GraphNode maker function in the linked file useful. It
> makes an object that mimics the connect/disconnect functions of an
> AudioNode, while supporting GraphNode objects, AudioNodes and AudioParams
> as connection targets.
>
> https://github.com/srikumarks/steller/blob/master/steller.js
>
> The "function GraphNode..." is standalone.
>
> Best,
>  -Kumar
>
> On 17-Dec-2012, at 4:33 AM, Stuart Memo <stuartmemo@gmail.com> wrote:
>
> Hi all,
>
> I'm struggling to find a decent solution to packaging a group of nodes
> together in a way that can be used similarly to native nodes. For example,
> the recent Jam with Chrome article on html5rocks does this :
>
> var MyCustomNode = function(){
>     this.input = audioContext.createGainNode();
>     var output = audioContext.createGainNode();
>
>     this.connect = function(target){
>        output.connect(target);
>     };
> };
>
> Which means you have to connect to a node like so:
>
> gain.connect(customNode.input);
>
> Which is bananas! By having to specify '.input', it breaks the standard
> way of connecting nodes. Is there a better way of doing this? If not, is it
> worth discussing a way of packaging groups of nodes in a standard way?
>
> Thanks!
> - Stuart
>
>
Received on Tuesday, 18 December 2012 06:02:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:14 UTC