[LAD] Re : Saving plugin presets

Stefan Kost ensonic at hora-obscura.de
Thu Oct 8 19:43:07 UTC 2009


Stefan Kost schrieb:
> Paul Davis schrieb:
>> On Fri, 2009-01-23 at 20:45 +0200, Stefan Kost wrote:
>>> Paul Davis schrieb:
>>>> On Wed, 2009-01-21 at 23:07 +0200, Stefan Kost wrote:
>>>>
>>>>> Seems to be a nice library, but it looks already too capable for the task at
>>>>> hand. The idea is to agree on a simple format, so that we don't add a hidden
>>>>> dependency for a certain library to parse it. Therefore no xml, rdf etc..
>>>> No, no, and a hundred times no. This is the code needed in ardour to
>>>> load a named preset:
>>> I got ensure in a previous thread, that the rdf approach is flawed, as you can't
>>> get a list of presets for each plugin. I got no answer how its supposed to work.
>>> What an application would want to do is:
>>> * scan LADSPA_PATH for plugins
>>> * get the rdf blob for each
>>> * build a list of presets for each plugin
>> given a unique integral ID for a plugin:
>>
>> 	lrdf_uris* set_uris = lrdf_get_setting_uris(id);
>>
>> 	if (set_uris) {
>> 		for (uint32_t i = 0; i < (uint32_t) set_uris->count; ++i) {
>> 			if (char* label = lrdf_get_label(set_uris->items[i])) {
>> 				labels.push_back(label);
>> 				presets[label] = set_uris->items[i];
>> 			}
>> 		}
>> 		lrdf_free_uris(set_uris);
>> 	}
>>
>> 	// GTK2FIX find an equivalent way to do this with a vector (needed by
>> GUI apis)
>> 	// labels.unique();
>>
>> 	return labels;
>>
> After a long time I got back to this and unfortunately it does not work for me :/
> 
>     uris = lrdf_get_setting_uris (desc->UniqueID);
>     if (uris) {
>        guint32 j;
> 
>        for (j = 0; j < uris->count; j++) {
>          printf ("setting_uri : %s\n", uris->items[j]);
>          if ((str = lrdf_get_label (uris->items[j]))) {
>            printf ("setting_label : %s\n", str);
>          }
>        }
>        lrdf_free_uris (uris);
>      }
> 
> This gives me a lot of
> setting_uri : _:genid223061.366f1
> but no single label. Also I totally miss how I could acualy load a preset, so
> that the values from the preset are acivated in the plugin.

Okay I found the other parts in the ardour sources.

> 
> I also studies the rdf file I have and I can't find anything that looks like a
> list of names parameter sets there. Those are the rdfs that I have.
> calf.rdf, cmt.rdf, fa-plugins.rdf, ladspa.rdfs, swh-aux.rdf, swh-plugins.rdf,
> swh-scales.rdf, tap-plugins.rdf, tap_reverb.rdf

If I got it right from the few comments in lrdf.h, the presets are most likely
stored in *.n3 files. Lrdf package actualy installs one with the dev package
under /usr/share/doc/packages/liblrdf-devel/examples/preset-in.n3 here. Is is so
that none of the ladspa plugins atualy ship any of those?

Also in ardour I have not yet found a plugin that actualy has presets.

Stefan




More information about the Linux-audio-dev mailing list