public class Score_cwn extends Object
TpTop
top level time points are labeled mostly
with *integral* numbers, in continuously increasing order. These can
be seen as "measure numbers", but may be based anywhere.
Every segment between two adjacent top level Tp labels is meant as
one musical measure. Most measures are "complete", but there may be "incomplete"
measures, eg. for upbeats and for to carry repetition bars.
MetricTree
.
Modifier and Type | Field and Description |
---|---|
static Function3<Comparator<? super BigDecimal>,BigDecimal,BigDecimal,String> |
checkDistance
Checks that two consecutive time points are (a) strictly increasing, but (b)
not more than "1.0" distant.
|
(package private) String |
clefPrefix
Prefix in the source text for a clef indication.
|
SortedMap<BigDecimal,TpTop> |
decimal2tpTop
Maps bar numbers / measure numbers to tscore top-leve time points.
|
(package private) Map<Event,Artikulation> |
event2artikulation
Artikulation parsed from the param track called
paramname_articulation . |
Map<Event,ClefUsage> |
event2clefUsage
Maps events of sounding voices to a clef change, from param track .
|
(package private) Map<Event,Tp> |
event2endtp
Maps events to their end time point.
|
(package private) Map<Event,FunctionalKey> |
event2key
Maps events of sounding voices to a key change, from param track .
|
Map<Event,String> |
event2lowerText
Additional text to be printed below the rendering of a note.
|
(package private) Map<Event,Ornament> |
event2ornamentation
Ornamentation parsed from the param track called
paramname_articulation . |
Map<Event,PitchAndOctave<OctaveRegister,FunctionalPitchModOctave>> |
event2pitch
Maps voice events to one nominal pitch.
|
(package private) Map<Event,Tempo> |
event2tempo
Maps events from the global "M" voice to a tempo indication.
|
Map<Event,String> |
event2upperText
Additional text to be printed above the rendering of a note.
|
Map<Event,String> |
event2verba
Maps events of a sounding voice to a lyric syllable.
|
(package private) Map<Event,String> |
eventHasCautionaryAccidental
Whether a cautionary accidental is requested explicitly by the tscore source,
in the param track called
paramname_nota . |
(package private) Map<Event,String> |
eventHasFullAccidental
Whether an accidental is requested explicitly by the tscore source,
in the param track called
paramname_nota . |
TpTop |
firstTp
The very first time point of the score.
|
Map<Event,String> |
holds
Marks voice events as being a "hold", which is an unaltered prolongation of the
preceding event
|
(package private) String |
language
Human language in which the tscore input will be interpreted.
|
TpTop |
lastTp
The very last time point of the score.
|
@Opt Rational |
lastTpTop_rat
The rational time point of the very last top level tscore time point.
|
(package private) Multimap<String,EventSet> |
legatos
Event sets standing for legato arcs, parsed from the param track called
paramname_articulation . |
MeasureCollector<MetrumName> |
measures
Collector for the meter names and duration indications in the main metric voice "M".
|
static Modifiers |
modifiers
Modifiers controlling the parsing process.
|
(package private) Multimap<String,EventSet> |
motifs
Groups of events collected to represent
"analytical brackets" for motifs, etc.
|
(package private) SimpleMessage.Sender<XMLDocumentIdentifier> |
msg
Only for conveniently construction messages and sending them to
msgr |
(package private) MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msgr
The drain for all messags.
|
protected MTreeCollector<MetrumName> |
mTreeCollector
Collector for the meter specifications in the main meter voice (mandatory)
and in sounding voice (optional).
|
static String |
paramname_articulation
Name of the parameter track of a normal voice carrying articulation marks.
|
static String |
paramname_metric
Metric specifications are the main events in the global metric voice.
|
static String |
paramname_mtree
Name of the parameter track of the main metric voice with metric tree formulas.
|
static String |
paramname_nota
Name of the parameter track of a normal voice carrying notation (meta-) information.
|
static String |
paramname_verba
Name of the parameter track of a normal voice carrying "lyrics" / text syllables.
|
static Translet.Parser<BigDecimal> |
parse_barNumber
Parser for measure numbers accept a non-negative integer, and maybe a decimal point
with a fractional part.
|
Part |
part
The score data as (in most cases) parsed by tscore.
|
Map<Event,String> |
pause
Marks voice events as being a pause.
|
Multimap<Rational,Tp> |
rat2tp
Inverse of
tp2rat . |
Map<Tp,Rational> |
tp2rat
Maps all tscore time points to rational numbers which correspond to the musical
time relative to the start of the very first event.
|
(package private) Map<TpTop,BigDecimal> |
tpTop2decimal
Inverse of
decimal2tpTop . |
Vox |
voiceMetric
The global voice vor metric, tempo, and global expression information.
|
static String |
voicename_metric
The name of the mandatory global "metric" voice.
|
Constructor and Description |
---|
Score_cwn(Part part,
String lang,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
Service providing main factory method for converting a
particular PART of a TimeScape.
|
Score_cwn(TimeScape ts,
String lang,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
Process THE ONE AND ONLY part of the TimeScape.
|
Modifier and Type | Method and Description |
---|---|
void |
addCompleteMeasure(int den,
int nom,
@Opt MTreeSpec mt)
Append at the end of all measure specifications a new measure with the given
name (looking like "den/nom") and MTree specification.
|
void |
addCompleteMeasure(MetrumName name,
@Opt MTreeSpec mt)
Append at the end of all measure specifications a new measure with the given
name (looking like "den/nom") and MTree specification.
|
void |
dumpVoice(PrintStream ps,
Vox voice)
Debugging print which prints only the time point and the pitch, if it is not
the metric voice.
|
Tp |
makeTp(Rational when,
Location<XMLDocumentIdentifier> origLoc)
Add a new time point at the given rational time value, if no such already exists.
|
static Map<String,Score_cwn> |
multipleParts(TimeScape ts,
String lang,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
Service providing main factory method for converting all
"PART" sections in the given tscore input Timescape.
|
int |
normalizeEvents_midi_PPQ(Vox voice,
boolean mergePauses,
List<Event> events,
List<QualifiedRational> evStarts,
List<Boolean> repeats)
Execute
normalizeEvents(Vox,boolean,List,List,List) , but
return the lcm of all duration numerators in the form required for
Midi "Parts per quarter". |
PrimeFactors |
normalizeEvents(Vox voice,
boolean mergePauses,
List<Event> events,
List<QualifiedRational> evStarts,
List<Boolean> repeats)
Step through the voice, remove "hold" symbols by the prolongating the
preceding (sounding) event, merge adjacent "pause" events, and calculate the
required sub-division of a quarter for the midi realization of all.
|
void |
update()
Translate untyped tscore data into semantically sensible
"common western notation", and verify that all constraints are met.
|
final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr
final SimpleMessage.Sender<XMLDocumentIdentifier> msg
msgr
public final Part part
final String language
public static final Modifiers modifiers
public static final String voicename_metric
public static final String paramname_metric
Event.main_parameter_name
.public static final String paramname_mtree
public static final String paramname_articulation
public static final String paramname_nota
public static final String paramname_verba
public static final Translet.Parser<BigDecimal> parse_barNumber
public static final Function3<Comparator<? super BigDecimal>,BigDecimal,BigDecimal,String> checkDistance
public Vox voiceMetric
voicename_metric
.public final SortedMap<BigDecimal,TpTop> decimal2tpTop
final Map<TpTop,BigDecimal> tpTop2decimal
decimal2tpTop
.public final Map<Tp,Rational> tp2rat
public TpTop firstTp
public TpTop lastTp
@Opt public @Opt Rational lastTpTop_rat
tp2rat
.final Map<Event,Tempo> event2tempo
public final Map<Event,String> holds
public final Map<Event,PitchAndOctave<OctaveRegister,FunctionalPitchModOctave>> event2pitch
final Map<Event,String> eventHasFullAccidental
paramname_nota
.
The terminal symbol is fixed to "!
", which is inspired by lilypond.
FIXME should be for PITCH, not for EVENT!! Current solution ASSUMES each Event has only ONE(1) Pitch!!
final Map<Event,String> eventHasCautionaryAccidental
paramname_nota
.
The terminal symbol is fixed to "?
", which is inspired by lilypond.
FIXME should be for PITCH, not for EVENT!! Current solution ASSUMES each Event has only ONE(1) Pitch!!
final Map<Event,Artikulation> event2artikulation
paramname_articulation
.final Map<Event,Ornament> event2ornamentation
paramname_articulation
.final Multimap<String,EventSet> legatos
paramname_articulation
.final String clefPrefix
public final Map<Event,ClefUsage> event2clefUsage
final Map<Event,FunctionalKey> event2key
final Multimap<String,EventSet> motifs
paramname_nota
.public final Map<Event,String> event2lowerText
public final Map<Event,String> event2upperText
public final Map<Event,String> event2verba
public final MeasureCollector<MetrumName> measures
protected MTreeCollector<MetrumName> mTreeCollector
public Score_cwn(Part part, String lang, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
lang
- the human language to interpret pitch classes etc.public Score_cwn(TimeScape ts, String lang, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
public static Map<String,Score_cwn> multipleParts(TimeScape ts, String lang, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr)
lang
- the human language to interpret pitch classes etc.public void update()
public PrimeFactors normalizeEvents(Vox voice, boolean mergePauses, List<Event> events, List<QualifiedRational> evStarts, List<Boolean> repeats)
(currently 20180310 only used in Cwn_to_{lilypond,musicxml} !! FIXME make idempotent!
FIXME merge pause only with preceding pause if not attributed (provide
predicate as functional arg)
voice
- the voice to process (the time points to step through the voice
are in the global field rat2tp
.mergePauses
- whether adjacent pauses shall be merged.events
- OUTPUT parameter: list of all filtered eventsevStarts
- OUTPUT parameter: list of the starting time points of the filtered eventsrepeats
- OUTPUT parameter: whether the event has the same pitch as its predecessorrepeats
- shows whether the NEXT event has the same pitch.
WIRD NICHT UNBEDINGT GEBRRAUCHT / WIEDER RAUS ??? FIXMEpublic int normalizeEvents_midi_PPQ(Vox voice, boolean mergePauses, List<Event> events, List<QualifiedRational> evStarts, List<Boolean> repeats)
normalizeEvents(Vox,boolean,List,List,List)
, but
return the lcm of all duration numerators in the form required for
Midi "Parts per quarter".public void dumpVoice(PrintStream ps, Vox voice)
public Tp makeTp(Rational when, @Opt Location<XMLDocumentIdentifier> origLoc)
public void addCompleteMeasure(int den, int nom, @Opt @Opt MTreeSpec mt)
public void addCompleteMeasure(MetrumName name, @Opt @Opt MTreeSpec mt)
MeasureCollector.addCompleteMeasure(MetrumIndication)
.