Class TabstaffAccordic

java.lang.Object
eu.bandm.music.applications.tabstaff.TabstaffAccordic

public class TabstaffAccordic extends Object
Tscore parsing and model creation of a subset of "TabStaff+", as presented by L.Wilde and C.White on Tenor2024 in Zürich. https://drive.switch.ch/index.php/s/ncao0V2U7XkdTat pg 159--168
(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 Details

  • Constructor Details

    • TabstaffAccordic

      public TabstaffAccordic(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msgr)
      Construct data for one particular Part of a tscore TimeScape. In the score source text this is marked by "PART". Usage: create this instance and call update().
  • Method Details

    • fingerchange

      static final Tuple3<Integer,Integer,Integer> fingerchange(String i)
    • normalize

      protected void normalize(Vox v)
      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 in normalizedEvents. Their data is stored into the maps event2start, 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

      public void writeToDynamicSVG(File file) throws IOException
      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

      public static void main(String[] args) throws IOException
      Stand-alone application, translates input file "arg[0]" into multiple static SVGs, one dynamic SVG, and one tabular SVB
      Throws:
      IOException