java.lang.Object
eu.bandm.music.applications.deutscheLaute.Dlaute

public class Dlaute extends Object
Parsing, model creation, XML encoding, and proof rendering of "Deutsche Lautentabulatur". The tscore input looks like
     T        I   I,    T  F_ F F _F  T -  -  - 
     VOX a    1   f     g  h  f g  h  2 f  i  k
     VOX b        0+
  

The T line contains duration symbols, including start/end beam indication. In contrast to the original, all duration symbols are on the same height, but a global "timeless" switch can indicate that they "drop" above the topmost voice entry. The XML encoding always shows the correct y-position relative to the lowest appearing voice character.
Whitespace for "same duration as predecessor" must also be marked explicitly.

The voices "VOX a" are technically required by tscore, but do only indicate the y-position of the grip characters.

Please see the examples for details.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) class 
    Creates one single image as CONTROL output only.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) boolean
    Whether duration symbols in the original drop down graphically.
    (package private) boolean
    Whether "same duration as preceding" is supported in this score.
    (package private) Vox
    Synthetic tscore voice for the duration symbols.
    (package private) Map<Event,Rational>
    Partial map from time line events to the base duration symbol, if present.
    (package private) Map<Event,String>
    Partial map from time line events to a sequence of (one or two) duratin prolognation dots.
    (package private) Map<Event,String>
    Time-line event is is keyset iff a beam group ends there.
    (package private) Map<Event,String>
    Partial map of voice events to finger indication.
    (package private) Map<Event,String>
    Partial map from time line events to the "same duration as predecessor" symbol.
    (package private) Map<Event,String>
    Voice event is in keyset iff symbol carries a "laissez vibrer" symbol.
    (package private) Map<Event,String>
    Time-line event is is keyset iff a beam group starts there.
    (package private) Map<Event,Tuple2<Integer,Integer>>
    Total map of the voice events to the stop code (/grip code).
    (package private) static final Map<String,String>
    Finger indication according to Newsidler, Gerle (1535-1552) [Wolf S.
    (package private) static final Map<String,Rational>
    Durations accordig to Wolf, p.41: [= Johannes Wolf, Handbuch der Notationskunde, Teil zwei, https://ia800205.us.archive.org/3/items/handbuchdernotat02wolf/handbuchdernotat02wolf.pdf]
    "." = whole note = semibrevis (= 1/1 in modern interpretation)
    ".." = brevis ( = 2/1)
    "..." = dotted brevis ( = 3/1)
    "I" = 1/2, T = 1/4, F = 1/8, E = 1/16
    But the example Schlick [Wolf p.42/43] shows that "F" in tablature corresponds to "quarter note" in the mensural notation.
    static final Modifiers
    Modifiers controlling the parsing process.
    (package private) final SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier>
    Only for conveniently construction messages and sending them to msgr
    (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 duration prolongation dots.
    (package private) final Translet.Parser
    Parser for all variants of durations, including "same duration as predecessor."
    (package private) final Translet.Parser
    Let the chord vibrate longer than the next event.
    protected final Part
    The score data as parsed by tscore.
    (package private) static final Map<String,Rational>
     
    static final String
    The key string for the "timeless" prelude information whether the duration symbols "drop down".
    static final String
    The key string for the "timeless" prelude information whether "same-duration-as-predecessor" is allowed.
    static final String
    The key string for the "timeless" prelude information about the stop-characater definitions.
    (package private) final Map<TpTop,Rational>
    Maps top time points to their (nominal) duration.
    (package private) final Map<TpTop,Rational>
    Maps top time points to their (nominal) position = sum of all preceding durations.
    (package private) final List<TpTop>
    Top time points in score order.
    (package private) final String
    Name of duraVoice
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dlaute(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msgr)
    Construct data for one particular Part of a tscore TimeScape.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Additional type check whether the duration information is consistent.
    (package private) Map<String,Tuple2<Integer,Integer>>
    gripMap(Vox vox)
    Construct the grip map from the "timeless" prelude information.
    static void
    main(String[] args)
    Stand-alone application, translates input file "arg[0]" into two output files: a rendering with extension ".png" and an xml model with extension ".xml".
    (package private) Translet.Parser<?>
    Stop parser is supplied *dynamically*, because the "timeless" prelude of each file can re-define the character values.
    Convert the model into an XML model.
    void
    Translate untyped tscore data into semantically sensible data, indexed by events.
    protected void
    First step of interpreting syntactic to semantic contents: Parse the TpTop text to a duration indication.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • longDurations

      static final Map<String,Rational> longDurations
      Durations accordig to Wolf, p.41: [= Johannes Wolf, Handbuch der Notationskunde, Teil zwei, https://ia800205.us.archive.org/3/items/handbuchdernotat02wolf/handbuchdernotat02wolf.pdf]
      "." = whole note = semibrevis (= 1/1 in modern interpretation)
      ".." = brevis ( = 2/1)
      "..." = dotted brevis ( = 3/1)
      "I" = 1/2, T = 1/4, F = 1/8, E = 1/16
      But the example Schlick [Wolf p.42/43] shows that "F" in tablature corresponds to "quarter note" in the mensural notation. We assume that this proportion is variable. Therefore we do not make any translations, but describe the duration symbols according to our "modern" interpretation (two flags ≙ F ≙ 1/16, etc. Then I ≙ 1/4 and "." ≙ 1/2 )
    • shortDurations

      static final Map<String,Rational> shortDurations
    • event2baseDuration

      Map<Event,Rational> event2baseDuration
      Partial map from time line events to the base duration symbol, if present.
    • event2idemDuration

      Map<Event,String> event2idemDuration
      Partial map from time line events to the "same duration as predecessor" symbol. This is required in tscore, because there must always be a non-blank symbol in the time line. In the original this is white space. (Technically a map is required; relevant is only its key-set.)
    • event2dots

      Map<Event,String> event2dots
      Partial map from time line events to a sequence of (one or two) duratin prolognation dots.
    • event2startBeam

      Map<Event,String> event2startBeam
      Time-line event is is keyset iff a beam group starts there.
    • event2endBeam

      Map<Event,String> event2endBeam
      Time-line event is is keyset iff a beam group ends there.
    • p_dots

      final Translet.Parser p_dots
      Parser for duration prolongation dots.
    • p_duration

      final Translet.Parser p_duration
      Parser for all variants of durations, including "same duration as predecessor."
    • fingerCodes

      static final Map<String,String> fingerCodes
      Finger indication according to Newsidler, Gerle (1535-1552) [Wolf S. 42]
    • event2stop

      Total map of the voice events to the stop code (/grip code). The first component is the chord, the second the fret (0=open chord).
    • event2finger

      Map<Event,String> event2finger
      Partial map of voice events to finger indication.
    • event2prolongate

      Map<Event,String> event2prolongate
      Voice event is in keyset iff symbol carries a "laissez vibrer" symbol.
    • p_prolongate

      final Translet.Parser p_prolongate
      Let the chord vibrate longer than the next event. Newsidler, Judenkünig, Gerle [Wolf g.41]
    • timelessTag_frets

      public static final String timelessTag_frets
      The key string for the "timeless" prelude information about the stop-characater definitions.
      See Also:
    • timelessTag_duratioCadens

      public static final String timelessTag_duratioCadens
      The key string for the "timeless" prelude information whether the duration symbols "drop down".
      See Also:
    • timelessTag_duratioManet

      public static final String timelessTag_duratioManet
      The key string for the "timeless" prelude information whether "same-duration-as-predecessor" is allowed.
      See Also:
    • msgr

      final MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msgr
      Receiver of error/log messages.
    • msgCount

      final MessageCounter msgCount
      Counter of message kinds.
    • msg

      final SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier> msg
      Only for conveniently construction messages and sending them to msgr
    • part

      protected final Part part
      The score data as parsed by tscore.
    • modifiers

      public static final Modifiers modifiers
      Modifiers controlling the parsing process.
    • voicename_timeline

      final String voicename_timeline
      Name of duraVoice
      See Also:
    • duraVoice

      Vox duraVoice
      Synthetic tscore voice for the duration symbols. Because their syntax is more complex than usual in tscore, full-fledged parsers are required, and thus dedicatated events and thus a dedicated voice.

      (timepoints and events in $timeline are related by duravoice.sortedByStart and event.when. The identical index position in tpTops and duraVoice is accidental and should NOT be used!)

    • tpTops

      final List<TpTop> tpTops
      Top time points in score order.
    • tp2duration

      final Map<TpTop,Rational> tp2duration
      Maps top time points to their (nominal) duration.
    • tp2position

      final Map<TpTop,Rational> tp2position
      Maps top time points to their (nominal) position = sum of all preceding durations.
    • duratioCadens

      boolean duratioCadens
      Whether duration symbols in the original drop down graphically.
    • duratioManet

      boolean duratioManet
      Whether "same duration as preceding" is supported in this score.
  • Constructor Details

    • Dlaute

      public Dlaute(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".
  • Method Details

    • p_event

      Stop parser is supplied *dynamically*, because the "timeless" prelude of each file can re-define the character values.
    • gripMap

      Map<String,Tuple2<Integer,Integer>> gripMap(Vox vox)
      Construct the grip map from the "timeless" prelude information. This can be given with the vox or the part or the vox description before any part or with the score file in general. It can be given directly, as a list of list of charcters (see examples) or as one identifier, which in turn must resolve to such a list.
    • update

      public void update()
      Translate untyped tscore data into semantically sensible data, indexed by events.
    • update_topTps

      protected void update_topTps()
      First step of interpreting syntactic to semantic contents: Parse the TpTop text to a duration indication.
    • toXml

      protected Element_tabulatura toXml()
      Convert the model into an XML model. (This is done via a tdom model, which guarantees type correct XML.)
    • checkDuraConsistency

      protected void checkDuraConsistency()
      Additional type check whether the duration information is consistent.
    • main

      public static void main(String[] args)
      Stand-alone application, translates input file "arg[0]" into two output files: a rendering with extension ".png" and an xml model with extension ".xml". (ADDITIONALLY the proof rendering is shown in a window.)