Subject: [linux-audio-dev] LADSPA Defaults via RDF
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Tue Jul 16 2002 - 20:44:59 EEST
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
This archive was generated by hypermail 2b28 : Tue Jul 16 2002 - 20:53:08 EEST