Package eu.bandm.music.entities
Class MTree.EssentialBracket
java.lang.Object
eu.bandm.music.entities.MTree.EssentialBracket
- Enclosing class:
- MTree
Models a proportional bracket, spanning note heads, which is unavoidable due to
the prime factors of the denominators of the duration values.
ATTENTION: Is (currently) only determined by its duration factor, which is
a RATIONAL! So all visual appearances not identic with a normalized rational, like
"
|-- 6:8--|
", cannot be realized.-
Field Summary
Modifier and TypeFieldDescriptionprotected final Rational
Proportion introduced by this very bracket.protected final boolean
Whether this bracket is also for convenience = realizes an odd numerator in its duration factor.protected final PrimeFactors
Convencience cache, all prime factors of the denominator, without powers of two.protected final Rational
Proportion to be applied to all nodes below this bracket.protected final Rational
End time point (relative to 0.0 as start point of the measure(=top-level node), i.e.protected @Opt MTree.EssentialBracket
The next higher (relevant, non-vanishing) bracket covering this node.protected final boolean
Whether this bracket spans only one single node.protected final boolean
Whether the bracket vanishes iff subnodes are printed. -
Constructor Summary
ConstructorDescriptionEssentialBracket
(@Opt MTree.EssentialBracket predec, int bracketDenominator, int bracketNumerator, Rational endTime, boolean singleton, boolean vanishing) Effekt of an EB: multiply the written duration (=note symbols=note heads, flags etc.) by proportion n/d to get the meant duration.EssentialBracket
(@Opt MTree.EssentialBracket predec, int bracketDenominator, MTree.CheckedParameters parameters, Rational endTime, boolean singleton, boolean vanishing) Effekt of an EB: multiply the written duration (=note symbols=note heads, flags etc.) by proportion n/d to get the meant duration. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
Give a symbolic text representation for debugging.withVanishing
(boolean newVanishing) Create a copy with only "vanishing" set to the given value.
-
Field Details
-
predec
The next higher (relevant, non-vanishing) bracket covering this node. -
effectiveProportion
Proportion to be applied to all nodes below this bracket. Is the product ofbracketProportion
of this bracket and all brackets atop. All notated time value symbols (note heads, flags etc.) must be multiplied by this proportion to get the intended duration value. Vanishing brackets do only count for the immediately spanned (single) node, thus are dropped from the calculation for all DEEPER brackets. -
bracketProportion
Proportion introduced by this very bracket. (For the effect seeeffectiveProportion
.) -
endTime
End time point (relative to 0.0 as start point of the measure(=top-level node), i.e. relative to the start point of all nodes. -
singleton
protected final boolean singletonWhether this bracket spans only one single node. (In very modern notation styles, like "1/4+1/6"). -
convenient
protected final boolean convenientWhether this bracket is also for convenience = realizes an odd numerator in its duration factor. -
vanishing
protected final boolean vanishingWhether the bracket vanishes iff subnodes are printed. -
effectiveDenomFactors
Convencience cache, all prime factors of the denominator, without powers of two.
-
-
Constructor Details
-
EssentialBracket
public EssentialBracket(@Opt @Opt MTree.EssentialBracket predec, int bracketDenominator, int bracketNumerator, Rational endTime, boolean singleton, boolean vanishing) Effekt of an EB: multiply the written duration (=note symbols=note heads, flags etc.) by proportion n/d to get the meant duration. The modern front-end notation will show a bracket with "d:n" = "play d notes instead of n".d and n are given explicity, n must not be even when calling this special constructor. (For more simple EBs with only a clean power of two as n use
EssentialBracket(EssentialBracket,int,CheckedParameters,Rational,boolean,boolean)
.) So this constructor delivers an "essential" bracket, which is "also convenient", like "|-5:7-|".- Parameters:
predec
- the next higher (relevant, non-vanishing) bracket covering this node.bracketDenominator
- the value "d", i.e. the divider of the durations.bracketNumerator
- the value "n", i.e. the numerator of the rational giving the proportion.endTime
- position in the measure where this bracket ends.singleton
- whether this bracket spans only one single node (in very modern notation styles, like "1/4+1/6").
-
EssentialBracket
public EssentialBracket(@Opt @Opt MTree.EssentialBracket predec, int bracketDenominator, MTree.CheckedParameters parameters, Rational endTime, boolean singleton, boolean vanishing) Effekt of an EB: multiply the written duration (=note symbols=note heads, flags etc.) by proportion n/d to get the meant duration. The modern front-end notation will show a bracket with "d:n" = "play d notes instead of n".The numerator "n" of the proportion is set to some near power of two, as specified by
MetricParameters.MTreeParameters.proportiones_lentiores
andMTree.numeratorByMenoList(int, java.util.Set<java.lang.Integer>)
.- Parameters:
predec
- the next higher (relevant, non-vanishing) bracket covering this node.bracketDenominator
- the value "d", i.e. the divider of the durations.parameters
- needed to invent the numerator of the bracket's factorendTime
- position in the measure where this bracket ends.singleton
- whether this bracket spans only one single node (in very modern notation styles).
-
-
Method Details