Represents a fraction of a whole note, for measuring musical time.
More...
#include <CommonClasses.h>
|
using | Initializer = std::pair< NumType, NumType > |
| initializer for Fraction class (numerator, denominator)
|
|
|
| Fraction (const std::shared_ptr< json > &root, json_pointer pointer) |
| Constructor to wrap a Fraction instance around existing JSON.
|
|
| Fraction (Base &parent, const std::string_view &key, const Initializer &value) |
| Creates a new Array class as a child of a JSON element.
|
|
| MNX_ARRAY_ELEMENT_PROPERTY (NumType, numerator, NUMERATOR_INDEX) |
| the numerator of the fraction
|
|
| MNX_ARRAY_ELEMENT_PROPERTY (NumType, denominator, DENOMINATOR_INDEX) |
| the denominator of the fraction
|
|
Represents a fraction of a whole note, for measuring musical time.
◆ Fraction()
mnx::Fraction::Fraction |
( |
Base & |
parent, |
|
|
const std::string_view & |
key, |
|
|
const Initializer & |
value |
|
) |
| |
|
inline |
Creates a new Array class as a child of a JSON element.
- Parameters
-
parent | The parent class instance |
key | The JSON key to use for embedding in parent. |
value | The numerator (number on top) and denominator (number on bottom) of the fraction. |