[Clam-devel] PATCH: new ControlTrace{Reader,Writer} classes

David García Garzón dgarcia at iua.upf.edu
Mon Apr 16 05:05:16 PDT 2007


Zach, finally we took a look at this patch.

As discussed on the irc, those changes will need a refactor in order to remove 
the ConfigurableFile. So we propose you the following changes to the patch 
before committing it:

* Remove dependencies on ConfigurableFile
* Write new Filename subclasses and use them for configuration
* Move the XML Restore and Dump, now at  ControlTraceFiles to the 
ControlTraceReader::ConcreteStart and ControlTraceWriter::ConcreteStop.
* Drop ControlTraceFileTarget/Source classes

So how do we proceed? Tell us if you're gonna send a new patch (we prefer so) 
or we shall do it ourselves.

David and Pau.


On Friday 13 April 2007 01:19:26 Zach Welch wrote:
> Hi all,
>
> As part of my present work with neural networks in CLAM, I realized that
> I needed a means of recording and playing back control signals. I spent
> a few hours implementing a pair of new classes: ControlTraceReader and
> ControlTraceWriter.  These new processing components provide the ability
> to replay or store a series of control values from or to an XML file,
> respectively.
>
> For a concrete example, one could store the output generated by a
> Fundamental2Control processing over the duration of an audio file, using
> the resulting file for analysis.  This specific example derives from IRC
> logs between David and a user working with CLAM to analyze bird songs,
> but there should be other present uses for these processing components.
>
> The current implementation is fairly trivial.  It will hog a lot of
> memory if run with many inputs or for very long; however, it should work
> fine until it runs out of memory.  I can think of a couple of fairly
> easy optimizations in this area, but they should be implementable as
> extensions to the existing configuration and file format.  Even with
> these limits, this implementation should be useful for various purposes.
>
> This patch includes a new test file that exercises the configuration
> portions of the new processing units.  I will revisit the Do portions of
> the tests as part of my work on testing my neural networks; meanwhile,
> the functionality can be exercised completely in the NetworkEditor:
>
> 1) Add a ControlTraceWriter with 2-inputs, and connect it to a new
>    ControlSurface.  After configuring, start, drag the surface handle
>    for a bit, and stop; when stopped, you will have a newly saved trace
>    in the file specified during configuration.  If repeated without
>    reconfiguring, this process will overwrite the existing file.
>
> 2) Create a new network with a ControlTraceReader and a ControlPrinter.
>    Upon configuring the Reader with the file saved in step #1, two
>    outputs should appear; connect them, start, and watch your actions
>    be replayed in the Printer.
>
> The attached patch requires the "common-file-refactoring-v3.patch" that
> was sent in my last message.  This patch demonstrates the new re-use at
> the Qt4Configurator level; without that patch, these same results would
> have required duplicating code in several places.
>
> Cheers,
>
> Zach






More information about the clam-devel mailing list