Re: [ecasound] extending the C-API design

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] extending the C-API design
From: Kai Vehmanen (
Date: Sun Nov 26 2000 - 21:04:04 EET

On Wed, 8 Nov 2000, janne halttunen wrote:

> Even more usable format would be: (thinking in python)
> - name (string)

...and a description. All ecasound objects provide at least name() and
description(). In many cases they are the same (I've been lazy ;)).

> - effect identifier (string?)

This actually belongs to the object maps. An object map is basically
a dictionary/map of objects and id-strings. As an example, when
libecasound is initialized, object of class EFFECT_LOWPASS
is assigned to id-string "efl". This is done in
'libecasound/eca-static-object-maps.cpp'. You can do lookups in
both directions ("efl" -> EFFECT_LOWPASS instance, E_L instance ->

> - number of parameters (int)
> - list of parameters (list of strings)

>>> s = ["gain-%","feedback-%"]
>>> len(s)

:) yup, I've been reading some Python tutorials. :)

> - list of parameter hint ranges, if available (list of lists of numbers (float?))

This is something that is about to change soon. The current scheme
(low-hint + high-hint) is more of a quick hack. I'm probably going to
imitate the LADSPA hint properties (so I can map LADSPA hints 1:1 to
ecasound hints). So you'd have something like:

// whether lower bound exists + the actual bound value
pair<bool,parameter_type> lower_bound

// same as lower bound
pair<bool,parameter_type> upper_bound

// true if parameter is a toggle: enabled when parameter
// value non-zero (example: toggle reverb surround-mode)
bool is_toggled

// true if parameter should be treated as integer (example:
// number of delays)
bool is_integer

// true, if logarithmic adjustments are more natural
// (example: amplify-gain in dB)
bool is_logarithmic

// parameter refers to 'value * sample_rate' (example:
// filter cutoff parameters)
bool is_sample_rate_multiplier

Using these hints, it should be possible to generate a pretty
usable user-inteface for any ecasound effect (including LADSPA plugins).
There's been much discussion about these on LAD recently, but I think the
above hints are still a pretty good compromise. I might also add a
string description to the hints, so you could add a longer explanation to
some complicated parameter.

> there could be a short verbal description of the effect..? (or some
> other general info)

description() is meant just for this. Someone just needs to write the
descriptions. :)

 . ... [ audio software for linux ] /\ . 
 . [ my armchair-tunes mp3/ra/wav ]

-- To unsubscribe send message 'unsubscribe' in the body of the message to <>.

New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Nov 26 2000 - 21:41:04 EET