CLAM::Processing Class Reference

The base class for all the CLAM processing object classes. More...

#include <Processing.hxx>

List of all members.

Public Types

enum  ExecState { Unconfigured = 0, Ready, Running }
 Processing Object possible execution states. More...
typedef NullProcessingConfig Config

Public Member Functions

bool Configure (const ProcessingConfig &config)
 Configuration change method.
void Start (void)
 Method to turn the object into running state.
virtual bool Do (void)=0
 Supervised mode execution method (using ports).
void Stop (void)
 Method to put the object out of running state When in execution mode, this method must be called before any further call to Configure() methods.
 Processing ()
virtual ~Processing ()
virtual const char * GetClassName () const =0
 Override it in every subclass and retur the name of that class.
virtual bool CanProcessInplace ()
 Override this method if your processing cannot process inplace.
bool CanConsumeAndProduce ()
 Check that Supervised Do() can be safely called.
virtual const ProcessingConfigGetConfig () const
 Configuration getter.
std::string GetExecStateString () const
bool IsConfigured () const
bool IsRunning () const
void RegisterOutPort (OutPortBase *out)
void RegisterInPort (InPortBase *in)
void RegisterOutControl (OutControl *out)
void RegisterInControl (InControl *in)
void RegisterTypedOutControl (BaseTypedOutControl *out)
void RegisterTypedInControl (BaseTypedInControl *in)
void SetParent (Processing *p)
void SetNetworkBackLink (Network *network)
virtual bool ModifiesPortsAndControlsAtConfiguration ()
 This method is used to determine if a given processing can change its interface of ports/controls after its construction (i.e.
bool HasInPort (const std::string &name)
bool HasOutPort (const std::string &name)
bool HasInControl (const std::string &name)
bool HasOutControl (const std::string &name)
bool HasTypedInControl (const std::string &name)
bool HasTypedOutControl (const std::string &name)
InPortBaseGetInPort (const std::string &name)
OutPortBaseGetOutPort (const std::string &name)
InControlGetInControl (const std::string &name)
OutControlGetOutControl (const std::string &name)
InControlRegistryGetInControls ()
 Accessor to published Controls manager.
OutControlRegistryGetOutControls ()
 Accessor to published Controls manager.
TypedInControlRegistryGetTypedInControls ()
 Accessor to published Typed Controls manager.
TypedOutControlRegistryGetTypedOutControls ()
 Accessor to published Typed Controls manager.
InPortRegistryGetInPorts ()
 Accessor to published Ports manager.
OutPortRegistryGetOutPorts ()
 Accessor to published Portss manager.
const std::string & GetConfigErrorMessage () const
 Returns a string describing configuration errors if any.
virtual bool IsSyncSource () const
 Wether the processing is a sync source such as audio i/o device, or an audio callback hook (i.e.

Protected Member Functions

virtual bool ConcreteConfigure (const ProcessingConfig &)
 Configuration method interface.
virtual bool ConcreteStart ()
 Processing objects have to redefine this method when starting them implies some internal changes.
virtual bool ConcreteStop ()
 Processing objects have to redefine this method when stoping them implies some internal changes.
unsigned BackendBufferSize ()
 Given by the NetworkPlayer (backend) if exists.
unsigned BackendSampleRate ()
 Given by the NetworkPlayer (backend) if exists.
void AddConfigErrorMessage (const std::string &msg)
 Method to prepend a message to _configErrorMessage CLAM_ASSERT.
bool AbleToExecute (void) const
 In debug-mode checks that the processing is configured and started.
template<typename ConcreteConfig >
void CopyAsConcreteConfig (ConcreteConfig &concrete, const ProcessingConfig &abstract) const
 Helper template to convert a reference to a ProcessingConfig to the concrete ProcessingConfig specified on the first parameter.
void SetExecState (ExecState state)

Protected Attributes

ProcessingCompositempParent
 Pointer to the parent (composite) processing object, or 0.
Network_network
 The parent network if any.


Detailed Description

The base class for all the CLAM processing object classes.

Processing is the base class for all the CLAM processing object classes. It defines their shared interface and contains common infrastructure. Processings are the building blocks for any CLAM system, they are an abstraction of an audio/music processing step.

Whenever the Do method is called, the processing consumes data tokens from its input ports and produces data tokens for its output ports performing a single processing step. Each port is related to a given C++ data type and the number of tokens that are seen/consumed/produced at every Do step is flexible, even at running mode.

A processing can also receive an event from another one in an asyncronous way in order to change the way the processing is done. Asyncronous comunication is done using the Control abstraction.

See also:
InPortBase, OutPortBase, InControl, OutControl
An initial setup is needed before using any processing. You can specify this initial setup by providing the procesing with a configuration object (an instance of the proper ProcessingConfig subclass) containing all the parameters.

See also:
ProcessingConfig
inline_dotgraph_2.dot

Definition at line 181 of file Processing.hxx.


Member Typedef Documentation


Member Enumeration Documentation

Processing Object possible execution states.

Enumerator:
Unconfigured 
Ready 
Running 

Definition at line 184 of file Processing.hxx.


Constructor & Destructor Documentation

CLAM::Processing::Processing (  ) 

Definition at line 158 of file Processing.cxx.

CLAM::Processing::~Processing (  )  [virtual]

Definition at line 194 of file Processing.cxx.

References mpParent, and CLAM::ProcessingComposite::Remove().


Member Function Documentation

bool CLAM::Processing::AbleToExecute ( void   )  const [inline, protected]

void CLAM::Processing::AddConfigErrorMessage ( const std::string &  msg  )  [protected]

unsigned CLAM::Processing::BackendBufferSize (  )  [protected]

Given by the NetworkPlayer (backend) if exists.

Definition at line 226 of file Processing.cxx.

References _network, and CLAM::FlattenedNetwork::BackendBufferSize().

unsigned CLAM::Processing::BackendSampleRate (  )  [protected]

Given by the NetworkPlayer (backend) if exists.

Definition at line 230 of file Processing.cxx.

References _network, and CLAM::FlattenedNetwork::BackendBufferSize().

bool CLAM::Processing::CanConsumeAndProduce (  ) 

virtual bool CLAM::Processing::CanProcessInplace (  )  [inline, virtual]

Override this method if your processing cannot process inplace.

Reimplemented in CLAM::SegmentSMSTimeStretch.

Definition at line 240 of file Processing.hxx.

virtual bool CLAM::Processing::ConcreteConfigure ( const ProcessingConfig  )  [inline, protected, virtual]

Configuration method interface.

The Processing base class forces all the concrete classes derived from it to implement this method, which must actually perform the specific configuration tasks.

Note that the user can not call this method directly. He will use Configure instead. The argument is expected to be an object of the necesary concrete configuration class.

Parameters:
Reference to the configuration object.
Returns:
false if the object is not yet fully configured. (For example, if some important configuration attribute such as number of ports was set to zero in the config object)
true if the processing object is left in a consistent state, and can be executed.
Exceptions:
This method must throw a bad_cast exception if the argument is not an object of the expected configuration class.

Reimplemented in CLAM::BinaryControlOp< BinOp >, CLAM::PrintControl, CLAM::CepstralTransform, CLAM::CircularShift, CLAM::DescriptorComputation, CLAM::FFT_base, CLAM::FFT_fftw3, CLAM::LPC_AutoCorrelation, CLAM::MelFilterBank, CLAM::SpectralPeakDetect, CLAM::TonalAnalysis, CLAM::ZeroPadder, CLAM::AudioAmplifier, CLAM::AudioMixer, CLAM::AudioFileMemoryLoader, CLAM::MonoAudioFileReader, CLAM::MonoAudioFileWriter, CLAM::MultiChannelAudioFileReader, CLAM::MultiChannelAudioFileWriter, CLAM::AudioIn, CLAM::AudioOut, CLAM::ProcessingComposite, CLAM::TopLevelProcessing, CLAM::AutoPanner, CLAM::Control2Data, CLAM::Controller, CLAM::ControlMapper, CLAM::ControlPrinter, CLAM::ControlScaler, CLAM::ControlSink, CLAM::ControlSource, CLAM::ControlTraceReader, CLAM::ControlTraceWriter, CLAM::FlagControl, CLAM::Fundamental2Control, CLAM::OutControlSender, CLAM::ADSR, CLAM::Dispatcher, CLAM::Oscillator, CLAM::SimpleOscillator, CLAM::Fund2MIDI, CLAM::MIDI2Melody, CLAM::MIDIClocker, CLAM::MIDIDispatcher, CLAM::MIDIFileReader, CLAM::MIDIFileWriter, CLAM::MIDIIn, CLAM::MIDIInControl, CLAM::MIDIKeyboard, CLAM::MIDIOut, CLAM::MIDIOutControl, CLAM::LadspaWrapper, CLAM::IFFT_base, CLAM::PhaseManagement, CLAM::SynthSineSpectrum, CLAM::EnvelopeGenerator, CLAM::SegmentSMSHarmonizer, CLAM::SegmentSMSMorph, CLAM::SegmentSMSTimeStretch, CLAM::SegmentTransformation, CLAM::SMSGenderChange, CLAM::SMSHarmonizer, CLAM::SMSMorph, CLAM::SMSPitchShift, CLAM::SMSResidualGain, CLAM::SMSSineFilter, CLAM::SMSSinusoidalGain, CLAM::SMSTimeStretch, CLAM::SMSTransformationChain, CLAM::ThreeBandFilter, CLAM::OscillatingSpectralNotch, CLAM::Robotization, CLAM::SpectralDelay, CLAM::TokenDelay< T >, CLAM::TokenDelay< SpectralPeakArray >, and CLAM::TokenDelay< Spectrum >.

Definition at line 262 of file Processing.hxx.

Referenced by Configure().

virtual bool CLAM::Processing::ConcreteStart ( void   )  [inline, protected, virtual]

virtual bool CLAM::Processing::ConcreteStop (  )  [inline, protected, virtual]

bool CLAM::Processing::Configure ( const ProcessingConfig config  ) 

Configuration change method.

This is the method to be used in order to update the configuration of a processing object. Note that the object must NOT be running when calling this method. This method performs some execution state checkings and updates, and calls the ConcreteConfigure method of the concrete class to perform the actual configuration.

Parameters:
config Reference to the configuration object.
Exceptions:
ErrProcessingObj if the processing object is in running or disabled state, or if the argument is not an object of the configuration class matching the concrete processing class of the processing object.

TODO we should use here an ErrConfiguring class. PA

Definition at line 165 of file Processing.cxx.

References CLAM_ASSERT, ConcreteConfigure(), IsRunning(), Ready, Unconfigured, and CLAM::Err::what().

Referenced by CLAM::FlattenedNetwork::AddProcessing(), CLAM::ADSR::ADSR(), CLAM::AudioAmplifier::AudioAmplifier(), CLAM::AudioFileMemoryLoader::AudioFileMemoryLoader(), CLAM::AudioIn::AudioIn(), CLAM::AudioMixer::AudioMixer(), CLAM::AudioOut::AudioOut(), CLAM::AudioWindowing::AudioWindowing(), CLAM::AutoPanner::AutoPanner(), CLAM::BinaryAudioOp< Multiply< TData > >::BinaryAudioOp(), CLAM::BinaryControlOp< BinOp >::BinaryControlOp(), CLAM::CepstralTransform::CepstralTransform(), CLAM::CircularShift::CircularShift(), CLAM::CleanTracks::CleanTracks(), CLAM::SynthSineSpectrum::ConcreteConfigure(), CLAM::SMSHarmonizer::ConcreteConfigure(), CLAM::SegmentSMSTimeStretch::ConcreteConfigure(), CLAM::SegmentSMSMorph::ConcreteConfigure(), CLAM::SegmentSMSHarmonizer::ConcreteConfigure(), CLAM::MIDIKeyboard::ConcreteConfigure(), CLAM::Control2Data::Control2Data(), CLAM::Controller::Controller(), CLAM::ControlMapper::ControlMapper(), CLAM::ControlPrinter::ControlPrinter(), CLAM::ControlScaler::ControlScaler(), CLAM::ControlTraceReader::ControlTraceReader(), CLAM::ControlTraceWriter::ControlTraceWriter(), CLAM::Deesser::Deesser(), CLAM::DescriptorComputation::DescriptorComputation(), CLAM::Dispatcher::Dispatcher(), CLAM::EnvelopeExtractor::EnvelopeExtractor(), CLAM::EnvelopeGenerator::EnvelopeGenerator(), CLAM::EnvelopeModulator::EnvelopeModulator(), CLAM::ERB_SpaceGen::ERB_SpaceGen(), CLAM::FDCombFilter::FDCombFilter(), CLAM::FDFilterGen::FDFilterGen(), CLAM::FFT_fftw3::FFT_fftw3(), CLAM::FFT_numrec::FFT_numrec(), CLAM::FFT_ooura::FFT_ooura(), CLAM::FlagControl::FlagControl(), CLAM::FrameAdder::FrameAdder(), CLAM::FrameInterpolator::FrameInterpolator(), CLAM::FreqShift::FreqShift(), CLAM::Fund2MIDI::Fund2MIDI(), CLAM::Fundamental2Control::Fundamental2Control(), CLAM::FundFreqDetect::FundFreqDetect(), CLAM::HumRemover::HumRemover(), CLAM::IFFT_fftw3::IFFT_fftw3(), CLAM::IFFT_ooura::IFFT_ooura(), CLAM::ProcessingDefinitionAdapter::LoadFrom(), CLAM::FlattenedNetwork::LoadFrom(), CLAM::SegmentSMSMorph::LoadSDIF(), CLAM::LPC_AutoCorrelation::LPC_AutoCorrelation(), CLAM::MelFilterBank::MelFilterBank(), CLAM::MIDIClocker::MIDIClocker(), CLAM::MIDIDispatcher::MIDIDispatcher(), CLAM::MIDIFileReader::MIDIFileReader(), CLAM::MIDIFileWriter::MIDIFileWriter(), CLAM::MIDIIn::MIDIIn(), CLAM::MIDIInControl::MIDIInControl(), CLAM::MIDIKeyboard::MIDIKeyboard(), CLAM::MIDIOut::MIDIOut(), CLAM::MIDIOutControl::MIDIOutControl(), CLAM::MonoAudioFileReader::MonoAudioFileReader(), CLAM::MonoAudioFileWriter::MonoAudioFileWriter(), CLAM::MultiChannelAudioFileReader::MultiChannelAudioFileReader(), CLAM::MultiChannelAudioFileWriter::MultiChannelAudioFileWriter(), CLAM::Normalization::Normalization(), CLAM::NoSpectralTransformation::NoSpectralTransformation(), CLAM::OscillatingSpectralNotch::OscillatingSpectralNotch(), CLAM::Oscillator::Oscillator(), CLAM::OutControlSender::OutControlSender(), CLAM::OverlapAdd::OverlapAdd(), CLAM::Partializer::Partializer(), CLAM::Peakalizer::Peakalizer(), CLAM::PhaseManagement::PhaseManagement(), CLAM::PortMonitor< TheDataType, ThePortType >::PortMonitor(), CLAM::PrintControl::PrintControl(), CLAM::RandomPhase::RandomPhase(), CLAM::FlattenedNetwork::ReconfigureAllProcessings(), CLAM::Robotization::Robotization(), CLAM::SampleAndHold::SampleAndHold(), CLAM::SDIFIn::SDIFIn(), CLAM::SDIFInStreaming::SDIFInStreaming(), CLAM::SDIFOut::SDIFOut(), CLAM::Segmentator::Segmentator(), CLAM::SegmentSMSHarmonizer::SegmentSMSHarmonizer(), CLAM::SegmentSMSMorph::SegmentSMSMorph(), CLAM::SegmentSMSTimeStretch::SegmentSMSTimeStretch(), CLAM::SegmentTransformation::SegmentTransformation(), CLAM::SimpleOscillator::SimpleOscillator(), CLAM::SinTracking::SinTracking(), CLAM::SinusoidalSynthesis::SinusoidalSynthesis(), CLAM::SMSAnalysis::SMSAnalysis(), CLAM::SMSAnalysisCore::SMSAnalysisCore(), CLAM::SMSDeesser::SMSDeesser(), CLAM::SMSFreqShift::SMSFreqShift(), CLAM::SMSGenderChange::SMSGenderChange(), CLAM::SMSHarmonizer::SMSHarmonizer(), CLAM::SMSMorph::SMSMorph(), CLAM::SMSOddEvenHarmonicRatio::SMSOddEvenHarmonicRatio(), CLAM::SMSPitchDiscretization::SMSPitchDiscretization(), CLAM::SMSPitchShift::SMSPitchShift(), CLAM::SMSResidualGain::SMSResidualGain(), CLAM::SMSSineFilter::SMSSineFilter(), CLAM::SMSSinusoidalGain::SMSSinusoidalGain(), CLAM::SMSSpectralShapeShift::SMSSpectralShapeShift(), CLAM::SMSSynthesis::SMSSynthesis(), CLAM::SMSTimeStretch::SMSTimeStretch(), CLAM::SpectralAmplitudeModulation::SpectralAmplitudeModulation(), CLAM::SpectralAnalysis::SpectralAnalysis(), CLAM::SpectralAverage::SpectralAverage(), CLAM::SpectralCombDelta::SpectralCombDelta(), CLAM::SpectralCombTriang::SpectralCombTriang(), CLAM::SpectralDelay::SpectralDelay(), CLAM::SpectralEnvelopeApply::SpectralEnvelopeApply(), CLAM::SpectralEnvelopeExtract::SpectralEnvelopeExtract(), CLAM::SpectralExciter::SpectralExciter(), CLAM::SpectralFocus::SpectralFocus(), CLAM::SpectralGate::SpectralGate(), CLAM::SpectralLimiter::SpectralLimiter(), CLAM::SpectralNotch::SpectralNotch(), CLAM::SpectralPeakArrayAdder::SpectralPeakArrayAdder(), CLAM::SpectralPeakArrayInterpolator::SpectralPeakArrayInterpolator(), CLAM::SpectralPeakDetect::SpectralPeakDetect(), CLAM::SpectralPhaseModulation::SpectralPhaseModulation(), CLAM::SpectralReject::SpectralReject(), CLAM::SpectralReverse::SpectralReverse(), CLAM::SpectralRingModulation::SpectralRingModulation(), CLAM::SpectralShapeShift::SpectralShapeShift(), CLAM::SpectralSpread::SpectralSpread(), CLAM::SpectralSynthesis::SpectralSynthesis(), CLAM::SpectrumAdder::SpectrumAdder(), CLAM::SpectrumAdder2::SpectrumAdder2(), CLAM::SpectrumInterpolator::SpectrumInterpolator(), CLAM::SpectrumProduct::SpectrumProduct(), CLAM::SpectrumSubstracter2::SpectrumSubstracter2(), CLAM::SynthSineSpectrum::SynthSineSpectrum(), CLAM::ThreeBandAM::ThreeBandAM(), CLAM::ThreeBandCompressor::ThreeBandCompressor(), CLAM::ThreeBandFilter::ThreeBandFilter(), CLAM::ThreeBandGate::ThreeBandGate(), CLAM::TokenDelay< Spectrum >::TokenDelay(), CLAM::TonalAnalysis::TonalAnalysis(), CLAM::Vocoder::Vocoder(), CLAM::WaveGenerator::WaveGenerator(), and CLAM::WindowGenerator::WindowGenerator().

template<typename ConcreteConfig >
void CLAM::Processing::CopyAsConcreteConfig ( ConcreteConfig &  concrete,
const ProcessingConfig abstract 
) const [inline, protected]

Helper template to convert a reference to a ProcessingConfig to the concrete ProcessingConfig specified on the first parameter.

Parameters:
concrete The copy destination (it forces the runtime type for abstract)
abstract A reference to the configuration to be copied
Precondition:
The object runtime type must be exactly the type required by the first parameter

Definition at line 470 of file Processing.hxx.

References CLAM_ASSERT.

Referenced by CLAM::ZeroPadder::ConcreteConfigure(), CLAM::TonalAnalysis::ConcreteConfigure(), CLAM::TokenDelay< T >::ConcreteConfigure(), CLAM::SynthSineSpectrum::ConcreteConfigure(), CLAM::SpectralPeakDetect::ConcreteConfigure(), CLAM::SMSTimeStretch::ConcreteConfigure(), CLAM::SMSSineFilter::ConcreteConfigure(), CLAM::SMSMorph::ConcreteConfigure(), CLAM::SMSHarmonizer::ConcreteConfigure(), CLAM::SimpleOscillator::ConcreteConfigure(), CLAM::SegmentTransformation::ConcreteConfigure(), CLAM::SegmentSMSTimeStretch::ConcreteConfigure(), CLAM::SegmentSMSMorph::ConcreteConfigure(), CLAM::SegmentSMSHarmonizer::ConcreteConfigure(), CLAM::PrintControl::ConcreteConfigure(), CLAM::PhaseManagement::ConcreteConfigure(), CLAM::OutControlSender::ConcreteConfigure(), CLAM::Oscillator::ConcreteConfigure(), CLAM::MultiChannelAudioFileWriter::ConcreteConfigure(), CLAM::MultiChannelAudioFileReader::ConcreteConfigure(), CLAM::MonoAudioFileWriter::ConcreteConfigure(), CLAM::MonoAudioFileReader::ConcreteConfigure(), CLAM::MIDIKeyboard::ConcreteConfigure(), CLAM::MIDIFileWriter::ConcreteConfigure(), CLAM::MIDIFileReader::ConcreteConfigure(), CLAM::MIDIDispatcher::ConcreteConfigure(), CLAM::MelFilterBank::ConcreteConfigure(), CLAM::LPC_AutoCorrelation::ConcreteConfigure(), CLAM::FlagControl::ConcreteConfigure(), CLAM::FFT_base::ConcreteConfigure(), CLAM::EnvelopeGenerator::ConcreteConfigure(), CLAM::Dispatcher::ConcreteConfigure(), CLAM::DescriptorComputation::ConcreteConfigure(), CLAM::ControlTraceReader::ConcreteConfigure(), CLAM::ControlTraceWriter::ConcreteConfigure(), CLAM::ControlSource::ConcreteConfigure(), CLAM::ControlSink::ConcreteConfigure(), CLAM::ControlScaler::ConcreteConfigure(), CLAM::ControlPrinter::ConcreteConfigure(), CLAM::ControlMapper::ConcreteConfigure(), CLAM::Controller::ConcreteConfigure(), CLAM::Control2Data::ConcreteConfigure(), CLAM::CircularShift::ConcreteConfigure(), CLAM::CepstralTransform::ConcreteConfigure(), CLAM::BinaryControlOp< BinOp >::ConcreteConfigure(), CLAM::AutoPanner::ConcreteConfigure(), CLAM::AudioMixer::ConcreteConfigure(), CLAM::AudioIn::ConcreteConfigure(), CLAM::AudioFileMemoryLoader::ConcreteConfigure(), CLAM::AudioAmplifier::ConcreteConfigure(), and CLAM::ADSR::ConcreteConfigure().

virtual bool CLAM::Processing::Do ( void   )  [pure virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implemented in CLAM::BinaryControlOp< BinOp >, CLAM::PrintControl, CLAM::AudioWindowing, CLAM::CepstralTransform, CLAM::CircularShift, CLAM::CleanTracks, CLAM::DescriptorComputation, CLAM::ERB_SpaceGen, CLAM::FFT_base, CLAM::FFT_fftw3, CLAM::FFT_numrec, CLAM::FFT_ooura, CLAM::FundFreqDetect, CLAM::LPC_AutoCorrelation, CLAM::MelFilterBank, CLAM::Segmentator, CLAM::SinTracking, CLAM::SMSAnalysis, CLAM::SMSAnalysisCore, CLAM::SpectralAnalysis, CLAM::SpectralEnvelopeExtract, CLAM::SpectralPeakDetect, CLAM::TonalAnalysis, CLAM::WindowGenerator, CLAM::ZeroPadder, CLAM::AudioAmplifier, CLAM::AudioMixer, CLAM::BinaryAudioOp< BinOp >, CLAM::FrameAdder, CLAM::FrameInterpolator, CLAM::SpectralPeakArrayAdder, CLAM::SpectralPeakArrayInterpolator, CLAM::SpectrumAdder, CLAM::SpectrumAdder2, CLAM::SpectrumInterpolator, CLAM::SpectrumProduct, CLAM::SpectrumSubstracter2, CLAM::AudioFileMemoryLoader, CLAM::MonoAudioFileReader, CLAM::MonoAudioFileWriter, CLAM::MultiChannelAudioFileReader, CLAM::MultiChannelAudioFileWriter, CLAM::AudioIn, CLAM::AudioOut, CLAM::AudioSink, CLAM::AudioSource, CLAM::ProcessingComposite, CLAM::TopLevelProcessing, CLAM::AutoPanner, CLAM::Control2Data, CLAM::Controller, CLAM::ControlMapper, CLAM::ControlPrinter, CLAM::ControlScaler, CLAM::ControlSink, CLAM::ControlSource, CLAM::ControlTraceReader, CLAM::ControlTraceWriter, CLAM::FlagControl, CLAM::Fundamental2Control, CLAM::OutControlSender, CLAM::ADSR, CLAM::Dispatcher, CLAM::Instrument, CLAM::Oscillator, CLAM::SimpleOscillator, CLAM::WaveGenerator, CLAM::Fund2MIDI, CLAM::MIDIClocker, CLAM::MIDIDispatcher, CLAM::MIDIFileReader, CLAM::MIDIFileWriter, CLAM::MIDIIn, CLAM::MIDIKeyboard, CLAM::MIDIOut, CLAM::PortMonitor< TheDataType, ThePortType >, CLAM::LadspaWrapper, CLAM::SDIFIn, CLAM::SDIFInStreaming, CLAM::SDIFOut, CLAM::IFFT_base, CLAM::IFFT_fftw3, CLAM::IFFT_ooura, CLAM::OverlapAdd, CLAM::PhaseManagement, CLAM::SinusoidalSynthesis, CLAM::SMSSynthesis, CLAM::SpectralSynthesis, CLAM::SynthSineSpectrum, CLAM::EnvelopeExtractor, CLAM::EnvelopeGenerator, CLAM::EnvelopeModulator, CLAM::FDCombFilter, CLAM::FDFilterGen, CLAM::Normalization, CLAM::SegmentSMSHarmonizer, CLAM::SegmentSMSMorph, CLAM::SegmentSMSTimeStretch, CLAM::SegmentTransformation, CLAM::SMSDeesser, CLAM::SMSFreqShift, CLAM::SMSGenderChange, CLAM::SMSHarmonizer, CLAM::SMSMorph, CLAM::SMSOddEvenHarmonicRatio, CLAM::SMSPitchDiscretization, CLAM::SMSPitchShift, CLAM::SMSResidualGain, CLAM::SMSSineFilter, CLAM::SMSSinusoidalGain, CLAM::SMSSpectralShapeShift, CLAM::SMSTimeStretch, CLAM::SMSTransformationChain, CLAM::SMSTransformationChainIO, CLAM::ThreeBandCompressor, CLAM::ThreeBandFilter, CLAM::ThreeBandGate, CLAM::ThreeBandAM, CLAM::Deesser, CLAM::FreqShift, CLAM::HumRemover, CLAM::NoSpectralTransformation, CLAM::OscillatingSpectralNotch, CLAM::Partializer, CLAM::Peakalizer, CLAM::RandomPhase, CLAM::Robotization, CLAM::SampleAndHold, CLAM::SpectralAmplitudeModulation, CLAM::SpectralAverage, CLAM::SpectralCombDelta, CLAM::SpectralCombTriang, CLAM::SpectralDelay, CLAM::SpectralExciter, CLAM::SpectralFocus, CLAM::SpectralGate, CLAM::SpectralLimiter, CLAM::SpectralNotch, CLAM::SpectralPhaseModulation, CLAM::SpectralReject, CLAM::SpectralReverse, CLAM::SpectralRingModulation, CLAM::SpectralShapeShift, CLAM::SpectralSpread, CLAM::Vocoder, CLAM::SpectralEnvelopeApply, CLAM::TokenDelay< T >, CLAM::BinaryAudioOp< Multiply< TData > >, CLAM::PortMonitor< Spectrum >, CLAM::PortMonitor< Audio, AudioInPort >, CLAM::PortMonitor< Fundamental >, CLAM::PortMonitor< SpectralPeakArray >, CLAM::TokenDelay< SpectralPeakArray >, CLAM::TokenDelay< Spectrum >, CLAM::PortMonitor< TheDataType, ThePortType >, and CLAM::PortMonitor< TheDataType, ThePortType >.

Referenced by CLAM::PushFlowControl::Do(), and CLAM::NaiveFlowControl::Do().

virtual const char* CLAM::Processing::GetClassName (  )  const [pure virtual]

Override it in every subclass and retur the name of that class.

Implemented in CLAM::PrintControl, CLAM::AudioWindowing, CLAM::CepstralTransform, CLAM::CircularShift, CLAM::DescriptorComputation, CLAM::ERB_SpaceGen, CLAM::FFT_fftw3, CLAM::FFT_numrec, CLAM::FFT_ooura, CLAM::LPC_AutoCorrelation, CLAM::MelFilterBank, CLAM::Segmentator, CLAM::SMSAnalysis, CLAM::SMSAnalysisCore, CLAM::SpectralAnalysis, CLAM::SpectralPeakDetect, CLAM::TonalAnalysis, CLAM::ZeroPadder, CLAM::AudioMixer, CLAM::BinaryAudioOp< BinOp >, CLAM::AudioFileMemoryLoader, CLAM::MonoAudioFileReader, CLAM::MonoAudioFileWriter, CLAM::MultiChannelAudioFileReader, CLAM::MultiChannelAudioFileWriter, CLAM::AudioIn, CLAM::AudioOut, CLAM::AudioSink, CLAM::AudioSource, CLAM::ProcessingComposite, CLAM::TopLevelProcessing, CLAM::AutoPanner, CLAM::Control2Data, CLAM::Controller, CLAM::ControlMapper, CLAM::ControlPrinter, CLAM::ControlScaler, CLAM::ControlSink, CLAM::ControlSource, CLAM::ControlTraceReader, CLAM::ControlTraceWriter, CLAM::FlagControl, CLAM::Fundamental2Control, CLAM::OutControlSender, CLAM::ADSR, CLAM::Dispatcher, CLAM::Instrument, CLAM::Oscillator, CLAM::SimpleOscillator, CLAM::Fund2MIDI, CLAM::MIDIClocker, CLAM::MIDIDispatcher, CLAM::MIDIFileReader, CLAM::MIDIFileWriter, CLAM::MIDIIn, CLAM::MIDIInControl, CLAM::MIDIKeyboard, CLAM::MIDIOut, CLAM::MIDIOutControl, CLAM::PortMonitor< TheDataType, ThePortType >, CLAM::PeaksPortMonitor, CLAM::SinTracksPortMonitor, CLAM::SpectrumPortMonitor, CLAM::SpecgramPortMonitor, CLAM::FundamentalPortMonitor, CLAM::FundTrackPortMonitor, CLAM::AudioPortMonitor, CLAM::AudioBuffPortMonitor, CLAM::LadspaWrapper, CLAM::SDIFIn, CLAM::SDIFInStreaming, CLAM::SDIFOut, CLAM::IFFT_base, CLAM::IFFT_fftw3, CLAM::IFFT_ooura, CLAM::PhaseManagement, CLAM::SinusoidalSynthesis, CLAM::SMSSynthesis, CLAM::SpectralSynthesis, CLAM::SynthSineSpectrum, CLAM::EnvelopeExtractor, CLAM::EnvelopeGenerator, CLAM::EnvelopeModulator, CLAM::Normalization, CLAM::SegmentSMSMorph, CLAM::SegmentSMSTimeStretch, CLAM::SegmentTransformation, CLAM::SMSFreqShift, CLAM::ThreeBandCompressor, CLAM::ThreeBandFilter, CLAM::ThreeBandGate, CLAM::ThreeBandAM, CLAM::Deesser, CLAM::FreqShift, CLAM::HumRemover, CLAM::NoSpectralTransformation, CLAM::OscillatingSpectralNotch, CLAM::Partializer, CLAM::Peakalizer, CLAM::RandomPhase, CLAM::Robotization, CLAM::SampleAndHold, CLAM::SpectralAmplitudeModulation, CLAM::SpectralAverage, CLAM::SpectralCombDelta, CLAM::SpectralCombTriang, CLAM::SpectralDelay, CLAM::SpectralExciter, CLAM::SpectralGate, CLAM::SpectralLimiter, CLAM::SpectralNotch, CLAM::SpectralPhaseModulation, CLAM::SpectralReject, CLAM::SpectralReverse, CLAM::SpectralRingModulation, CLAM::Vocoder, CLAM::TokenDelay< T >, CLAM::BinaryAudioOp< Multiply< TData > >, CLAM::PortMonitor< Spectrum >, CLAM::PortMonitor< Audio, AudioInPort >, CLAM::PortMonitor< Fundamental >, CLAM::PortMonitor< SpectralPeakArray >, CLAM::TokenDelay< SpectralPeakArray >, CLAM::TokenDelay< Spectrum >, CLAM::BinaryControlOp< BinOp >, CLAM::BinaryAudioOp< BinOp >, and CLAM::BinaryAudioOp< BinOp >.

Referenced by AbleToExecute(), CanConsumeAndProduce(), CLAM::Hidden::ProcessingClass2LadspaBase::CreateDescriptor(), CLAM::PushFlowControl::Do(), CLAM::FlattenedNetwork::LoadFrom(), CLAM::NaiveFlowControl::ProcessingAddedToNetwork(), CLAM::NaiveFlowControl::ProcessingRemovedFromNetwork(), and CLAM::ProcessingDefinitionAdapter::StoreOn().

const ProcessingConfig & CLAM::Processing::GetConfig (  )  const [virtual]

Configuration getter.

Gets the configuration parameters used to create the object.

Returns:
Const reference to the configuration object. The usual way to perform a configuration change in the processing object is to take a copy of this reference, to change it and to send it with the Configure method. If not overriden, it returns a NullProcessingConfig.

Reimplemented in CLAM::BinaryControlOp< BinOp >, CLAM::PrintControl, CLAM::AudioWindowing, CLAM::CepstralTransform, CLAM::CircularShift, CLAM::CleanTracks, CLAM::DescriptorComputation, CLAM::ERB_SpaceGen, CLAM::FFT_base, CLAM::FundFreqDetect, CLAM::LPC_AutoCorrelation, CLAM::MelFilterBank, CLAM::Segmentator, CLAM::SinTracking, CLAM::SMSAnalysis, CLAM::SMSAnalysisCore, CLAM::SpectralAnalysis, CLAM::SpectralEnvelopeExtract, CLAM::SpectralPeakDetect, CLAM::TonalAnalysis, CLAM::WindowGenerator, CLAM::ZeroPadder, CLAM::AudioAmplifier, CLAM::AudioMixer, CLAM::BinaryAudioOp< BinOp >, CLAM::FrameAdder, CLAM::FrameInterpolator, CLAM::SpectralPeakArrayAdder, CLAM::SpectralPeakArrayInterpolator, CLAM::SpectrumAdder, CLAM::SpectrumAdder2, CLAM::SpectrumInterpolator, CLAM::SpectrumSubstracter2, CLAM::AudioFileMemoryLoader, CLAM::MonoAudioFileReader, CLAM::MonoAudioFileWriter, CLAM::MultiChannelAudioFileReader, CLAM::MultiChannelAudioFileWriter, CLAM::AudioIn, CLAM::AudioOut, CLAM::ProcessingComposite, CLAM::TopLevelProcessing, CLAM::AutoPanner, CLAM::Control2Data, CLAM::Controller, CLAM::ControlMapper, CLAM::ControlPrinter, CLAM::ControlScaler, CLAM::ControlSink, CLAM::ControlSource, CLAM::ControlTraceReader, CLAM::ControlTraceWriter, CLAM::FlagControl, CLAM::Fundamental2Control, CLAM::OutControlSender, CLAM::ADSR, CLAM::Dispatcher, CLAM::Oscillator, CLAM::SimpleOscillator, CLAM::WaveGenerator, CLAM::Fund2MIDI, CLAM::MIDIClocker, CLAM::MIDIDispatcher, CLAM::MIDIFileReader, CLAM::MIDIFileWriter, CLAM::MIDIIn, CLAM::MIDIKeyboard, CLAM::MIDIOut, CLAM::SDIFIn, CLAM::SDIFInStreaming, CLAM::SDIFOut, CLAM::IFFT_base, CLAM::OverlapAdd, CLAM::PhaseManagement, CLAM::SinusoidalSynthesis, CLAM::SMSSynthesis, CLAM::SpectralSynthesis, CLAM::SynthSineSpectrum, CLAM::EnvelopeExtractor, CLAM::EnvelopeGenerator, CLAM::EnvelopeModulator, CLAM::FDCombFilter, CLAM::FDFilterGen, CLAM::Normalization, CLAM::FrameTransformation, CLAM::SegmentSMSMorph, CLAM::SegmentTransformation, CLAM::SMSHarmonizer, CLAM::SMSMorph, CLAM::SMSSineFilter, CLAM::SMSTimeStretch, CLAM::SMSTransformationChain, CLAM::SpectralEnvelopeApply, CLAM::TokenDelay< T >, CLAM::BinaryAudioOp< Multiply< TData > >, CLAM::TokenDelay< SpectralPeakArray >, and CLAM::TokenDelay< Spectrum >.

Definition at line 299 of file Processing.cxx.

Referenced by CLAM::FlattenedNetwork::AddProcessing(), CLAM::ProcessingDefinitionAdapter::LoadFrom(), CLAM::FlattenedNetwork::LoadFrom(), CLAM::FlattenedNetwork::ReconfigureAllProcessings(), and CLAM::ProcessingDefinitionAdapter::StoreOn().

const std::string& CLAM::Processing::GetConfigErrorMessage (  )  const [inline]

Returns a string describing configuration errors if any.

Definition at line 395 of file Processing.hxx.

Referenced by CLAM::AudioFileMemoryLoader::ConcreteConfigure().

std::string CLAM::Processing::GetExecStateString (  )  const

Definition at line 304 of file Processing.cxx.

References CLAM_ASSERT, Ready, Running, and Unconfigured.

InControl& CLAM::Processing::GetInControl ( const std::string &  name  )  [inline]

Definition at line 367 of file Processing.hxx.

References CLAM::InControlRegistry::Get().

Referenced by CLAM::GetFloatFromInControl().

InControlRegistry& CLAM::Processing::GetInControls (  )  [inline]

InPortBase& CLAM::Processing::GetInPort ( const std::string &  name  )  [inline]

InPortRegistry& CLAM::Processing::GetInPorts (  )  [inline]

OutControl& CLAM::Processing::GetOutControl ( const std::string &  name  )  [inline]

Definition at line 371 of file Processing.hxx.

References CLAM::OutControlRegistry::Get().

OutControlRegistry& CLAM::Processing::GetOutControls (  )  [inline]

OutPortBase& CLAM::Processing::GetOutPort ( const std::string &  name  )  [inline]

OutPortRegistry& CLAM::Processing::GetOutPorts (  )  [inline]

TypedInControlRegistry& CLAM::Processing::GetTypedInControls (  )  [inline]

Accessor to published Typed Controls manager.

Definition at line 383 of file Processing.hxx.

Referenced by CLAM::ConnectTypedControls(), and CLAM::BaseTypedInControl::~BaseTypedInControl().

TypedOutControlRegistry& CLAM::Processing::GetTypedOutControls (  )  [inline]

Accessor to published Typed Controls manager.

Definition at line 386 of file Processing.hxx.

Referenced by CLAM::ConnectTypedControls(), and CLAM::BaseTypedOutControl::~BaseTypedOutControl().

bool CLAM::Processing::HasInControl ( const std::string &  name  )  [inline]

Definition at line 339 of file Processing.hxx.

References CLAM::InControlRegistry::Has().

bool CLAM::Processing::HasInPort ( const std::string &  name  )  [inline]

Definition at line 329 of file Processing.hxx.

References CLAM::InPortRegistry::Has().

bool CLAM::Processing::HasOutControl ( const std::string &  name  )  [inline]

Definition at line 344 of file Processing.hxx.

References CLAM::OutControlRegistry::Has().

bool CLAM::Processing::HasOutPort ( const std::string &  name  )  [inline]

Definition at line 334 of file Processing.hxx.

References CLAM::OutPortRegistry::Has().

bool CLAM::Processing::HasTypedInControl ( const std::string &  name  )  [inline]

Definition at line 349 of file Processing.hxx.

References CLAM::TypedInControlRegistry::Has().

bool CLAM::Processing::HasTypedOutControl ( const std::string &  name  )  [inline]

Definition at line 354 of file Processing.hxx.

References CLAM::TypedOutControlRegistry::Has().

bool CLAM::Processing::IsConfigured (  )  const [inline]

bool CLAM::Processing::IsRunning (  )  const [inline]

virtual bool CLAM::Processing::IsSyncSource (  )  const [inline, virtual]

Wether the processing is a sync source such as audio i/o device, or an audio callback hook (i.e.

Externalizer)

Reimplemented in CLAM::AudioIn, and CLAM::AudioOut.

Definition at line 399 of file Processing.hxx.

virtual bool CLAM::Processing::ModifiesPortsAndControlsAtConfiguration (  )  [inline, virtual]

This method is used to determine if a given processing can change its interface of ports/controls after its construction (i.e.

changing the name of ports in ConcreteConfigure). If a concrete processing can do this, it should reimplement the method returning true, in order to notify networks, graphical interfaces, etc.

Reimplemented in CLAM::AudioMixer, CLAM::MultiChannelAudioFileReader, CLAM::MultiChannelAudioFileWriter, and CLAM::MIDIDispatcher.

Definition at line 327 of file Processing.hxx.

void CLAM::Processing::RegisterInControl ( InControl in  ) 

void CLAM::Processing::RegisterInPort ( InPortBase in  ) 

void CLAM::Processing::RegisterOutControl ( OutControl out  ) 

void CLAM::Processing::RegisterOutPort ( OutPortBase out  ) 

void CLAM::Processing::RegisterTypedInControl ( BaseTypedInControl in  ) 

void CLAM::Processing::RegisterTypedOutControl ( BaseTypedOutControl out  ) 

void CLAM::Processing::SetExecState ( ExecState  state  )  [inline, protected]

Definition at line 422 of file Processing.hxx.

Referenced by CLAM::AudioSink::AudioSink(), and CLAM::AudioSource::AudioSource().

void CLAM::Processing::SetNetworkBackLink ( Network network  ) 

Definition at line 279 of file Processing.cxx.

References _network.

Referenced by CLAM::FlattenedNetwork::AddProcessing().

void CLAM::Processing::SetParent ( Processing p  ) 

void CLAM::Processing::Start ( void   ) 

Method to turn the object into running state.

This method must be called before any call to Do() methods.

Precondition:
the processing object is in ready state

Definition at line 200 of file Processing.cxx.

References CLAM_ASSERT, ConcreteStart(), IsConfigured(), IsRunning(), Running, and CLAM::Err::what().

Referenced by CLAM::Hidden::ProcessingClass2LadspaBase::Activate(), CLAM::AudioFileMemoryLoader::ConcreteConfigure(), CLAM::SegmentSMSTimeStretch::ConcreteStart(), CLAM::SegmentSMSMorph::ConcreteStart(), and CLAM::SegmentSMSMorph::LoadSDIF().

void CLAM::Processing::Stop ( void   ) 

Method to put the object out of running state When in execution mode, this method must be called before any further call to Configure() methods.

Precondition:
The processing object is in runnig state (or disabled).

Definition at line 214 of file Processing.cxx.

References CLAM_ASSERT, ConcreteStop(), IsRunning(), Ready, and CLAM::Err::what().

Referenced by CLAM::SegmentSMSTimeStretch::ConcreteStop(), CLAM::Hidden::ProcessingClass2LadspaBase::Deactivate(), and CLAM::SegmentSMSMorph::LoadSDIF().


Member Data Documentation

The parent network if any.

Note that Processings can be used directly without a network

Definition at line 431 of file Processing.hxx.

Referenced by BackendBufferSize(), BackendSampleRate(), and SetNetworkBackLink().

Pointer to the parent (composite) processing object, or 0.

Definition at line 428 of file Processing.hxx.

Referenced by SetParent(), and ~Processing().


The documentation for this class was generated from the following files:

Generated on Tue Feb 22 09:53:29 2011 for CLAM-Development by  doxygen 1.5.9