Class Score_hkn
- Direct Known Subclasses:
Score_hkn_sig_v00
,Score_hkn_svg_v00
,Score_hkn_vla_v00
,Score_hkn_vox_v00
Usage:
The different classes for different back-ends are derived from this class. An instance is created with an already raw-parsed
TimeScape
, and
(optionally) a Score_hkn.Parameters
collection.
Then update()
is called, which parses all contained voices.
(TpTops are integer with arbitrary subdivisions, and stand for "K-measure-numbers",
with no relation to front-end timing, but possibly printed in the F-score as comments.)
Example of a K-Score
T 1 ! ! 2 VOX v0 p2 p1 p2 VOX v1 M O MU OMO VOX v2 MO 'OM U MUUMVoice "v0" is a voice containing only "additional pauses" to support the reception of the intended groupings. (This will be done additionally to and outside of the Haken expansion process.)
Voices "v1" and "v2" are a "Haken-Voices" = "K-Voices". They contain arbitrary sequences of
RelWert
, Haken
and DoppelHaken
.
(= relative values, hooks and double hooks).
They will be selected to control particular parameters when translating to an
executable V-score.
First step is to create an Score_hkn.Expansion
of a selection of voices.
This is a transformed score where the voices contain RelWert only, at each K-Timepoint
in the union of the selected voices.
For example, the score above can be expanded to
T 1 ! ! . 2 VOX v0 p2 p1 p2 VOX v1 M O M O U O U M U O VOX v2 M U O O U M U M O O U U O O MThe rules for this expansion can become complicated and can be further modified by translation parameters and operators in the source text. (E.g. the apostrophe in v2 above means: "do not overlap"; contrarily a tilde means "force overlap".) For the details see the project documentation (in German).
All further processing is specific to the interpretation of the K-score,
as realized by the subclasses of this class.
It operates only on Score_hkn.Expansion.tps
and Score_hkn.Expansion.expanded
, which
run in parallel (plus possibly a dedicated "Pause" voice, which assigns articulation
pauses to a subset of the time points).
Additionally a voice may contain "pause" events, and the specialized process
may select a particular voice to translate the contained pause events to some
foreground temporal articulation/gap.
(Pauses are meant to occur BEFORE the sound event at the same K-Timepoint.)
FIXME ATTENTION do not mix pause events with haken events !? is currently not checked
by the parser ?!?!?!
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
An expansion is a collection of voices which contain only RelWert instead of Haken and DoppelHaken.static class
Parameters to control the expansion process. -
Field Summary
Modifier and TypeFieldDescriptionAn infinite list deliveringRelWert.M
at every position.Inverse oftp2barnum
, as usual in tscore raw parsing.(package private) final Map<Event,
DoppelHaken> Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Semantic attribute of events.Holds all events which start with the same RelWert as their predecssor ends.protected static Modifiers
Control parameters for the raw tscore parsing process.(package private) final SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier>
Target of all messages generated by this class.(package private) final MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>>
Target of all messages generated by this class.protected final String
FIXME DOCstatic final int
Value returned bygetPauseIndexByIndex(List,Vox,int,int)
if no valid entry is found.static final String
String value to be used instead of a voice name, iff no voice is selected for a particular role.(package private) final Score_hkn.Parameters
The control parameters for the expansion process, etc.(package private) final Translet.Parser<?>
Parser for relwert/haken voices AND pause voices.Inverse oftp2rat
, as usual in tscore raw parsing.Map of numeric entries in tne tsore "T" line to their text, as usual in tscore raw parsing.Maps all time points to rationals, als usual in tscore raw parsing.(package private) final Part
The tscore score PART to process. -
Constructor Summary
ConstructorDescriptionScore_hkn
(String name, Part tsPart, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Constructor which will use the default controalScore_hkn.Parameters
.Score_hkn
(String name, Part tsPart, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, @Opt Score_hkn.Parameters parameters) Constructor which will use an explicit parameter setting. -
Method Summary
Modifier and TypeMethodDescriptionAuxiliary functions for sub-classes=specialized formats, to find a voice for a particular purpose by name.protected int
getPauseIndexByIndex
(List<Tp> tps, @Opt Vox vpause, int i, int maxPause) Valid pauses are numbered from 0 to maxPause, with increasing significance.protected RelWertFolge
getRelWertFolge
(Event ev) Get Relwert, Haken or DoppelHaken standing with the given event.Get the first RelWert of the entry with the given event.void
update()
Translate untyped tscore data into semantically defined values.
-
Field Details
-
modifiers
Control parameters for the raw tscore parsing process. -
name
FIXME DOC -
noVoiceSelected
String value to be used instead of a voice name, iff no voice is selected for a particular role.- See Also:
-
allMedium
An infinite list deliveringRelWert.M
at every position. -
msgr
Target of all messages generated by this class. -
msg
Target of all messages generated by this class. -
tsPart
The tscore score PART to process. Normally the result of parsing a tscore source file. -
parameters
The control parameters for the expansion process, etc. -
noPauseSelected
public static final int noPauseSelectedValue returned bygetPauseIndexByIndex(List,Vox,int,int)
if no valid entry is found.- See Also:
-
tp2barnum
Map of numeric entries in tne tsore "T" line to their text, as usual in tscore raw parsing. -
barnum2tp
Inverse oftp2barnum
, as usual in tscore raw parsing. -
event2haken
Semantic attribute of events. -
event2doppelHaken
Semantic attribute of events. -
event2relwert
Semantic attribute of events. -
event2pause
Semantic attribute of events. Pauses are contained in dedicated voices and notated as "p0
", "p2
", "p2
", etc., with a dynamic upper limit and increasing significance. -
event2noOverlap_start
Semantic attribute of events. Means that the event source text starts with an apostrophe "&
", what suppresses any overlap with its predecessor. -
event2forceOverlap_start
Semantic attribute of events. Means that the event source text starts with a tilde "~
", what enforces overlap with its predecessor. -
event2noOverlap_end
Semantic attribute of events. Means that the event source text ends with an apostrophe "'
", what suppresses any overlap with its successor. -
event2forceOverlap_end
Semantic attribute of events. Means that the event source text ends with a tilde "~
", what enforces overlap with its successor. -
eventCanOverlapAtStart
Holds all events which start with the same RelWert as their predecssor ends. -
parser
Parser for relwert/haken voices AND pause voices. Both shall not be mixed. -
tp2rat
Maps all time points to rationals, als usual in tscore raw parsing. (The rational time values of these K-Voices have no significance beyond their sequential order.) -
rat2tp
Inverse oftp2rat
, as usual in tscore raw parsing.
-
-
Constructor Details
-
Score_hkn
public Score_hkn(String name, Part tsPart, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Constructor which will use the default controalScore_hkn.Parameters
.- Parameters:
tsPart
- the already raw-parsed time scape. (Normally the parse result of a tscore source file.)msg
- drain of all messages.
-
Score_hkn
public Score_hkn(String name, Part tsPart, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, @Opt @Opt Score_hkn.Parameters parameters) Constructor which will use an explicit parameter setting.- Parameters:
tsPart
- the already raw-parsed time scape. (Normally the result of parsing a tscore source file.)msg
- drain of all messages.parameters
- to control the parsing and expansion process.
-
-
Method Details
-
findVoice
Auxiliary functions for sub-classes=specialized formats, to find a voice for a particular purpose by name. If not there, write error or warning to global messagereceiver.- Parameters:
s1
- name of the voice. If ==null or ==noVoiceSelected
, then return null.errorsNotWarnings
- whether not finding a name (!=null and != noVoiceSelected) will raise an error, not only a warning.
-
getPauseIndexByIndex
Valid pauses are numbered from 0 to maxPause, with increasing significance.- Returns:
noPauseSelected
(==-1) for not defined pauses and issue error message for too large index. The parser syntax already enyures that pause nubmers are non-negative.
-
getRelWertFolge
Get Relwert, Haken or DoppelHaken standing with the given event. -
getRelWertFolge_first
Get the first RelWert of the entry with the given event. -
update
public void update()Translate untyped tscore data into semantically defined values.- Parse all voices into the maps
event2relwert
,event2haken
,event2doppelHaken
, and additionally "event2(no/force)overlap_(start/end)". - Calculate time instances for ALL tps into two global caches
(forward and backward,
tp2rat
andrat2tp
.) TpTops are integer constants with arbitrary subdivisions, and stand for "abstract bar numbers", not for any concrete time domain or front-end measures. All Tps are linked to a Rational.
- Parse all voices into the maps
-