ScoreProcessing::TimeConverter Class Reference

Provides time conversion related to a music score. More...

#include <TimeConverter.h>

Inheritance diagram for ScoreProcessing::TimeConverter:

sp_smartable

List of all members.

Public Member Functions

virtual void convertRolledToUnrolled (Time rolled, std::vector< Time > &unrolled)=0
 Convert a rolled musical time position into a vector of the corresponding unrolled musical time positions in the score.
virtual Time convertUnrolledToRolled (Time unrolled)=0
 Convert an unrolled musical time position into the corresponding rolled musical time position in the score.
virtual Time convertMBUToTime (int measure, int beat, int unit_num, int unit_denom)=0
 Convert a musical time expressed in Measure, Beat, Unit format into a value expressed in whole note (1/4 means a quarter note). This time format is typically used for the score annotations.
virtual void convertTimeToMBU (Time time_val, int &measure, int &beat, int &unit_num, int &unit_denom)=0
 Convert a musical time expressed in whole note in a musical time expressed in Measure, Beat, Unit format. This time format is typically used for the score annotations.

Static Public Member Functions

static STimeConverter newTimeConverter (MusicXML::SScore score)
 Allocates a new TimeConverter object.

Protected Member Functions

 TimeConverter (MusicXML::SScore score)
virtual ~TimeConverter ()


Detailed Description

Provides time conversion related to a music score.

Constructor & Destructor Documentation

ScoreProcessing::TimeConverter::TimeConverter ( MusicXML::SScore  score  )  [inline, protected]

A TimeConverter is associated to a music score by construction. All the conversion; are thus applied in the context of this score.

Parameters:
score the associated music score.

virtual ScoreProcessing::TimeConverter::~TimeConverter (  )  [inline, protected, virtual]


Member Function Documentation

virtual Time ScoreProcessing::TimeConverter::convertMBUToTime ( int  measure,
int  beat,
int  unit_num,
int  unit_denom 
) [pure virtual]

Convert a musical time expressed in Measure, Beat, Unit format into a value expressed in whole note (1/4 means a quarter note). This time format is typically used for the score annotations.

Parameters:
measure : the measure value.
beat : the beat value.
unit_num : the unit value numerator.
unit_denom : the unit value denominator.
Returns:
The musical time expressed in whole note.

virtual void ScoreProcessing::TimeConverter::convertRolledToUnrolled ( Time  rolled,
std::vector< Time > &  unrolled 
) [pure virtual]

Convert a rolled musical time position into a vector of the corresponding unrolled musical time positions in the score.

Parameters:
rolled : the rolled position expressed in whole note (1/4 means a quarter note).
unrolled : the vector to be filled with the unrolled musical time positions in the score.

virtual void ScoreProcessing::TimeConverter::convertTimeToMBU ( Time  time_val,
int &  measure,
int &  beat,
int &  unit_num,
int &  unit_denom 
) [pure virtual]

Convert a musical time expressed in whole note in a musical time expressed in Measure, Beat, Unit format. This time format is typically used for the score annotations.

Parameters:
time_val : the time in whole note to be converted.
measure : the measure value result.
beat : the beat value result.
unit_num : the unit value numerator result.
unit_denom : the unit value denominator result.

virtual Time ScoreProcessing::TimeConverter::convertUnrolledToRolled ( Time  unrolled  )  [pure virtual]

Convert an unrolled musical time position into the corresponding rolled musical time position in the score.

Parameters:
unrolled : the unrolled position expressed in whole note (1/4 means a quarter note).
Returns:
The rolled musical time position in the score.

static STimeConverter ScoreProcessing::TimeConverter::newTimeConverter ( MusicXML::SScore  score  )  [static]

Allocates a new TimeConverter object.

Parameters:
score the associated music score.
Returns:
the new object.


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

Generated on Wed Jan 28 19:16:27 2009 for VEMUS by  doxygen 1.5.8