[CLAM] Writing Control Data to a File in Network Editor
David García Garzón
dgarcia at iua.upf.edu
Mon Jul 28 03:27:42 PDT 2008
El Monday 28 July 2008 11:55:11 Uğur Güney va escriure:
> > Suggested readings:
> > http://iua-share.upf.edu/wikis/clam/index.php/Building_a_processing_libra
> >ry
> > http://iua-share.upf.edu/wikis/clam/index.php/Creating_a_minimal_processi
> >ng_object
> > http://iua-share.upf.edu/wikis/clam/index.php/Processings_with_controls
> > http://iua-share.upf.edu/wikis/clam/index.php/Processings_with_configurat
> >ion
>
> # Hi,
> # I understand that I have to create processing libraries which
> includes my own processing objects. If I successfully compile and
> install that library (using that scons script) they appear in the
> object list of the Network Editor. Am I right? Then is it possible
> that turning a .network patch to an standalone executable?
For offline analysis the OfflinePlayer application takes as parameters a
network and any input and output wav files as sinks and sources the network
takes. For realtime applications, Prototyper is the equivalent which takes
the audio from audio device I/O instead and you can provide an optional user
interface built with Qt Designer.
If you really want a real stand alone application (no network file required)
we are very close to get single click binary generation by embedding the
network into the binary as data. It is already doable by hand, but this would
require further instructions.
> # I created three files in a directory. SConstruct, MyProcessing.hxx
> and MyProcessing.cxx in a directory. Copied the lines from the wiki
> page. And run the script. But get the errors below.
> # I think I have to declare my own DataTypes. But is there a working
> example which uses a native DataType, like Audio or Spectrum?
Yes you are right. The example uses dummy datatypes. In your case you should
just get a CLAM::Fundamental input port which requires #include
<CLAM/Fundamental.hxx>. You can remove the output port and the code that uses
it.
If you use directly the fundamental, you can just forget about controls (and
the related wiki too).
In the Do method:
TData fundamentalFreq = _inPort.GetData().GetFreq(0);
Then, write fundamentalFreq wherever you want.
More information about the clam-users
mailing list