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+&C2&major&inKey+&thirds VOX v1 % .12r1 >2 -. % VOX v2 % 11r5 % VOX v3 55 -. % >L4 % view β *
FIXME NO DEFAULTS !
The name of the "conf" voice is fixed.
There must be an event at the very first timepoint, giving orientation,
base pitch, scale, // tonal key,
inKey // chromatic or diatonic / subset,
and adjacency. // distance !?!?
Only when the functional key changes, the parameter
invalid reference
layoutTransition
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 named "conf" contains the switches of the global
configuration parameters, esp. for the "pitch layout".
as an unordered list of values of optional alternatives.
Most events in (the main parameter track of) a "pad-press" voice are
a tuple of
the row and column cooordinate of the pad (1-based), plus optionally
a hand and
a finger indication = one character for the hand plus the finger number.
(Please note that the order "row before column" corresponds to the
usual "matrix" view, not to the "Cartesian coordinates".)
The hand is required with the every finger specification and extends sticky
over all successors.
This can be limited by an explicit "X" for "hand is ad lib".
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 pad's coordinate means a new attack on this pad,
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
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
TUI configuration parameter: distance of adjacent rows/columns: diatonic thirds, diatonic fourths, or seqential.static enum
Which hand is specified, if any.static enum
TUI areas, divided into two, horizonally and vertically. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Color
Background of the interactive tablature windowstatic final String
The pre-scribed name of the voice which controls the layout of the TUI.The voice which controls the layout of the TUI.protected final SortedMap
<BigDecimal, TpTop> Parser for the measure numbers.static final PitchAndOctave
<OctaveRegister, FunctionalPitchModOctave> static final Tabstaff.distance
static final boolean
static final boolean
static final boolean
static final ScalaNumAbstrPOcts
(package private) Map
<Event, PitchAndOctave<OctaveRegister, FunctionalPitchModOctave>> Storage for events in the configuration voice.(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.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.Storage for events in the configuration voice.Storage for events in the configuration voice.(package private) Map
<Event, ScalaNumAbstrPOcts> Storage for events in the configuration voice.(package private) Map
<Event, Tabstaff.SubArea> Total map from all events in the notation 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 "-
"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.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
<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<XMLDocumentIdentifier>> Receiver of error/log messages.static final String
The pre-scribed name of the voice which controls the notation.(package private) final Translet.Parser
<?> Parser for notation control.The voice which controls the notationWhether the voice is a normal one, with pad-press data, not a configuration voice.(package private) final Translet.Parser
<?> Parser for events with pauses and holds(package private) final Translet.Parser
<?> Parser for the hand and/or finger change(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 "%
"static final String
Inverse oftp2rat
.Map time point objects to rational time values.(package private) final Map
<TpTop, BigDecimal> Inverse ofdecimal2tpTop
. -
Constructor Summary
ConstructorsConstructorDescriptionTabstaff
(Part part, MessageReceiver<SimpleMessage<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.(package private) final Translet.Parser
<?> pitchLayout
(String lang) Parser for events in the configuration voice.void
update()
Translate untyped tscore data into semantically sensible data, indexed by events.(package private) static void
usage()
Print help text for command line options, in cases of error etc.
-
Field Details
-
MIN_ROW
public static final int MIN_ROWLowest row index on the standard TUI device- See Also:
-
MAX_ROW
public static final int MAX_ROWHighest row index on the standard TUI device. Can be overwritten by a subclass.- See Also:
-
MIN_COL
public static final int MIN_COLLowest column index on the standard TUI device- See Also:
-
MAX_COL
public static final int MAX_COLHighest 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. -
PRELUDENAME_COLLISION
- See Also:
-
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
. -
DEFAULT_HORIZONTAL
public static final boolean DEFAULT_HORIZONTAL- See Also:
-
DEFAULT_FIXED
public static final boolean DEFAULT_FIXED- See Also:
-
DEFAULT_INKEY
public static final boolean DEFAULT_INKEY- See Also:
-
DEFAULT_DISTANCE
-
DEFAULT_SCALE
-
DEFAULT_BASEPITCH
-
event2horizontal
Storage for events in the configuration voice. -
event2fixed
Storage for events in the configuration voice. -
event2inKey
Storage for events in the configuration voice. -
event2distance
Map<Event,Tabstaff.distance> event2distanceStorage for events in the configuration voice. -
event2scale
Map<Event,ScalaNumAbstrPOcts> event2scaleStorage for events in the configuration voice. -
event2basePitch
Map<Event,PitchAndOctave<OctaveRegister, event2basePitchFunctionalPitchModOctave>> Storage for events in the configuration voice. -
event2subArea
Map<Event,Tabstaff.SubArea> event2subAreaTotal 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 "%
" -
CONFIGURATION_VOICENAME
The pre-scribed name of the voice which controls the layout of the TUI.- See Also:
-
configurationVoice
The voice which controls the layout of the TUI. -
NOTATION_VOICENAME
The pre-scribed name of the voice which controls the notation.- See Also:
-
notationVoice
The voice which controls the notation -
padPressVoices
Whether the voice is a normal one, with pad-press data, not a configuration voice. -
parserCoord
Parser for the TUI coordinates: row before column. -
parserHand
Parser for the hand indication -
parserFinger
Parser for the finger indication -
parserChange
Parser for the hand and/or finger change -
parser
Parser for events with pauses and holds -
COLOR_BG_OKAY
Background of the interactive tablature window
-
-
Constructor Details
-
Tabstaff
-
-
Method Details
-
pitchLayout
Parser for events in the configuration voice. -
normalize
Semantic evaluation. (Eliminate initial "hold" events; hand selection is sticky; so are coordinates for finger-change events; check finger-number not without hand-spec; memorize end points of all non-pauses.) -
update
public void update()Translate untyped tscore data into semantically sensible data, indexed by events. -
usage
static void usage()Print help text for command line options, in cases of error etc. -
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
-