#include "Musimat.h"
#include <iostream>
Go to the source code of this file.
Classes | |
| class | Rhythm |
| Rhythm class implements standard methods and data structures to manipulate musical rhythm arithmetically. More... | |
Functions | |
| Real | metronome (Rhythm B, Real T) |
| Calculate the tempo coefficient corresponding to some rhythmic duration B at some tempo T. | |
| Real | Duration (Real x) |
| Calculate the actual duration of a Real with the implicit tempo scale applied, as a fraction of a whole note. | |
| Real | Duration (Rhythm x) |
| Calculate the actual duration of a Rhythm with the implicit tempo scale applied, as a fraction of a whole note. | |
| Real | AbsDuration (Real x) |
| Calculate the absolute duration of a Real without the implicit tempo scale applied, as a fraction of a whole note. | |
| Real | AbsDuration (Rhythm x) |
| Calculate the absolute duration of a Rhythm without the implicit tempo scale applied, as a fraction of a whole note. | |
| Void | SetTempoScale (Real ts) |
| Set the tempo used by all instances of Rhythm. | |
Variables | |
| Rhythm | Whole |
| Duration of a whole note. | |
| Rhythm | Half |
| Duration of a half note. | |
| Rhythm | Quarter |
| Duration of a quarter note. | |
| Rhythm | Eighth |
| Duration of a eighth note. | |
| Rhythm | Sixteenth |
| < Duration of a sixteenth note | |
Definition in file Rhythm.h.
Calculate the absolute duration of a Rhythm without the implicit tempo scale applied, as a fraction of a whole note.
Definition at line 60 of file Rhythm.cpp.
References Rhythm::absDuration(), and Return.
00061 { 00062 Return y.absDuration(); 00063 }
Calculate the absolute duration of a Real without the implicit tempo scale applied, as a fraction of a whole note.
Definition at line 49 of file Rhythm.cpp.
References Return.
Calculate the actual duration of a Rhythm with the implicit tempo scale applied, as a fraction of a whole note.
Definition at line 55 of file Rhythm.cpp.
References Rhythm::absDuration(), and Return.
00056 { 00057 Return y.absDuration(); 00058 }
Calculate the actual duration of a Real with the implicit tempo scale applied, as a fraction of a whole note.
For example, SetTempoScale( 0.5 ); Print( Duration( 1.0/4.0 ) ); prints 0.125.
Definition at line 37 of file Rhythm.cpp.
References Return.
Calculate the tempo coefficient corresponding to some rhythmic duration B at some tempo T.
B can be expressed as a ratio of reals, e.g., 1.0/4.0 for a quarternote. The expression metronome( 1.0/4.0, 60.0 ) returns the tempo coefficient for "quarter note gets the beat and there are sixty beats per minute". Hence, it returns 1.0.
Definition at line 32 of file Rhythm.cpp.
| Void SetTempoScale | ( | Real | ts | ) |
Set the tempo used by all instances of Rhythm.
Definition at line 27 of file Rhythm.cpp.
References Rhythm::tempo().
00028 { 00029 Rhythm::tempo(ts); 00030 }
1.4.7