[Clam-devel] connecting ports

Pau Arumi parumi at iua.upf.edu
Tue Jun 5 11:25:27 PDT 2007


En/na Greg Kellum ha escrit:
> Hi all,
> 
> I've been working on a composite processing where I've connected an 
> audio file reader to the SMSAnalysisCore processing class.  To test 
> this, I've written a simple C function that connects the output of this 
> composite processing to an SMSSynthesis class so that the audio file is 
> being analyzed by the new composite processing and then resynthesized by 
> SMSSynthesis.

but this analysis -> synthesis streaming should be done in the 
network not in a composite.

in the testAnalysisSynthesisInaNetwork here:
http://iua-share.upf.edu/svn/clam/trunk/CLAM/test/FunctionalTests/ProcessingTests/TestStreamingSMSAnalysisSynthesis.cxx
there is a very close example.

> But unfortunately, I've been having some difficulties figuring out how 
> to connect these processings together.  After I retrieved and connected 
> the matching input and output ports on SMSAnalysisCore and SMSSynthesis, 
> the program crashed with a bus error.  So, now I have some questions 
> about working with ports. 

as xavier said, debugging traces and code to reproduce it, would be
useful.

> There seem to be a couple of classes that have publish port methods: 
> OutPortPublisher and OutPortRegistry.  What is the difference between 
> these classes?  And which class should actually be used to publish the 
> ports?  And is there a way to find out which class a port template was 
> instantiated with?

port-registry is a ports container class used in the processing
base class. it allow apps like networkeditor to navigate through
the processings ports and so on.

port-publishers are used to publish an inner port in a composite.
so it's only meant for composite writers.

however i don't think either of them will be usefull for the
synthesizer because your sms-stream-source needs to stream out
previously (at configure time, from file...) analysed frames.

cheers,
pau




More information about the clam-devel mailing list