[Clam-devel] very basic processings examples / no time-domain audio gain in NE?

David García Garzón dgarcia at iua.upf.edu
Mon Nov 19 03:11:30 PST 2007


On Diumenge 18 Novembre 2007, Hernán Ordiales wrote:
> hi all,
>
> next week i'll have a meeting with some "BuenaSeñal" list[1] folks,
> and many (at least 4) of them already told me that they'd want to
> learn some basics about CLAM/NetworkEditor processings programming...
>
> so, i prepared a couple of very basic processing to show them as
> example (beyond my recent gsoc work):
>
> first i've made a very simple example that does... nothing at all :-D
> but i saved it to my own, to use it as "template" or a good start
> point for new processings (plugins or not)
>
> i know that already exists this guide:
> http://clam.iua.upf.edu/wikis/clam/index.php/Creating_a_minimal_processing_
>object but maybe is also useful to add it in some place as basic
> reference...

When creating the tutorial pages of the wiki we intended to split the former 
simple but full example (ports+controls+config) into aspects just because the 
tendency of users is to copy and paste examples that leads into having 
complex processings even when it was not needed. CLAM is full of empty 
configuration objects, meaningless controls just in case and code with empty 
implementation of deprecated optional virtual functions such SetPrototypes 
and the like just because the first examples defined every single redefinable 
function. Anyway, maybe we moved too far. It could be worth to add such 
complete example with ports and controls. If you feel so, just add it to the 
wiki. I would rather like to have exemplifiable code on CLAM: too much of the 
code doesn't follow current guidelines of coding processing but old ones ;-)

Something i would like to do is adding to the wiki a 'Further reading' section 
to connect, for example, the the basic example to the one of the controls and 
the one of the configurations. I just added one to the simple processing one.


> if you want, you can suggest changes here, making something like a
> diff (only make changes and post):
> BaseProcessing.hxx: http://clam.pastebin.com/f6dad9724
> BaseProcessing.cxx: http://clam.pastebin.com/f13032ff1
> (commented code is to easily convert it in a processing with a
> configuration)

We consider having commented out code a bad practice. If any example a new 
user does starts with commented out code that's bad.

Also, the commented out code refers to the NullProcessingConfig. I would not 
even mention it. If you need NullProcessingConfig you don't need any Config.

> As a next basic example i thought in an audio linear amplifier... was
> weird to me but i could not find a basic time-domain audio gain in
> networkeditor's processings (exists?), so i made one by my own...
>
> AudioGain.hxx: http://clam.pastebin.com/f78113b36
> AudioGain.cxx: http://clam.pastebin.com/f1643ef69
>
> should i commit this one? or there is an special reason to not have a
> time-domain amplifier?

An AudioAmplifier It would be a nice addition. Some months ago I wondered the 
same question, until i realized you can use the AudioMixer with a single 
channel whenever we want to amplify something, but i it would be good to add 
an specific processing, just to be findable. Usability and not processing 
types economy should be the rule.

We could also say that there are a lot of ladspa plugins for that, but you are 
right, looking for an amplifier example is a typical way to start learning a 
processing framework. Adding such processing without the fuzz of old 
processings as example to look at is a nice thing ;-)


-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20071119/64902d9a/attachment-0003.pgp>


More information about the clam-devel mailing list