public class Score_hkn extends Object
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.)
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 ?!?!?!
Modifier and Type | Class and Description |
---|---|
class |
Score_hkn.Expansion
An expansion is a collection of voices which contain only RelWert instead
of Haken and DoppelHaken.
|
static class |
Score_hkn.Parameters
Parameters to control the expansion process.
|
Modifier and Type | Field and Description |
---|---|
static List<RelWert> |
allMedium
An infinite list delivering
RelWert.M at every position. |
(package private) SortedMap<Integer,TpTop> |
barnum2tp
Inverse of
tp2barnum , as usual in tscore raw parsing. |
(package private) Map<Event,DoppelHaken> |
event2doppelHaken
Semantic attribute of events.
|
(package private) Map<Event,String> |
event2forceOverlap_end
Semantic attribute of events.
|
(package private) Map<Event,String> |
event2forceOverlap_start
Semantic attribute of events.
|
(package private) Map<Event,Haken> |
event2haken
Semantic attribute of events.
|
(package private) Map<Event,String> |
event2noOverlap_end
Semantic attribute of events.
|
(package private) Map<Event,String> |
event2noOverlap_start
Semantic attribute of events.
|
(package private) Map<Event,Integer> |
event2pause
Semantic attribute of events.
|
(package private) Map<Event,RelWert> |
event2relwert
Semantic attribute of events.
|
(package private) Set<Event> |
eventCanOverlapAtStart
Holds all events which start with the same RelWert as their predecssor ends.
|
protected static Modifiers |
modifiers
Control parameters for the raw tscore parsing process.
|
(package private) SimpleMessage.Sender<XMLDocumentIdentifier> |
msg
Target of all messages generated by this class.
|
(package private) MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msgr
Target of all messages generated by this class.
|
protected String |
name
FIXME DOC
|
static int |
noPauseSelected
Value returned by
getPauseIndexByIndex(List,Vox,int,int) if no
valid entry is found. |
static String |
noVoiceSelected
String value to be used instead of a voice name, iff no voice is selected
for a particular role.
|
(package private) Score_hkn.Parameters |
parameters
The control parameters for the expansion process, etc.
|
(package private) Translet.Parser<?> |
parser
Parser for relwert/haken voices AND pause voices.
|
(package private) SortedMap<Rational,Tp> |
rat2tp
Inverse of
tp2rat , as usualin tscore raw parsing. |
(package private) Map<TpTop,Integer> |
tp2barnum
Map of numeric entries in tne tsore "T" line to their text, as usual in tscore raw parsing.
|
(package private) Map<Tp,Rational> |
tp2rat
Maps all time points to rationals, als usual in tscore raw parsing.
|
(package private) Part |
tsPart
The tscore score PART to process.
|
Constructor and Description |
---|
Score_hkn(String name,
Part tsPart,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Constructor which will use the default controal
Score_hkn.Parameters . |
Score_hkn(String name,
Part tsPart,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
@Opt Score_hkn.Parameters parameters)
Constructor which will use an explicit parameter setting.
|
Modifier and Type | Method and Description |
---|---|
protected @Opt Vox |
findVoice(@Opt String s1,
boolean errorsNotWarnings)
Auxiliary 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 @Opt RelWert |
getRelWertFolge_first(Event ev)
Get the first RelWert of the entry with the given event.
|
protected RelWertFolge |
getRelWertFolge(Event ev)
Get Relwert, Haken or DoppelHaken standing with the given event.
|
void |
update()
Translate untyped tscore data into semantically defined values.
|
protected static Modifiers modifiers
protected final String name
public static final String noVoiceSelected
public static final List<RelWert> allMedium
RelWert.M
at every position.final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr
final SimpleMessage.Sender<XMLDocumentIdentifier> msg
final Part tsPart
final Score_hkn.Parameters parameters
public static final int noPauseSelected
getPauseIndexByIndex(List,Vox,int,int)
if no
valid entry is found.final Map<TpTop,Integer> tp2barnum
final SortedMap<Integer,TpTop> barnum2tp
tp2barnum
, as usual in tscore raw parsing.final Map<Event,DoppelHaken> event2doppelHaken
final Map<Event,Integer> event2pause
p0
", "p2
", "p2
", etc., with a
dynamic upper limit and increasing significance.final Map<Event,String> event2noOverlap_start
&
", what suppresses any overlap with its predecessor.final Map<Event,String> event2forceOverlap_start
~
", what enforces overlap with its predecessor.final Map<Event,String> event2noOverlap_end
'
", what suppresses any overlap with its successor.final Map<Event,String> event2forceOverlap_end
~
", what enforces overlap with its successor.final Set<Event> eventCanOverlapAtStart
final Translet.Parser<?> parser
final Map<Tp,Rational> tp2rat
public Score_hkn(String name, Part tsPart, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Score_hkn.Parameters
.ts
- the already raw-parsed time scape.
(Normally the parse result of a tscore source file.)msg
- drain of all messages.public Score_hkn(String name, Part tsPart, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, @Opt @Opt Score_hkn.Parameters parameters)
ts
- 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.@Opt protected @Opt Vox findVoice(@Opt @Opt String s1, boolean errorsNotWarnings)
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.protected int getPauseIndexByIndex(List<Tp> tps, @Opt @Opt Vox vpause, int i, int maxPause)
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.protected RelWertFolge getRelWertFolge(Event ev)
@Opt protected @Opt RelWert getRelWertFolge_first(Event ev)
public void update()
event2relwert
,
event2haken
, event2doppelHaken
,
and additionally "event2(no/force)overlap_(start/end)".
tp2rat
and rat2tp
.)
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.