svcore  1.9
Labeller Class Reference

#include <Labeller.h>

Inheritance diagram for Labeller:
Collaboration diagram for Labeller:

Public Types

enum  ValueType {
  ValueNone, ValueFromSimpleCounter, ValueFromCyclicalCounter, ValueFromTwoLevelCounter,
  ValueFromFrameNumber, ValueFromRealTime, ValueFromDurationFromPrevious, ValueFromDurationToNext,
  ValueFromTempoFromPrevious, ValueFromTempoToNext, ValueFromExistingNeighbour, ValueFromLabel
}
 
typedef std::map< ValueType, QString > TypeNameMap
 

Public Member Functions

 Labeller (ValueType type=ValueNone)
 
 Labeller (const Labeller &l)
 
virtual ~Labeller ()
 
TypeNameMap getTypeNames () const
 
ValueType getType () const
 
void setType (ValueType type)
 
int getCounterValue () const
 
void setCounterValue (int v)
 
int getSecondLevelCounterValue () const
 
void setSecondLevelCounterValue (int v)
 
int getCounterCycleSize () const
 
void setCounterCycleSize (int s)
 
void setSampleRate (float rate)
 
void resetCounters ()
 
void incrementCounter ()
 
template<typename PointType >
void label (PointType &newPoint, PointType *prevPoint=0)
 
template<typename PointType >
void labelAll (SparseModel< PointType > &model, MultiSelection *ms)
 
template<typename PointType >
void setValue (PointType &newPoint, PointType *prevPoint=0)
 
bool requiresPrevPoint () const
 
bool actingOnPrevPoint () const
 

Protected Member Functions

template<typename PointType >
float getValueFor (PointType &newPoint, PointType *prevPoint)
 

Protected Attributes

ValueType m_type
 
int m_counter
 
int m_counter2
 
int m_cycle
 
int m_dp
 
float m_rate
 

Detailed Description

Definition at line 29 of file Labeller.h.

Member Typedef Documentation

◆ TypeNameMap

typedef std::map<ValueType, QString> Labeller::TypeNameMap

Definition at line 85 of file Labeller.h.

Member Enumeration Documentation

◆ ValueType

Enumerator
ValueNone 
ValueFromSimpleCounter 
ValueFromCyclicalCounter 
ValueFromTwoLevelCounter 
ValueFromFrameNumber 
ValueFromRealTime 
ValueFromDurationFromPrevious 
ValueFromDurationToNext 
ValueFromTempoFromPrevious 
ValueFromTempoToNext 
ValueFromExistingNeighbour 
ValueFromLabel 

Definition at line 34 of file Labeller.h.

Constructor & Destructor Documentation

◆ Labeller() [1/2]

Labeller::Labeller ( ValueType  type = ValueNone)
inline

Definition at line 66 of file Labeller.h.

◆ Labeller() [2/2]

Labeller::Labeller ( const Labeller l)
inline

Definition at line 74 of file Labeller.h.

◆ ~Labeller()

virtual Labeller::~Labeller ( )
inlinevirtual

Definition at line 83 of file Labeller.h.

Member Function Documentation

◆ getTypeNames()

◆ getType()

ValueType Labeller::getType ( ) const
inline

Definition at line 115 of file Labeller.h.

References m_type.

◆ setType()

void Labeller::setType ( ValueType  type)
inline

Definition at line 116 of file Labeller.h.

References m_type.

◆ getCounterValue()

int Labeller::getCounterValue ( ) const
inline

Definition at line 118 of file Labeller.h.

References m_counter.

◆ setCounterValue()

void Labeller::setCounterValue ( int  v)
inline

Definition at line 119 of file Labeller.h.

References m_counter.

◆ getSecondLevelCounterValue()

int Labeller::getSecondLevelCounterValue ( ) const
inline

Definition at line 121 of file Labeller.h.

References m_counter2.

◆ setSecondLevelCounterValue()

void Labeller::setSecondLevelCounterValue ( int  v)
inline

Definition at line 122 of file Labeller.h.

References m_counter2.

◆ getCounterCycleSize()

int Labeller::getCounterCycleSize ( ) const
inline

Definition at line 124 of file Labeller.h.

References m_cycle.

◆ setCounterCycleSize()

void Labeller::setCounterCycleSize ( int  s)
inline

Definition at line 125 of file Labeller.h.

References m_counter, m_cycle, and m_dp.

◆ setSampleRate()

void Labeller::setSampleRate ( float  rate)
inline

Definition at line 135 of file Labeller.h.

References m_rate.

◆ resetCounters()

void Labeller::resetCounters ( )
inline

Definition at line 137 of file Labeller.h.

References m_counter, m_counter2, and m_cycle.

◆ incrementCounter()

void Labeller::incrementCounter ( )
inline

Definition at line 143 of file Labeller.h.

References m_counter, m_counter2, m_cycle, m_type, ValueFromCyclicalCounter, and ValueFromTwoLevelCounter.

Referenced by getValueFor(), and label().

◆ label()

template<typename PointType >
void Labeller::label ( PointType &  newPoint,
PointType *  prevPoint = 0 
)
inline

◆ labelAll()

template<typename PointType >
void Labeller::labelAll ( SparseModel< PointType > &  model,
MultiSelection ms 
)
inline

◆ setValue()

template<typename PointType >
void Labeller::setValue ( PointType &  newPoint,
PointType *  prevPoint = 0 
)
inline

Definition at line 222 of file Labeller.h.

References actingOnPrevPoint(), m_type, and ValueFromExistingNeighbour.

◆ requiresPrevPoint()

bool Labeller::requiresPrevPoint ( ) const
inline

◆ actingOnPrevPoint()

bool Labeller::actingOnPrevPoint ( ) const
inline

Definition at line 246 of file Labeller.h.

References m_type, ValueFromDurationToNext, and ValueFromTempoToNext.

Referenced by label(), labelAll(), and setValue().

◆ getValueFor()

Member Data Documentation

◆ m_type

ValueType Labeller::m_type
protected

◆ m_counter

int Labeller::m_counter
protected

◆ m_counter2

int Labeller::m_counter2
protected

◆ m_cycle

int Labeller::m_cycle
protected

◆ m_dp

int Labeller::m_dp
protected

Definition at line 330 of file Labeller.h.

Referenced by getValueFor(), and setCounterCycleSize().

◆ m_rate

float Labeller::m_rate
protected

Definition at line 331 of file Labeller.h.

Referenced by getValueFor(), and setSampleRate().


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