Class TabstaffAccordic
(Planned backends are: XML encoding (MISSING FIXME), lilypond tabs, Midi encoding (MISSING FIXME), and dynamic SVG proof rendering )
The tscore input is intended to realize the *semantic contents*. Very different renderings ("Tab+", "Staff+", "Charts+") can be derived from such a model. The tscore input looks like...
T 1 2 3 4 VOX conf Cmaj&diatonic&fixed&horizontal&thirds VOX l1 % .12 -23 -23 %-. % VOX l2 % 115 % VOX r 552&663 -66. %>4 % view β
The name of the "conf" voice is fixed.
There must be an event at thw very first timepoint, giving orientation,
tonal key, subset, and adjacency).
Only then the functional key changes, the parameter layoutTransition is required.
FIXME Currently the tonal key can only be given in the GERMAN lanugage.
FIXME Currently only the very first event is evaluated (for orientation,
tonal mode, subset, adjacency). FIXME subset and orientation are NOT YET considered
The time points follow the standard strategy of metrical sub-divisions.
This includes dotted notation.
In this preliminary demo version the meter is fixed to 4/4.
The reserved voice name "conf" contains the switches of the global configuration
parameters, as an unordered list of values of optional alternatives.
Other voice names start with "l" or "r" for left and right hand.
Each event in (the main parameter track of) such a voice is a triple of
x and y cooordinate of the switch (1-based) plus the finger indication.
The latter is optional. The operator &
joins such triples. It is
optional if the fingering is not left out.
("123&45
" is the same as "12345
".)
The source text of "x" and "y" goes from 1 to 8, "finger" from 1 to 5.
(The finger value follows the piano definition; an internal value of "0"
means "unspecified".)
The tuples forming one event are stored and evaluated as a sorted list:
A hold "-" at a particular position (="slot") means to hold the key and finger as
defined in the previous event tuple; a pause "%" means to release this key;
any explicit triple means pressing the specified key, even if it is
the same combination of integers.
The input sequence ">2
" means a silent finger change to finger "2" on
the button defined by the same slot of a preceding event.
Pressing one button with more than one finger, and pressing more than one key with only one finger, are both currently NOT part of the model.
Silent finger changes between left and right hand are currentyl NOT part of the model.
The clefs "A", "AB", "B", "α", "β", etc do NOT appear in the model input.
The "view" parameter tracks (NOT YET DEFINED FIXME) influences the renderings and can contain such clef indications.
This demo version generates an XML encoding (FIXME MISSING) and a dynamic SVG rendering.
Please see the examples for details.
-
Field Summary
Modifier and TypeFieldDescription(package private) float
(package private) Vox
static final String
final SortedMap<BigDecimal,
TpTop> (package private) Map<Event,
Tabstaff.distance> Total map from cooked events to duration.Total map from cooked events.Total map from cooked events.(package private) Map<Event,
FunctionalKey> Total map from cooked events.(package private) Map<Event,
Tabstaff.layoutTransition> (package private) Map<Event,
Tabstaff.orientation> Total map from cooked events.(package private) Map<Event,
Tabstaff.subset> Total map from cooked events.Total map from cooked events.(package private) final int[]
static final int
Highest column index on the standard TUI devicestatic final int
Highest row index on the standard TUI device(package private) final Translet.Parser
static final int
Lowest column index on the standard TUI device(package private) final int[]
static final int
Lowest row index on the standard TUI devicestatic final Modifiers
Modifiers controlling the parsing process.(package private) final SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier>
For to conveniently construct messages and send them tomsgr
and counter.(package private) final MessageCounter
Counter of message kinds.(package private) final MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>>
Receiver of error/log messages.static final int
(package private) final Translet.Parser
Parser for events with pauses and prolongation.protected final Part
The score data as parsed by tscore.Inverse oftp2rat
.(package private) final Map<TpTop,
BigDecimal> Inverse ofdecimal2tpTop
. -
Constructor Summary
ConstructorDescriptionTabstaffAccordic
(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msgr) Construct data for one particularPart
of a tscore TimeScape. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Stand-alone application, translates input file "arg[0]" into multiple static SVGs, one dynamic SVG, and one tabular SVBprotected void
Translate the event data for the given voice into the internal "cooked" format.void
update()
Translate untyped tscore data into semantically sensible data, indexed by events.void
writeToDynamicSVG
(File file) Only the very first event in voc 'conf' is evaluated, and only w.r.t.
-
Field Details
-
minrow
public static final int minrowLowest row index on the standard TUI device- See Also:
-
maxrow
public static final int maxrowHighest row index on the standard TUI device- See Also:
-
mincol
public static final int mincolLowest column index on the standard TUI device- See Also:
-
maxcol
public static final int maxcolHighest column index on the standard TUI device- See Also:
-
msgr
Receiver of error/log messages. -
msgCount
Counter of message kinds. -
msg
For to conveniently construct messages and send them tomsgr
and counter. -
part
The score data as parsed by tscore. -
modifiers
Modifiers controlling the parsing process. -
tp2rat
-
rat2tp
Inverse oftp2rat
. -
lastTpTop_rat
-
lastTp
-
firstTpTop_rat
-
firstTp
-
decimal2tpTop
-
tpTop2decimal
Inverse ofdecimal2tpTop
. -
event2orientation
Map<Event,Tabstaff.orientation> event2orientation -
event2distance
Map<Event,Tabstaff.distance> event2distance -
event2subset
Map<Event,Tabstaff.subset> event2subset -
event2layoutTransition
Map<Event,Tabstaff.layoutTransition> event2layoutTransition -
event2functionalKey
Map<Event,FunctionalKey> event2functionalKey -
microLayout
-
event2duration
Total map from cooked events to duration. -
event2start
Total map from cooked events. -
event2endpos
Total map from cooked events. -
event2hasAttack
Total map from cooked events. -
event2x
Total map from cooked events. -
event2y
Total map from cooked events. -
event2finger
Total map from cooked events. -
hold
-
pause
-
keys
-
configurationVoiceName
- See Also:
-
configurationVoice
Vox configurationVoice -
normalizedEvents
-
NOFINGER
public static final int NOFINGER- See Also:
-
parser
Parser for events with pauses and prolongation. -
articulationDistance
float articulationDistance -
majorMode
final int[] majorMode -
minorMode
final int[] minorMode
-
-
Constructor Details
-
TabstaffAccordic
public TabstaffAccordic(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msgr)
-
-
Method Details
-
fingerchange
-
normalize
Translate the event data for the given voice into the internal "cooked" format. Holds and pauses are considered, and the end time points are set. The "raw" events have lists of Triples as their values. The "cooked" events are stored per voice innormalizedEvents
. Their data is stored into the mapsevent2start
,event2duration
,event2endpos
,event2hasAttack
,event2x
,event2y
,event2finger
(optional, if finger is given).A typical translation looks like
T 1 2 VOX r 111&223 >2223 -&- - x 1 2 1 2 y 1 2 1 2 finger 1 3 2 3 hasAttack T T F T start 0 0 1/4 1/4 endpos 1/4 1/4 2 3/4 duration 1/4 1/4 3/4 1/2
FIXME duration und endpos sind REDUNDANT !?!?
-
update
public void update()Translate untyped tscore data into semantically sensible data, indexed by events. -
writeToDynamicSVG
Only the very first event in voc 'conf' is evaluated, and only w.r.t. diatonic/chromatic, third/fourth/adjacent, and major/minor- Throws:
IOException
-
main
Stand-alone application, translates input file "arg[0]" into multiple static SVGs, one dynamic SVG, and one tabular SVB- Throws:
IOException
-