Hi Steve!

I really like it! Also it opens up a lot of other possibilities in the
future like GUI hints, etc.

Richard.

On Tue, Jul 16, 2002 at 06:44:59PM +0100, Steve Harris wrote:
> OK, I now have a minimal proof of concept for describing LADSPA plugins,
> presets and defaults with RDF (http://w3c.org/RDF).
> 
> At this point I'd like to get some feedback so I can decide wether to cut
> my losses or finish it (a usable library for hosts would be about another
> weeks work, on and off).
> 
> My solution relys on the raptor RDF parser (GPL), which inturn links to
> libxml or expat (though only libxml works ATM). An example code fragment
> to find the defaults for a plugin, given its UID looks like:
> 
>       def_uri = lrdf_get_default_uri(uid);
>       if (def_uri == NULL) {
>               printf("(none known)\n");
>               return 1;
>       }
> 
>       printf("Defaults for plugin %d: %s\n", uid,
>               lrdf_get_setting_metadata(def_uri, "title"));
> 
>       defs = lrdf_get_setting_values(def_uri);
>       for (i=0; i < defs->count; i++) {
>               printf("\tport %d (%s) = %f\n", defs->items[i].pid,
>                defs->items[i].label, defs->items[i].value);
>       }
>       lrdf_free_setting_values(defs);
> 
> giving:
> 
> [swh@dumuzi lrdf]$ ./showdefaults 1416
> Defaults for plugin 1416: Concert A sine (soft)
>         port 1 (wave) = 1.000000
>         port 2 (freq) = 440.000000
>         port 3 (warm) = 0.500000
>         port 4 (instab) = 0.000000
> 
> You can see my work in progress at http://plugin.org.uk/lrdf/ , if you're
> brave you could try building it, make sure you build raptor with
> ./configure --with-xml-parser=libxml
> 
> The bad news is that RDF is pretty verbose, a description of 61 plugins +
> thier defaults comes in at 91k (all.rdf). This doesn't include scales,
> units, metadata (see sample.rdf) or the type hierachy, but they won't add
> much.
> 
> Also in the directory above is a sample plugin description (sample.rdf)
> and a sample defaults file (default-sample.rdf).
> 
> Conclusion
> 
> Advantages
> 
> Its a unified way of describing everything* about plugins, it's standards
> compliant, extensible, and generally good.
> 
> Disadvantages
> 
> Its not as efficient as a pure XML approach.
> 
> Comments?
> 
> - Steve
> 
> * well... most things

-- 
--
Richard Guenther <[EMAIL PROTECTED]>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
The GLAME Project: http://www.glame.de/

Reply via email to