Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::sound::base::TimeSignature Class Reference

A class that represents a standard musical time signature. More...

#include <omSoundTimeSignature.h>

Public Member Functions

 TimeSignature ()
 Create a new default time signature representing 4/4 time. More...
 
 TimeSignature (UInt newNumerator, UInt newDenominator)
 Create a new time signature with the specified time signature numberator and denominator. More...
 
UInt getNumerator () const
 Return the numerator value of this time signature, indicating the number of beats per measure. More...
 
void setNumerator (UInt newNumerator)
 Set the numerator value of this time signature, indicating the number of beats per measure. More...
 
UInt getDenominator () const
 Return the denominator value of this time signature, indicating which note value gets a beat. More...
 
void setDenominator (UInt newDenominator)
 Set the denominator value of this time signature, indicating which note value gets a beat. More...
 
data::String toString () const
 Return a string representation of the time signature, 'N/D'. More...
 
 operator data::String () const
 Convert this time signature into a string representation, 'N/D'. More...
 

Detailed Description

A class that represents a standard musical time signature.

The numberator of the time signature indicates the number of beats per measure, and the denominator indicates what note value represents a beat. The note value is usually a power of 2: 1, 2, 4, 8, 16, 32, etc.

Constructor & Destructor Documentation

om::sound::base::TimeSignature::TimeSignature ( )
inline

Create a new default time signature representing 4/4 time.

om::sound::base::TimeSignature::TimeSignature ( UInt  newNumerator,
UInt  newDenominator 
)
inline

Create a new time signature with the specified time signature numberator and denominator.

Member Function Documentation

UInt om::sound::base::TimeSignature::getNumerator ( ) const
inline

Return the numerator value of this time signature, indicating the number of beats per measure.

void om::sound::base::TimeSignature::setNumerator ( UInt  newNumerator)
inline

Set the numerator value of this time signature, indicating the number of beats per measure.

UInt om::sound::base::TimeSignature::getDenominator ( ) const
inline

Return the denominator value of this time signature, indicating which note value gets a beat.

The note value is almost always a power of 2: 1, 2, 4, 8, 16, 32, etc.

void om::sound::base::TimeSignature::setDenominator ( UInt  newDenominator)
inline

Set the denominator value of this time signature, indicating which note value gets a beat.

The note value is almost always a power of 2: 1, 2, 4, 8, 16, 32, etc.

data::String om::sound::base::TimeSignature::toString ( ) const
inline

Return a string representation of the time signature, 'N/D'.

om::sound::base::TimeSignature::operator data::String ( ) const
inline

Convert this time signature into a string representation, 'N/D'.


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