CLAM-Development
1.4.0
|
Processing Data class to encapsulate a CLAM segment. More...
#include <Segment.hxx>
Public Member Functions | |
DYNAMIC_TYPE_USING_INTERFACE (Segment, 8, ProcessingData) | |
DYN_ATTRIBUTE (0, public, TTime, BeginTime) | |
Begin time in miliseconds. | |
DYN_ATTRIBUTE (1, public, TTime, EndTime) | |
End time in miliseconds. | |
DYN_ATTRIBUTE (2, private, bool, prHoldsData) | |
DYN_ATTRIBUTE (3, private, List< Frame >, prFramesArray) | |
DYN_ATTRIBUTE (4, public, Audio, Audio) | |
DYN_ATTRIBUTE (5, public, List< Segment >, Children) | |
DYN_ATTRIBUTE (6, public, TData, SamplingRate) | |
DYN_ATTRIBUTE (7, public, std::string, Id) | |
void | AddFramesArray () |
void | RemoveFramesArray () |
void | SetFramesArray (const List< Frame > &frames) |
const List< Frame > & | GetFramesArray () const |
List< Frame > & | GetFramesArray () |
Segment * | GetpParent () |
Getter for accessing parent segment. | |
void | SetpParent (Segment *newParent) |
Setter for parent segment. | |
void | DefaultInit () |
The concrete dynamic type constructor calls DefaultInit(). | |
void | CopyInit (const Segment &prototype) |
int | GetnFrames () const |
Returns the number of frames in segment. | |
Frame & | GetFrame (TIndex pos) |
Returns a reference to the frame found in a given position. | |
const Frame & | GetFrame (TIndex pos) const |
Returns a constant reference to the frame found in a given position. | |
void | AddFrame (Frame &newFrame) |
Adds a new frame at the end of the segment. | |
void | DeleteFrame (TIndex pos) |
Deletes frame in a given position. | |
TIndex | FindFrame (TTime time) const |
Finds frame with center time closest to the one given. | |
Frame & | GetFrame (TTime time) |
Returns a reference to the frame with center time closest to the one passed. | |
const Frame & | GetFrame (TTime time) const |
Returns a reference to the frame with center time closest to the one passed. | |
void | DeleteFrame (TTime time) |
Deletes frame with center time closest to the one passed. | |
void | SetHoldsData (bool HoldsData) |
Interface for setting the prHoldData member and configuring the Segment accordingly. | |
bool | GetHoldsData () const |
Interface for accessing the prHoldData private member. | |
![]() | |
ProcessingData (const int n) | |
Constructor of an object that will contain the number of attributes passed by parameter. | |
ProcessingData (const ProcessingData &prototype, bool shareData=false, bool deep=true) | |
Copy constructor of a ProcessingData object. | |
virtual | ~ProcessingData () |
![]() | |
DynamicType (const int nAttr) | |
Constructs a DynamicType object that can hold. | |
DynamicType (const DynamicType &prototype, const bool shareData, const bool deepCopy) | |
Copy constructor of a dynamic Type. | |
DynamicType (const DynamicType &prototype) | |
virtual | ~DynamicType () |
virtual const char * | GetClassName () const =0 |
Return the class name. | |
void | CopyInit (const DynamicType &dt) |
This method allows custom code for the copy-constructor of a dynamic type, since the copy-constructor is macro expanded and can not be overwritted. | |
bool | UpdateData () |
Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() (where XXX is an attribute name) has been done. | |
unsigned | GetNDynamicAttributes () const |
const char * | GetDynamicAttributeName (unsigned i) |
virtual const std::type_info & | GetTypeId (unsigned i) const =0 |
bool | AttributeIsComponent (unsigned i) const |
bool | AttributeIsDynamictype (unsigned i) const |
bool | IsAttributeInstantiated (unsigned i) const |
const void * | GetAttributeAsVoidPtr (unsigned i) const |
const Component * | GetAttributeAsComponent (unsigned i) const |
Component * | GetAttributeAsComponent (unsigned i) |
void | FullfilsInvariant () const |
virtual Component * | DeepCopy () const |
void | Debug () const |
virtual void | StoreOn (CLAM::Storage &storage) const |
Stores component's subitems on the given Storage. | |
virtual void | LoadFrom (CLAM::Storage &storage) |
Loads component's subitems from the given Storage. | |
![]() | |
virtual | ~Component () |
Public Attributes | |
TIndex | mCurrentFrameIndex |
Index used when processing for keeeping trace of current location in Frame list. |
Processing Data class to encapsulate a CLAM segment.
A Segment is basically an ordered list of Frames (
Definition at line 50 of file Segment.hxx.
void CLAM::Segment::AddFrame | ( | Frame & | newFrame | ) |
Adds a new frame at the end of the segment.
Note that this operation copies the frame.
Definition at line 129 of file Segment.cxx.
References CLAM::List< T >::AddElem(), CLAM_ASSERT, GetFramesArray(), and GetHoldsData().
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), CLAM::SMSAnalysis::Do(), CLAM::SegmentSMSTimeStretch::GetCurrentFrame(), CLAM::SegmentTransformation::GetCurrentFrame(), and CLAM::SDIFIn::LoadSDIFDataIntoSegment().
|
inline |
Definition at line 73 of file Segment.hxx.
Referenced by SetHoldsData().
void CLAM::Segment::CopyInit | ( | const Segment & | prototype | ) |
Definition at line 57 of file Segment.cxx.
References GetFramesArray(), mCurrentFrameIndex, and CLAM::Search< U, T >::Set().
void CLAM::Segment::DefaultInit | ( | void | ) |
The concrete dynamic type constructor calls DefaultInit().
This allows user to initialize his/her object. But we define DefaultInit() here because we don't want to force writting one DefaultInit() function for each concrete dynamic type. If a dynamic type concrete class defines some (not-default) constructors, this should also call the DefaultInit().
Reimplemented from CLAM::DynamicType.
Definition at line 35 of file Segment.cxx.
References mCurrentFrameIndex, NULL, and CLAM::DynamicType::UpdateData().
void CLAM::Segment::DeleteFrame | ( | TIndex | pos | ) |
Deletes frame in a given position.
Definition at line 143 of file Segment.cxx.
References CLAM_ASSERT, CLAM::List< T >::DeleteElem(), GetFrame(), GetFramesArray(), GetHoldsData(), and GetnFrames().
Referenced by DeleteFrame(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), and CLAM::SegmentTransformation::IsLastFrame().
void CLAM::Segment::DeleteFrame | ( | TTime | time | ) |
Deletes frame with center time closest to the one passed.
Time in miliseconds
Definition at line 194 of file Segment.cxx.
References DeleteFrame(), and FindFrame().
CLAM::Segment::DYN_ATTRIBUTE | ( | 0 | , |
public | , | ||
TTime | , | ||
BeginTime | |||
) |
Begin time in miliseconds.
CLAM::Segment::DYN_ATTRIBUTE | ( | 1 | , |
public | , | ||
TTime | , | ||
EndTime | |||
) |
End time in miliseconds.
CLAM::Segment::DYN_ATTRIBUTE | ( | 2 | , |
private | , | ||
bool | , | ||
prHoldsData | |||
) |
CLAM::Segment::DYN_ATTRIBUTE | ( | 6 | , |
public | , | ||
TData | , | ||
SamplingRate | |||
) |
CLAM::Segment::DYN_ATTRIBUTE | ( | 7 | , |
public | , | ||
std::string | , | ||
Id | |||
) |
CLAM::Segment::DYNAMIC_TYPE_USING_INTERFACE | ( | Segment | , |
8 | , | ||
ProcessingData | |||
) |
Finds frame with center time closest to the one given.
Time in miliseconds
Definition at line 170 of file Segment.cxx.
References CLAM_ASSERT, CLAM::Search< U, T >::Find(), FindFrame(), GetHoldsData(), and GetnFrames().
Referenced by DeleteFrame(), FindFrame(), GetFrame(), and GetnFrames().
Returns a reference to the frame found in a given position.
Time in miliseconds
Definition at line 117 of file Segment.cxx.
References CLAM_ASSERT, GetFrame(), GetFramesArray(), and GetHoldsData().
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), DeleteFrame(), CLAM::SegmentSMSTimeStretch::Do(), CLAM::SegmentSMSMorph::Do(), CLAM::CleanTracks::Do(), CLAM::SpectralAnalysis::Do(), CLAM::SpectralSynthesis::Do(), CLAM::SinusoidalSynthesis::Do(), CLAM::SegmentTransformation::Do(), CLAM::SMSSynthesis::Do(), CLAM::SegmentSMSMorph::FindInterpolatedFrameFromSegment2Morph(), CLAM::SegmentSMSTimeStretch::GetCurrentFrame(), CLAM::SegmentTransformation::GetCurrentFrame(), GetFrame(), CLAM::SegmentDescriptors::SetpSegment(), CLAM::Segmentator::UnwrapDescriptors(), and CLAM::SegmentSMSTimeStretch::UpdateTimeAndIndex().
Returns a constant reference to the frame found in a given position.
Definition at line 105 of file Segment.cxx.
References CLAM_ASSERT, GetFrame(), GetFramesArray(), and GetHoldsData().
Returns a reference to the frame with center time closest to the one passed.
Time in miliseconds.
Definition at line 184 of file Segment.cxx.
References FindFrame(), and GetFrame().
Returns a reference to the frame with center time closest to the one passed.
Time in miliseconds.
Definition at line 189 of file Segment.cxx.
References FindFrame(), and GetFrame().
Definition at line 87 of file Segment.hxx.
Referenced by AddFrame(), CopyInit(), DeleteFrame(), GetFrame(), GetnFrames(), and SetHoldsData().
Definition at line 88 of file Segment.hxx.
|
inline |
Interface for accessing the prHoldData private member.
Definition at line 147 of file Segment.hxx.
Referenced by AddFrame(), DeleteFrame(), FindFrame(), GetFrame(), and GetnFrames().
int CLAM::Segment::GetnFrames | ( | ) | const |
Returns the number of frames in segment.
Definition at line 90 of file Segment.cxx.
References FindFrame(), GetFramesArray(), GetHoldsData(), and CLAM::List< T >::Size().
Referenced by CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger(), CLAM::SegmentDescriptors::ConcreteCompute(), DeleteFrame(), CLAM::SegmentSMSTimeStretch::Do(), CLAM::SegmentSMSMorph::Do(), CLAM::Segmentator::Do(), CLAM::CleanTracks::Do(), CLAM::SegmentTransformation::Do(), FindFrame(), CLAM::SegmentSMSMorph::FindInterpolatedFrameFromSegment2Morph(), CLAM::SegmentSMSTimeStretch::GetCurrentFrame(), CLAM::SegmentTransformation::GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::HaveFinished(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), CLAM::SegmentTransformation::IsLastFrame(), CLAM::SegmentDescriptors::SetpSegment(), CLAM::Segmentator::UnwrapDescriptors(), and CLAM::SegmentSMSTimeStretch::UpdateTimeAndIndex().
|
inline |
Getter for accessing parent segment.
Definition at line 93 of file Segment.hxx.
|
inline |
Definition at line 77 of file Segment.hxx.
Referenced by SetHoldsData().
Definition at line 82 of file Segment.hxx.
References CLAM::Search< U, T >::Set().
void CLAM::Segment::SetHoldsData | ( | bool | HoldsData | ) |
Interface for setting the prHoldData member and configuring the Segment accordingly.
Definition at line 199 of file Segment.cxx.
References AddFramesArray(), GetFramesArray(), NULL, RemoveFramesArray(), CLAM::Search< U, T >::Set(), and CLAM::DynamicType::UpdateData().
|
inline |
Setter for parent segment.
Definition at line 95 of file Segment.hxx.
TIndex CLAM::Segment::mCurrentFrameIndex |
Index used when processing for keeeping trace of current location in Frame list.
Definition at line 90 of file Segment.hxx.
Referenced by CopyInit(), DefaultInit(), CLAM::SMSAnalysis::Do(), CLAM::SegmentSMSTimeStretch::Do(), CLAM::SpectralAnalysis::Do(), CLAM::SpectralSynthesis::Do(), CLAM::SinusoidalSynthesis::Do(), CLAM::SegmentTransformation::Do(), CLAM::SMSSynthesis::Do(), CLAM::SegmentSMSMorph::FindInterpolatedFrameFromSegment2Morph(), CLAM::SMSTransformationChain::InitAllFrameIndex(), and CLAM::SegmentTransformation::IsLastFrame().