Package eu.bandm.music.entities
Class Tempo
java.lang.Object
eu.bandm.music.entities.Tempo
Tempo indication, relating a metric duration to a physical duration.
Objects behave immutable/algebraic.
For convenience, they support reading different data
and construction via different data.
Standard construction is by "MM", means "Mälzel's Metronome", means
beats per minutes. Beats are the "refDuration" values.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Rational
static final Tempo
protected Rational
static final Rational
Evidentprotected static final BiFunction<RationalDuration,
Integer, Tempo> Used for parsers.static final Translet.Parser<Tempo>
Accepts the standard notation as usual in printed sheet music, e.g.static final Translet.Parser<Tempo>
Accepts the standard notation as usual in printed sheet music, e.g.protected RationalDuration
-
Constructor Summary
ModifierConstructorDescriptionprotected
Tempo
(RationalDuration refDuration, Rational msecs, Rational mm) -
Method Summary
Modifier and TypeMethodDescriptionget_mm()
Return the number of beats per physical minute.get_mm
(RationalDuration newref) Return the number of beats per physical minute, when the beat changes the dedicated abstract CWN duration, but in correct proportion to the original beat.Return the physical duration of one beat.get_msecs
(RationalDuration newref) Return the physical duration of a new beat, when the beat changes the dedicated abstract CWN duration, but in correct proportion to the original beat.Return the abstract CWN duration of one beat.static Tempo
mm
(RationalDuration refDuration, int mm) Create a tempo with "mm" beats per minute, and one beat has the given "refDuration" as its logical abstract CWN duration.static Tempo
mm
(RationalDuration refDuration, Rational mm) Create a tempo with "mm" beats per minute, and one beat has the given "refDuration" as its logical abstract CWN duration.static Tempo
msecs
(RationalDuration refDuration, int msecs) Create a tempo in which a beat has the duration of "msecs" milliseconds, and one beat has the given "refDuration" as its logical abstract CWN duration.static Tempo
msecs
(RationalDuration refDuration, Rational msecs) Create a tempo in which a beat has the duration of "msecs" milliseconds, and one beat has the given "refDuration" as its logical abstract CWN duration.toString()
Returns as a String the standard notation as usual in printed sheet music, e.g.
-
Field Details
-
refDuration
-
msecs
-
mm
-
msecs_per_minute
Evident -
mm_1_4_60
-
pack
Used for parsers. -
parser
Accepts the standard notation as usual in printed sheet music, e.g. 3/8=72. -
prefixed_parser
Accepts the standard notation as usual in printed sheet music, e.g. MM3/8=72.
-
-
Constructor Details
-
Tempo
-
-
Method Details
-
mm
Create a tempo with "mm" beats per minute, and one beat has the given "refDuration" as its logical abstract CWN duration. -
mm
Create a tempo with "mm" beats per minute, and one beat has the given "refDuration" as its logical abstract CWN duration. -
msecs
Create a tempo in which a beat has the duration of "msecs" milliseconds, and one beat has the given "refDuration" as its logical abstract CWN duration. -
msecs
Create a tempo in which a beat has the duration of "msecs" milliseconds, and one beat has the given "refDuration" as its logical abstract CWN duration. -
get_mm
Return the number of beats per physical minute. -
get_msecs
Return the physical duration of one beat. -
get_refDuration
Return the abstract CWN duration of one beat. -
get_mm
Return the number of beats per physical minute, when the beat changes the dedicated abstract CWN duration, but in correct proportion to the original beat. -
get_msecs
Return the physical duration of a new beat, when the beat changes the dedicated abstract CWN duration, but in correct proportion to the original beat. -
get_msecs_per_whole
-
toString
Returns as a String the standard notation as usual in printed sheet music, e.g. 3/8=72.
-