Package eu.bandm.music.entities
Class Metric2Duration
java.lang.Object
eu.bandm.music.entities.Metric2Duration
Lists all note values which may be used at a certain metric position
in a bar.
Some things are quite natural and have a canonical decision:
E.g. normally you do not want a half note starting one-eights after the
start of the bar. A doubly-dotted half note but may be permitted.
In a four-quarter bar it is a matter of taste whether you allow a
dotted quarter on the "two" beat (one quarter after the start of the bar).
And whether you allow a syncopized half note or prefer to write it
using a tie.
So there are some default methods for filling a Metric2Duration
according to some standards. You are free to create a modifiable
clone of these and adjust them to your needs.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescription(package private) final Metric2Duration.TreeMultimap<Rational,
Rational> (package private) final Rational
static final Rational
static final Metric2Duration
static final Metric2Duration
static final Metric2Duration
static final Metric2Duration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int posNum, int posDen, int durNum, int durDen) Allows at a certain position a certain duration.Adds for certain positions a set of allowed durations each.Allows at a certain position a certain duration.addAllDoubleAlignedDotted
(Rational baseValue, int maxDotCount) Adds all dotted versions up to the given dot count of the given base value to all metric positions where it either starts or ends on an integer multiple of its double value.addIncreasingDoubleAlignedDotted
(Rational startValue, int startDotCount) getLongestAllowed
(Rational pos, Rational dur) returns null iff no lower limit at this metric position.
-
Field Details
-
ONE_HALF
-
barLength
-
allowed
-
standard_1_8
-
standard_1_4
-
standard_2_4
-
standard_4_4
-
-
Constructor Details
-
Metric2Duration
-
-
Method Details
-
getAllowed
-
getLongestAllowed
returns null iff no lower limit at this metric position. On caller level, this is mostly an error! -
add
Adds for certain positions a set of allowed durations each. -
add
Allows at a certain position a certain duration. -
add
Allows at a certain position a certain duration. -
addAllDoubleAlignedDotted
Adds all dotted versions up to the given dot count of the given base value to all metric positions where it either starts or ends on an integer multiple of its double value. E.g.quarter 0 . . . 1 . . . 2 . . . 3 . . . | starts of quarter without dots: X X X X starts of dotted quarter: X X X X starts of double dotted quarter: X X X X starts of dotted eighth: X X X X X X X X
-
addIncreasingDoubleAlignedDotted
-