Re: Thoughts and questions on the API from a modular synth point of view

Den 2012-07-18 10:29:52 skrev Peter van der Noord <peterdunord@gmail.com>:

> Ah, thanks. I will read through that list.
>
>>  AudioParam.name was removed: https://www.w3.org/Bugs/**
> Public/show_bug.cgi?id=17397<https://www.w3.org/Bugs/Public/show_bug.cgi?id=17397>
>
>
> Why was it removed? I can't see any harm in it being there if someone
> doesn't use it.

Basically because we couldn't find a critical use case for it, and  
spec:ing, supporting and testing something costs more than not having it  
there at all ;)

> My approach is that i'd like nodes to completely draw
> themselves, retrieving all necessary data from the object (and its
> parameters) itself. A lenghty full description might be too much, but a
> parameter having a short name doesn't seem like a very strange property.
> Someone replied earlier that these params are all described in the
> specification and that i can look it up there, but that argument holds as
> well for the min/max-values, yet they are supplied.

I believe that the best approach for what you're trying to do is to make a  
wrapper object of some sort that includes the information that you're  
looking for (typically static information, such as AudioParam name, units,  
min/max, AudioNode name, etc). Unless you'll be handed a node graph that  
was not created by yourself, you have full control over the creation of  
the nodes, and you also typically know a great deal about the nodes that  
you support in your software.

Also, by using your own representation/description, you're free to do a  
lot more than can possibly be provided by the API (e.g. colors, icons,  
full text descriptions, internationalized names/descriptions, etc).

/Marcus




-- 
Marcus Geelnard
Core Graphics Developer
Opera Software ASA

Received on Wednesday, 18 July 2012 12:17:48 UTC