[Clam-devel] Frontend for automatic generation of plugin code

Hernán Ordiales h at ordia.com.ar
Wed Aug 6 23:37:13 PDT 2008


On Mon, Aug 4, 2008 at 5:23 AM, David García Garzón <dgarcia at iua.upf.edu> wrote:
> Cool work, Hernan! You have a nice ability of turn crazy suggestions into
> reality. :-)

:-D

> Some other suggestions to enhance the interface: ;-)
>> - Using the CLAM::ProcessingDataPlugin to get the available port types
>> (pity that they don't include the needed header)
>
> I just added a types() static method to ProcessingDataPlugin that gets the
> list of registered types. Anyway i just noticed that this would require the
> python bindings because the script is in python, so, let's wait for that.

I added ProcessingDataPlugin class to the bindings, not sure why but
this is what i'm getting:

import clam
types_list = [item for item in clam.ProcessingDataPlugin.types()] #
workaround: to get a 'python list'

for item in types_list:
	print item

N4CLAM11FundamentalE
N4CLAM11MelCepstrumE
N4CLAM11MelSpectrumE
N4CLAM17SpectralPeakArrayE
N4CLAM5AudioE
N4CLAM7LPModelE
N4CLAM8SpectrumE
St6vectorISt4pairIffESaIS1_EE
St6vectorIfSaIfEE
f


> - Provide 'Add' buttons instead so many port and control lines

Yes, that was my original idea too, but thanks to python and its
getattr feature that was the easiest/fastest way i figured... anyway,
now implemented better using +/- buttons and a qtable

> - AutoDefault to 'Generate' button (or better use a QButtonBox)

done (AutoDefault)

> - Use keepAspectRatio on the clam logo

done

Bonus:
* shortcuts + tooltip added

> David.
>
>
> El Sunday 03 August 2008 20:49:05 Hernán Ordiales va escriure:
>> On Sat, Aug 2, 2008 at 7:42 PM, Pau Arumí <parumi at iua.upf.edu> wrote:
>> > On ds, 2008-08-02xxxxxxxxxxxxx at 23:56 +0200, Xavier Amatriain wrote:
>> >> Really cool ++ :-) This has been a long time in the todo list!
>> >>
>> >> What else would it take to generate a full working processing class this
>> >> way? Add a text box for the Do() C++ code? The #includes? Anything else?
>>
>> Just the code inside the Do(), new Do's with parameters and extra
>> includes of whatever is used inside those methods (but i think a set
>> of standard and CLAM classes could be detected from the code and
>> automatically included). Includes from base class, ports and controls
>> are already automatically included by the scripts.
>>
>> > Pau Arumí <parumi at iua.upf.edu> wrote:
>> > And then you get the compiler error message and what you do? Hummm...
>> >
>> > Code editing (beyond tedious template code) should be done in
>> > editors/IDEs instead of forms, IMO.
>>
>> I agree, I think the dangerous point is, seeming easy, a new user
>> could get frustrated because compiler error messages. My original idea
>> was about skipping all the boring repeated code of every processing
>> and let the user/programmer concentrate in the Do() method earlier.
>>
>> > *But* it leaves to an interesting point. Why not integrate this
>> > processing generation in NE?
>> > You specify the metadata, click "create processing" and plop, it appears
>> > in the canvas. Then, as in faust we could launch an editor on user
>> > request (clicking on the box), and even recompile, re-using the console
>> > panel we have for faust.
>>
>> I think a first milestone that is useful for both approaches is to
>> allow the option of reloading clam's plugins in the same way now is
>> present for faust ones.
>>
>> > P
>> >
>> >> Hernán Ordiales wrote:
>> >> > On Sat, Aug 2, 2008 at 4:32 PM, Pau Arumí <parumi at iua.upf.edu> wrote:
>> >> >> On ds, 2008-08-02 at 14:58 -0300, Hernán Ordiales wrote:
>> >> >>> Written in pyqt:
>> >> >>> CLAM/scripts/TemplatedPluginsGenerator/PluginCodeGeneratorGUI.py
>> >> >>>
>> >> >>> Screenshot:
>> >> >>> http://iua-share.upf.edu/wikis/clam/index.php/Image:PluginCodeGenera
>> >> >>>tor.png
>> >> >>
>> >> >> very neat addition! :-)
>> >> >>
>> >> >> maybe we should call this "processing code generator" or similar.
>> >> >> else it collides with the other kind of "plugins" we now also
>> >> >> generate (LADSPA, VST in the future...). what do you think?
>> >> >
>> >> > I agree. I'll rename it
>> >>
>> >> _______________________________________________
>> >> Clam-devel mailing list
>> >> Clam-devel at llistes.projectes.lafarga.org
>> >> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-deve
>> >>l
>> >
>> > _______________________________________________
>> > Clam-devel mailing list
>> > Clam-devel at llistes.projectes.lafarga.org
>> > https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>
>
>



-- 
Hernán
http://h.ordia.com.ar
GnuPG: 0xEE8A3FE9




More information about the clam-devel mailing list