#include <InControl.hxx>

Public Member Functions | |
| InControl (const std::string &name="unnamed in control", Processing *proc=0) | |
| Constructor to use when no callback is used. | |
| template<typename ProcessingType, typename ParameterType> | |
| InControl (const std::string &name, ProcessingType *proc, void(ProcessingType::*callback)(const ParameterType &)) | |
| Constructor to use a callback by const reference. | |
| template<typename ProcessingType, typename ParameterType> | |
| InControl (unsigned id, const std::string &name, ProcessingType *proc, void(ProcessingType::*callback)(unsigned, const ParameterType &)) | |
| Constructor to use a callback by const reference plus a port id to distinguish different caller controls in a single serving callback. | |
| template<typename ProcessingType, typename ParameterType> | |
| InControl (const std::string &name, ProcessingType *proc, void(ProcessingType::*callback)(ParameterType)) | |
| Constructor to use a callback by copy. | |
| template<typename ProcessingType, typename ParameterType> | |
| InControl (unsigned id, const std::string &name, ProcessingType *proc, void(ProcessingType::*callback)(unsigned, ParameterType)) | |
| Constructor to use a callback by copy plus a port id to distinguish different caller controls in a single serving callback. | |
| virtual | ~InControl () |
| virtual void | DoControl (const ControlDataType &val) |
| The control receives a value when this method gets called. Associated callback if any, gets triggered on result. Connected OutControl may trigger it but it also may be called directly, for example to set the initial value. | |
| virtual const ControlDataType & | GetLastValue () const |
| Returns the last received value. | |
| const std::string | GetLastValueAsString () |
| Convenience method to get the string representation of the last value. This just works if the token is storable as XML leaf, if not a "Not printable" string is given. | |
| virtual const std::type_info & | GetTypeId () const |
| Concrete InControls must overload this method by returning the typeid of the kind of data they communicate. | |
| template<> | |
| const std::string | GetLastValueAsString () |
Protected Attributes | |
| ControlDataType | mLastValue |
Classes | |
| class | Callback |
| class | MethodCallback |
| Processing method callback wrapper. Calls a processing method that receives the value as const reference. | |
| class | MethodCallbackByCopy |
| Processing method callback wrapper by copy. Calls a processing method that receives the control value by copy. To use with basic (cheap copy) objects (ints, bools, floats...). | |
| class | MethodCallbackByCopyWithId |
| Processing method callback wrapper by copy with control id. Calls a processing method that receives the control value by copy. To use with basic (cheap copy) objects (ints, bools, floats...) The id enables reusing the same callback for different controls, but still knowing the originating control. | |
| class | MethodCallbackWithId |
| Processing method callback wrapper with control id. Calls a processing method that receives the value as const reference. The id enables reusing the same callback for different controls, but still knowing the originating control. | |
| class | NullCallback |
| Null control callback wrapper. Just do nothing. | |
A processing method can be set as callback to respond to incoming events. You can also consult GetLastValue to get the last received value.
Definition at line 46 of file InControl.hxx.
| CLAM::InControl< ControlDataType >::InControl | ( | const std::string & | name = "unnamed in control", |
|
| Processing * | proc = 0 | |||
| ) | [inline] |
| CLAM::InControl< ControlDataType >::InControl | ( | const std::string & | name, | |
| ProcessingType * | proc, | |||
| void(ProcessingType::*)(const ParameterType &) | callback | |||
| ) | [inline] |
| CLAM::InControl< ControlDataType >::InControl | ( | unsigned | id, | |
| const std::string & | name, | |||
| ProcessingType * | proc, | |||
| void(ProcessingType::*)(unsigned, const ParameterType &) | callback | |||
| ) | [inline] |
Constructor to use a callback by const reference plus a port id to distinguish different caller controls in a single serving callback.
Definition at line 70 of file InControl.hxx.
| CLAM::InControl< ControlDataType >::InControl | ( | const std::string & | name, | |
| ProcessingType * | proc, | |||
| void(ProcessingType::*)(ParameterType) | callback | |||
| ) | [inline] |
| CLAM::InControl< ControlDataType >::InControl | ( | unsigned | id, | |
| const std::string & | name, | |||
| ProcessingType * | proc, | |||
| void(ProcessingType::*)(unsigned, ParameterType) | callback | |||
| ) | [inline] |
Constructor to use a callback by copy plus a port id to distinguish different caller controls in a single serving callback.
Definition at line 84 of file InControl.hxx.
| virtual CLAM::InControl< ControlDataType >::~InControl | ( | ) | [inline, virtual] |
Definition at line 91 of file InControl.hxx.
| virtual void CLAM::InControl< ControlDataType >::DoControl | ( | const ControlDataType & | val | ) | [inline, virtual] |
The control receives a value when this method gets called. Associated callback if any, gets triggered on result. Connected OutControl may trigger it but it also may be called directly, for example to set the initial value.
Definition at line 100 of file InControl.hxx.
Referenced by CLAM::TokenDelay< T >::ConcreteConfigure(), CLAM::SpectralDelay::ConcreteConfigure(), CLAM::SMSTranspose::ConcreteConfigure(), CLAM::SMSSinusoidalGain::ConcreteConfigure(), CLAM::SMSResidualGain::ConcreteConfigure(), CLAM::SMSPitchShift::ConcreteConfigure(), CLAM::SMSHarmonizer::ConcreteConfigure(), CLAM::SMSGenderChange::ConcreteConfigure(), CLAM::SimpleOscillator::ConcreteConfigure(), CLAM::SegmentSMSTimeStretch::ConcreteConfigure(), CLAM::SegmentSMSHarmonizer::ConcreteConfigure(), CLAM::Robotization::ConcreteConfigure(), CLAM::OscillatingSpectralNotch::ConcreteConfigure(), CLAM::ControlSum::ConcreteConfigure(), CLAM::ControlSelector::ConcreteConfigure(), CLAM::ControlScaler::ConcreteConfigure(), CLAM::ControlFade::ConcreteConfigure(), CLAM::ControlComparison::ConcreteConfigure(), CLAM::Control2Data::ConcreteConfigure(), CLAM::CircularShift::ConcreteConfigure(), CLAM::AudioBufferAmplifier::ConcreteConfigure(), CLAM::AudioAmplifier::ConcreteConfigure(), CLAM::ThreeBandFilter::ConcreteConfigure(), CLAM::SMSSynthesis::Do(), CLAM::SMSPitchShift::Do(), CLAM::SinusoidalSynthesis::Do(), CLAM::SegmentSMSTimeStretch::Do(), CLAM::PhaseManagement::Do(), CLAM::FrameInterpolator::Do(), CLAM::InControlPublisher::DoControl(), CLAM::FDCombFilter::FDCombFilter(), CLAM::SegmentSMSMorph::FindInterpolatedFrameFromSegment2Morph(), CLAM::SMSHarmonizer::IgnoreResidual(), CLAM::SegmentSMSHarmonizer::IgnoreResidual(), CLAM::Vocoder::InitControls(), CLAM::SpectralSpread::InitControls(), CLAM::SpectralRingModulation::InitControls(), CLAM::SpectralReverse::InitControls(), CLAM::SpectralPhaseModulation::InitControls(), CLAM::SpectralNotch::InitControls(), CLAM::SpectralGate::InitControls(), CLAM::SpectralFocus::InitControls(), CLAM::SpectralExciter::InitControls(), CLAM::SpectralCombTriang::InitControls(), CLAM::SpectralCombDelta::InitControls(), CLAM::SpectralAverage::InitControls(), CLAM::SpectralAmplitudeModulation::InitControls(), CLAM::SampleAndHold::InitControls(), CLAM::Peakalizer::InitControls(), CLAM::Partializer::InitControls(), CLAM::HumRemover::InitControls(), CLAM::FrameTransformation::InitControls(), CLAM::Deesser::InitControls(), CLAM::ThreeBandAM::InitControls(), CLAM::ThreeBandGate::InitControls(), CLAM::ThreeBandCompressor::InitControls(), CLAM::OutControl< ControlDataType >::SendControl(), CLAM::CircularShift::SetAmount(), CLAM::WindowGenerator::SetSize(), CLAM::SegmentSMSMorph::UpdateControlValueFromBPF(), and CLAM::SegmentSMSMorph::UpdateFrameInterpolatorFactors().
| virtual const ControlDataType& CLAM::InControl< ControlDataType >::GetLastValue | ( | ) | const [inline, virtual] |
Returns the last received value.
Reimplemented in CLAM::InControlPublisher.
Definition at line 108 of file InControl.hxx.
Referenced by CLAM::SimpleOscillator::ApplyFreqAndAmpControls(), CLAM::TokenDelay< T >::ConcreteConfigure(), CLAM::WindowGenerator::Do(), CLAM::Vocoder::Do(), CLAM::TokenDelay< T >::Do(), CLAM::SpectralSpread::Do(), CLAM::SpectralShapeShift::Do(), CLAM::SpectralRingModulation::Do(), CLAM::SpectralReverse::Do(), CLAM::SpectralReject::Do(), CLAM::SpectralPhaseModulation::Do(), CLAM::SpectralPeakArrayInterpolator::Do(), CLAM::SpectralNotch::Do(), CLAM::SpectralLimiter::Do(), CLAM::SpectralGate::Do(), CLAM::SpectralFocus::Do(), CLAM::SpectralExciter::Do(), CLAM::SpectralDelay::Do(), CLAM::SpectralCombTriang::Do(), CLAM::SpectralCombDelta::Do(), CLAM::SpectralAverage::Do(), CLAM::SpectralAmplitudeModulation::Do(), CLAM::SMSTranspose::Do(), CLAM::SMSSynthesis::Do(), CLAM::SMSSpectralShapeShift::Do(), CLAM::SMSSinusoidalGain::Do(), CLAM::SMSResidualGain::Do(), CLAM::SMSPitchShift::Do(), CLAM::SMSOddEvenHarmonicRatio::Do(), CLAM::SMSMorph::Do(), CLAM::SMSHarmonizer::Do(), CLAM::SMSGenderChange::Do(), CLAM::SMSFreqShift::Do(), CLAM::SMSDeesser::Do(), CLAM::SinusoidalSynthesis::Do(), CLAM::SinTracking::Do(), CLAM::SimpleOscillator::Do(), CLAM::SegmentSMSMorph::Do(), CLAM::SampleAndHold::Do(), CLAM::Robotization::Do(), CLAM::RandomPhase::Do(), CLAM::Peakalizer::Do(), CLAM::Partializer::Do(), CLAM::OscillatingSpectralNotch::Do(), CLAM::NoSpectralTransformation::Do(), CLAM::MonoAudioFileReader::Do(), CLAM::MIDIKeyboard::Do(), CLAM::HumRemover::Do(), CLAM::FreqShift::Do(), CLAM::FrameInterpolator::Do(), CLAM::FDFilterGen::Do(), CLAM::FDCombFilter::Do(), CLAM::Deesser::Do(), CLAM::ControlFade::Do(), CLAM::Control2Data::Do(), CLAM::CircularShift::Do(), CLAM::AudioFileMemoryLoader::Do(), CLAM::AudioBufferAmplifier::Do(), CLAM::AudioAmplifier::Do(), CLAM::ThreeBandAM::Do(), CLAM::ThreeBandGate::Do(), CLAM::ThreeBandFilter::Do(), CLAM::ThreeBandCompressor::Do(), CLAM::PhaseManagement::DoPhaseAlignment(), CLAM::PhaseManagement::DoPhaseContinuation(), CLAM::SegmentSMSMorph::FindInterpolatedFrameFromSegment2Morph(), CLAM::MIDI2Melody::GenerateOutputData(), CLAM::ControlSink::GetControlValue(), CLAM::GetFloatFromInControl(), CLAM::InControlPublisher::GetLastValue(), CLAM::TokenDelay< CLAM::SpectralPeakArray >::GivenDelay(), CLAM::ControlSelector::InControlCallback(), CLAM::SegmentSMSHarmonizer::UpdateBPF(), CLAM::SegmentSMSMorph::UpdateControlValueFromBPF(), CLAM::SegmentSMSMorph::UpdateFrameInterpolatorFactors(), and CLAM::SegmentSMSTimeStretch::UpdateTimeAndIndex().
| const std::string CLAM::InControl< ControlDataType >::GetLastValueAsString | ( | ) | [inline, virtual] |
Convenience method to get the string representation of the last value. This just works if the token is storable as XML leaf, if not a "Not printable" string is given.
Reimplemented from CLAM::InControlBase.
Definition at line 116 of file InControl.hxx.
Referenced by CLAM::InControl< float >::GetLastValueAsString(), and CLAM::InControl< ControlDataType >::GetLastValueAsString().
| virtual const std::type_info& CLAM::InControl< ControlDataType >::GetTypeId | ( | ) | const [inline, virtual] |
Concrete InControls must overload this method by returning the typeid of the kind of data they communicate.
This method is used internanlly in order to assure type compatibility between an input an an output control. There are some other uses like the NetworkEditor assigning different colors to connectors depending on this type.
Implements CLAM::InControlBase.
Definition at line 121 of file InControl.hxx.
| const std::string CLAM::InControl< MIDI::Message >::GetLastValueAsString | ( | ) | [inline, virtual] |
Reimplemented from CLAM::InControlBase.
Definition at line 33 of file InControl.cxx.
References CLAM::InControl< ControlDataType >::GetLastValueAsString().
ControlDataType CLAM::InControl< ControlDataType >::mLastValue [protected] |
Definition at line 52 of file InControl.hxx.
Referenced by CLAM::InControl< float >::DoControl(), CLAM::InControlPublisher::GetLastValue(), and CLAM::InControl< float >::GetLastValue().
1.5.6