Class Tabstaff
(Planned backends are: XML encoding (MISSING FIXME), own tablature graphics, 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 horizontal&Cmaj&diatonic&thirds VOX v1 % .12r1 >2 -. % VOX v2 % 11r5 % VOX v3 55 -. % >L4 % view β *
The name of the "conf" voice is fixed.
There must be an event at the very first timepoint, giving orientation,
tonal key, subset, and adjacency.
Only then the functional key changes, the parameter
Tabstaff.layoutTransition
is required.
FIXME Currently the tonal key can only be given in the German language.
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. FIXME
The reserved voice name "conf" contains the switches of the global
configuration
parameters, as an unordered list of values of optional alternatives.
Most events in (the main parameter track of) such a voice are a tuple of
the row and column cooordinate of the switch (1-based), plus optionally
a hand and
a finger indication = one character for the hand plus the finger number.
The hand is required with the very finger specification and extends "sticky"
over all successors.
This can be limited by an explicit "X" for "hand is ad lib".
(Please note that the sequnce "row before column" corresponds to the
usual "matrix" view, not to the "Cartesian coordinates".)
The special form ">
" with a finger (or hand+finger)
indication means an unaudible finger change.
The source text of "row" and "column" goes from 1 to 8,
"finger" from 1 to 5, as usual for keyboards.
A hold "-
" and a pause "%
" have the usual meaning.
Any event which contains a key coordinate means a new attack on thiskey,
even when the event has the same combination of values as its immediate
predecessor.
The input sequences ">2
" or ">r2
" mean a silent finger
change to finger "2" of the current hand, resp. the right hand,
on the button defined by the adjacently preceding event.
The voice names "nota" influences the renderings and can contain the clef indications "A", "AB", "B", "α", "β", etc.
This demo version generates a tablature-like graphics, multiple static chord diagrams ("Charts+") as SVG, and an animated sequence of these, with BPM 40 .
Please see the examples for details.
SVG source text generation by the library JSVG by Jon Sevy. documenation here.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
TUI configuration parameter: distance of adjacent rows/columns: diatonic third, diatonic fourth, or half-tone.static enum
Which hand is specified, if any.static enum
TUI configuration parameter: HAB ICH NOCH NICHT VERSTANDEN FIXMEstatic enum
TUI configuration parameter: direction of increasing pitches left to right or low to high.static enum
TUI areas, divided into two, horizonally and vertically.static enum
TUI configuration parameter: selected subset which is mapped to keys: either diatonics only or all chromatic steps. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Color
Background of the interactive tablature window(package private) Vox
The voice which controls the layout of the TUI.static final String
The pre-scribed name of the voice which controls the layout of the TUI.protected final SortedMap<BigDecimal,
TpTop> Parser for the measure numbers.(package private) Map<Event,
Tabstaff.distance> Storage for events in the configuration voice.Total map from all events except pauses or holds.Partial map from all events except pauses or holds.(package private) Map<Event,
FunctionalKey> Storage for events in the configuration voice.(package private) Map<Event,
Tabstaff.Hand> Total map from all events except holds.Total map from all events except pauses or holds.(package private) Map<Event,
Tabstaff.layoutTransition> Storage for events in the configuration voice.(package private) Map<Event,
Tabstaff.orientation> Storage for events in the configuration voice.(package private) Map<Event,
Tabstaff.SubArea> Total map from all events in the notation voice.(package private) Map<Event,
Tabstaff.subset> Storage for events in the configuration voice.Total map from all events except pauses or holds.Total map from all events except pauses or holds.protected Tp
Very first time point in score.protected Rational
Very first time point in score.All "hold" events "-
"Whether the voice is a normal one, with keypress data, not a configuration voice.protected Tp
Very last time point in score.protected Rational
Very last time point in score.static final int
Highest column index on the standard TUI device.static final int
Highest row index on the standard TUI device.(package private) final Translet.Parser<?>
Parser for events in the configuration voice.static final int
Lowest column index on the standard TUI devicestatic 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.(package private) final Translet.Parser<?>
Parser for notation control.The voice which controls the notationstatic final String
The pre-scribed name of the voice which controls the notation.(package private) final Translet.Parser<?>
Parser for events with pauses and holds(package private) final Translet.Parser<?>
Parser for the TUI coordinates: row before column.(package private) final Translet.Parser<?>
Parser for the finger indication(package private) final Translet.Parser<?>
Parser for the hand indicationprotected final Part
The score data as parsed by tscore.All "pause" events "%
"Inverse oftp2rat
.Map time point objects to rational time values.(package private) final Map<TpTop,
BigDecimal> Inverse ofdecimal2tpTop
. -
Constructor Summary
ConstructorDescriptionTabstaff
(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> extMsgr) 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 SVG.protected void
Semantic evaluation.void
update()
Translate untyped tscore data into semantically sensible data, indexed by events.(package private) static void
usage()
-
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. Can be overwritten by a subclass.- 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. Can be overwritten by a subclass.- 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
Map time point objects to rational time values. Cf Score_cwn. -
rat2tp
Inverse oftp2rat
. -
lastTpTop_rat
Very last time point in score. -
lastTp
Very last time point in score. -
firstTpTop_rat
Very first time point in score. (Tablature graphic reqires currently==0/1
.) -
firstTp
Very first time point in score. -
decimal2tpTop
Parser for the measure numbers. -
tpTop2decimal
Inverse ofdecimal2tpTop
. -
event2orientation
Map<Event,Tabstaff.orientation> event2orientationStorage for events in the configuration voice. -
event2distance
Map<Event,Tabstaff.distance> event2distanceStorage for events in the configuration voice. -
event2subset
Map<Event,Tabstaff.subset> event2subsetStorage for events in the configuration voice. -
event2layoutTransition
Map<Event,Tabstaff.layoutTransition> event2layoutTransitionStorage for events in the configuration voice. -
event2functionalKey
Map<Event,FunctionalKey> event2functionalKeyStorage for events in the configuration voice. -
microLayout
Parser for events in the configuration voice. -
event2staffControl
Map<Event,Tabstaff.SubArea> event2staffControlTotal map from all events in the notation voice. -
notationHints
Parser for notation control. FIXME MORE TO COME -
event2endpos
Total map from all events except pauses or holds. -
event2hasAttack
Total map from all events except pauses or holds. -
event2x
Total map from all events except pauses or holds. -
event2y
Total map from all events except pauses or holds. -
event2finger
Partial map from all events except pauses or holds. -
event2hand
Map<Event,Tabstaff.Hand> event2handTotal map from all events except holds. -
holds
All "hold" events "-
" -
pauses
All "pause" events "%
" -
configurationVoiceName
The pre-scribed name of the voice which controls the layout of the TUI.- See Also:
-
configurationVoice
Vox configurationVoiceThe voice which controls the layout of the TUI. -
notationVoiceName
The pre-scribed name of the voice which controls the notation.- See Also:
-
notationVoice
The voice which controls the notation -
keypressVoices
Whether the voice is a normal one, with keypress data, not a configuration voice. -
parser_coord
Parser for the TUI coordinates: row before column. -
parser_hand
Parser for the hand indication -
parser_finger
Parser for the finger indication -
parser
Parser for events with pauses and holds -
COLOR_BG_OKAY
Background of the interactive tablature window
-
-
Constructor Details
-
Tabstaff
public Tabstaff(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> extMsgr)
-
-
Method Details
-
normalize
Semantic evaluation. (Eliminate "hold" events; hand selection is sticky; so are coordinates with finger-change events; memorize all end points.) -
update
public void update()Translate untyped tscore data into semantically sensible data, indexed by events. -
usage
static void usage() -
main
Stand-alone application, translates input file "arg[0]" into multiple static SVGs, one dynamic SVG, and one tabular SVG. The tabular SVG is interactively presented if there is no (arbitrary non-empty) second command line argument. If no command line arguments are given, the tscore file to translate is selected interactively. The output files are in the same directory as the source and have derived names:comp007.tscore // score file comp007.svg // animated graphics comp007_0.svg // screen shots of the animation comp007_3_8.svg // at the given metric time point comp007_1_4.svg comp007.tab.svg // tablature
- Throws:
IOException
-