Re: [linux-audio-dev] LADSPA Defaults via RDF

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] LADSPA Defaults via RDF
From: Conrad Parker (conrad_AT_vergenet.net)
Date: Wed Jul 17 2002 - 03:28:10 EEST


Hi Steve, all,

For plugin (author-defined) defaults, I really can't see how any use of
RDF/XML can be a good thing -- we really should be moving towards defining
a getDefault() method in the API, and even dynamic parameter suggestions.
My concerns are:

        * bloat -- requiring all LADSPA hosts to link against libxml and
        handle xml data is unnecessary. "XML lets you do in 100 lines what
        took 10 lines before" etc. etc. Well defined C structs would be
        neater, easier for plugin and app authors to handle, require no
        external libraries and have no chance of becoming disassociated
        from their plugins. Audio authors are traditionally paranoid about
        bloat, now that more are moving to Linux lets not scare anyone away.

        * licensing -- requiring all LADSPA hosts to link to GPL code
        could limit LADSPA's uptake [tho I'm a fan of the GPL myself]

For user-defined presets, for which we need read/write access, do any of
these XML libraries allow concurrent read/write? otherwise anyone using
the same plugin in multiple apps concurrently is going to have a very
easily corrupted preset system. (If we're going to link against GPL code
anyway, we may as well use tdb [http://sourceforge.net/projects/tdb] :)

Conrad.

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_AT_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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jul 17 2002 - 03:37:23 EEST