Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

TTimeSign Class Reference

Represents time signatures. More...

#include <TTimeSign.h>

Inheritance diagram for TTimeSign:

visitable smartable List of all members.

Public Types

enum  {
  undefined = -1, groupbeats = -1, common = 1, cut,
  single_number, normal, last = normal
}

Public Member Functions

virtual void accept (TScoreVisitor &visitor)
void setSymbol (int symbol)
int getSymbol () const
long add (long beat, long type)
 beat type must be groupbeat for the first elements of a composite like 3+2/8

bool measured () const
 senza measures are implicitely denoted by an empty beat list

TRational rational ()
 returns the time signature as a rational number (senza measure is -1/1)

vector< long > & getBeats ()
vector< long > & getBeatTypes ()

Static Public Member Functions

const string xmlsymbol (int d)
 convert an integer symbol to a MusicXML string

int xmlsymbol (const string str)
 convert an MusicXML string to an integer symbol


Protected Member Functions

 TTimeSign ()
 empty constructor denotes unmeasured time


Friends

EXP friend SMARTP< TTimeSignnewTimeSign ()

Detailed Description

Time signatures are represented by two elements. The beats element indicates the number of beats, as found in the numerator of a time signature. The beat-type element indicates the beat unit, as found in the denominator of a time signature. The symbol attribute is used to indicate another notation beyond a fraction: the common and cut time symbols, as well as a single number with an implied denominator. Normal (a fraction) is the implied symbol type if none is specified. Multiple pairs of beat and beat-type elements are used for composite time signatures with multiple denominators, such as 2/4 + 3/8. A composite such as 3+2/8 requires only one beat/beat-type pair. A senza-misura element explicitly indicates that no time signature is present.
The MusicXML time element is defined in attributes.dtd.


Generated on Tue Mar 23 09:50:25 2004 for LibMusicXML by doxygen 1.3.3