|
maiacore 1.10.1
Music analisys library
|
Represents a musical time signature (meter) for a measure. More...
#include <time-signature.h>
Public Member Functions | |
| TimeSignature (const int timeUpper=4, const int timeLower=4) | |
| Constructs a TimeSignature with specified upper and lower values. More... | |
| int | getUpperValue () const |
| Returns the upper value (numerator) of the time signature. More... | |
| int | getLowerValue () const |
| Returns the lower value (denominator) of the time signature. More... | |
| void | setUpperValue (int upperValue) |
| Sets the upper value (numerator) of the time signature. More... | |
| void | setLowerValue (int lowerValue) |
| Sets the lower value (denominator) of the time signature. More... | |
| METRIC | getMetric () const |
| Returns the metric type of the time signature (simple, compound, or irregular). More... | |
| const std::string | getMetricAsString () const |
| Returns the metric type as a string ("SIMPLE", "COMPOUND", "IRREGULAR"). More... | |
Represents a musical time signature (meter) for a measure.
The TimeSignature class provides methods for setting and querying the upper and lower values of the time signature, as well as determining the metric type (simple, compound, or complex). It is designed for music analysis, computational musicology, and MusicXML processing.
| TimeSignature::TimeSignature | ( | const int | timeUpper = 4, |
| const int | timeLower = 4 |
||
| ) |
Constructs a TimeSignature with specified upper and lower values.
| timeUpper | Numerator of the time signature (default: 4). |
| timeLower | Denominator of the time signature (default: 4). |
| int TimeSignature::getLowerValue | ( | ) | const |
Returns the lower value (denominator) of the time signature.
| METRIC TimeSignature::getMetric | ( | ) | const |
Returns the metric type of the time signature (simple, compound, or irregular).
Simple: 2/4, 3/4, 4/4, 2/8, 3/8, 4/8, etc.; Compound: 6/8, 9/8, 12/8, 6/4, 9/4, 15/16, etc.; Irregular: 5/4, 7/8, 11/8, 13/8, etc.
| const std::string TimeSignature::getMetricAsString | ( | ) | const |
Returns the metric type as a string ("SIMPLE", "COMPOUND", "IRREGULAR").
| int TimeSignature::getUpperValue | ( | ) | const |
Returns the upper value (numerator) of the time signature.
| void TimeSignature::setLowerValue | ( | int | lowerValue | ) |
Sets the lower value (denominator) of the time signature.
| lowerValue | New denominator value. |
| void TimeSignature::setUpperValue | ( | int | upperValue | ) |
Sets the upper value (numerator) of the time signature.
| upperValue | New numerator value. |