public abstract class MetricSplitter.Result.WriteOut extends Object
(int,DottedBaseDuration,Rational,boolean,boolean,boolean)
open_proportion(Rational)
and (Rational)
must be implemented by the caller, an instance must be constructed "inside" the
MetricSplit, and then process()
must be called.
Modifier and Type | Field and Description |
---|---|
(package private) Stack<MetricTree.EssentialBracket> |
bracketStack
Keeps track of n-plet-brackets currently open.
|
(package private) PrimeFactors |
currentFactors |
(package private) Rational |
currentProportion |
(package private) Stack<PrimeFactors> |
factorsStack
Keeps track of the accumulated n-plet-brackets' denominators' prime factors.
|
(package private) Stack<Rational> |
proportionStack
Keeps track of the accumulated proportion.
|
Constructor and Description |
---|
WriteOut() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close_proportion(Rational proportion)
Close an open tuplet bracket.
|
abstract void |
open_proportion(Rational proportion)
Start a new tuplet bracket.
|
void |
process()
Loop through all events in this MetricSplit, and call the call-back method
(int,DottedBaseDuration,Rational,boolean,boolean,boolean)
for every
single note symbol (/pause symbol) resulting from the preceding
notational split-and-merge process. |
protected void |
testCloseBrackets(Rational when)
Called for each node to close essential n-plet-brackets, iff their
end-of-duration is reached.
|
protected void |
testOpenBrackets(MetricTree start)
Called for each node to open essential n-plet-brackets, iff necessary
for the following duration values.
|
abstract void |
writeOut(int index,
RationalDuration.DottedBaseDuration symbol,
Rational proportion,
StemEnd beams,
boolean isSound,
boolean isFirst,
boolean isLast)
Write out one symbol of an event.
|
protected void |
x_writeOut(int index,
List<RationalDuration.DottedBaseDuration> durs,
Rational currentProportion,
boolean isSound,
boolean isFirst,
boolean isLast)
A wrapper which calls the real "writeout()" for a list of
durations, which come from a cache.
|
Rational currentProportion
PrimeFactors currentFactors
final Stack<MetricTree.EssentialBracket> bracketStack
final Stack<PrimeFactors> factorsStack
protected void testCloseBrackets(Rational when)
protected void testOpenBrackets(MetricTree start)
public void process()
(int,DottedBaseDuration,Rational,boolean,boolean,boolean)
for every
single note symbol (/pause symbol) resulting from the preceding
notational split-and-merge process.
Interspered are the calls open_proportion(Rational)
and
(Rational)
for proportions/n-plet-brackets in the correct nesting sequence.protected void x_writeOut(int index, List<RationalDuration.DottedBaseDuration> durs, Rational currentProportion, boolean isSound, boolean isFirst, boolean isLast)
public abstract void writeOut(int index, RationalDuration.DottedBaseDuration symbol, Rational proportion, StemEnd beams, boolean isSound, boolean isFirst, boolean isLast)
index
- the index into the original event listdotted
- the (possibly dotted) symbol to printproportion
- the currently effective proportion (for convenience!)isSound
- whether the symbol is sound and not pause (for convenience)isFirst
- whether the symbol is the very first in the eventisLast
- whether the symbol is the very last in the eventpublic abstract void open_proportion(Rational proportion)
MetricTree.EssentialBracket
class.public abstract void close_proportion(Rational proportion)
MetricTree.EssentialBracket
class.