public abstract class MetricConsumer.WriteOut extends Object
MetricConsumer.getNext()
call.
The call-back methods must be overriden by the user.
The signatures are the same as with MSplitter.Result.WriteOut
.
One can get the corresponding instance of the MSplitter.Result
directly by MetricConsumer.getResult()
, but this is seldom sensible.
Only with this class the index and flag values correctly reflect the
cross-measure-bar situation.
myMetricConsumer.getNext(); myMetricConsumer.new WriteOut(){ &at;Override public void open_proportion(final Rational p){ // user code } &at;Override public void close_proportion(final Rational p){ // user code } &at;Override public void writeOut(final int index, final MTree node, final DottedBaseDuration duration, final Rational prop, final StemEnd beams, final boolean isSound, final boolean isFirst, final boolean isLast){ // user code } }.process()
Modifier and Type | Field and Description |
---|---|
(package private) MSplitter.Result.WriteOut |
msw |
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 result and call the call-back method
writeOut(int,MTree,RationalDuration.DottedBaseDuration,Rational,StemEnd,boolean,boolean,boolean)
for every single note symbol (/pause symbol) resulting from the preceding
notational split-and-merge process. |
abstract void |
writeOut(int index,
MTree node,
RationalDuration.DottedBaseDuration symbol,
Rational proportion,
StemEnd beams,
boolean isSound,
boolean isFirst,
boolean isLast)
Write out one symbol of an event.
|
final MSplitter.Result.WriteOut msw
public abstract void writeOut(int index, MTree node, RationalDuration.DottedBaseDuration symbol, Rational proportion, StemEnd beams, boolean isSound, boolean isFirst, boolean isLast)
index
- the index into the original event listnode
- the MTree node (for accessing "weight" etc.)symbol
- the (possibly dotted) symbol to printproportion
- the currently effective proportion (for convenience!)beams
- describes left and right beams and beamlets / flagsisSound
- 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)
EssentialBracket
class.public abstract void close_proportion(Rational proportion)
EssentialBracket
class.public void process()
writeOut(int,MTree,RationalDuration.DottedBaseDuration,Rational,StemEnd,boolean,boolean,boolean)
for every single note symbol (/pause symbol) resulting from the preceding
notational split-and-merge process.
Interspered are the calls to open_proportion(Rational)
and
close_proportion(Rational)
for proportions/n-plet-brackets in the correct nesting order.