Class MaWiRic


public class MaWiRic extends SvgSource
Translation of tscore source according to "Mathias Wittekopf/Vorübergehende Zustände/8. Satz/meditation 2(ricercata)"; see ohrwelt.de.
Generates a dynamic SVG with a matrix of text characters in an equidistant font, which are made visible and invisible again, all individually, controlled by the score.
The main example score is sig/examples/tscore/mawiric1.tscore.

The score has two synchronuous voices, one for switch-on events and a second for switch-off events. Both voices have only their main parameter (see Event.main_parameter_name). Switch-on events are given by line and column and apply to this coordinate.
Switch-off events are given by character content and apply to all these characters.
In the form used in the prototype, there is a first phase of switch-on, and a second of switch-off, both slightly accelerating. Only the former contains synchronuous events.
Despite being very simple, there is a whole bunch of consistency constraints:

  1. Switch-on events must have valid coordinates (line and column number)
  2. Switch-on events must only hit non-blank characters.
  3. No duplication of switch-on events, ie. all switched on positions must currently be switched off.
  4. No duplication of switch-off events, ie. at least one position with such a character must currently be switched on.
  5. Switch-off events should refer to characters which occur in the text.
  6. Switch-off events should refer only to non-blank characters.
  7. All non-blank positions should be switched on once.
  8. All characters should be switched off at the end.
  9. ( There should be one moment where all characters are visible. )
Violations are currently reported as WARNINGS, not as errors!
This code can be used differently than MW's original, since the strict separation into two phases (on and off) is NOT ensured by the code.

Code generation scheme for each character position = coordinate, "Z" is the character text:
    [text opacity='0.0' x='..' y='..7']Z
      [set attributeType='XML' attributeName='opacity'  to='1.0' begin='SWITCH-ON-TIME'/]
      [set attributeType='XML' attributeName='opacity'  to='0.0' begin='SWITCH-OFF-TIME'/]
    [/text]
  
Further variants are possible, but not implemented:
  1. multiple switch-off of the same character can be applied to subsets of the visible characters.
  2. switch on and switch off treated symmetrically: Both can be given by position and/or by character content.

Technically this is a sub-class of SvgSource. The methods update() and convertData() are called and must be defined.
  • Field Details

    • VOICENAME_on

      public static final String VOICENAME_on
      See Also:
    • VOICENAME_off

      public static final String VOICENAME_off
      See Also:
    • event2stopChar

      final Multimap<Event,String> event2stopChar
      Result of parsing the switch-off events, indicate when a particular character/ set of characters vanishes.
    • asciiLowerCaseChar

      final Translet.Parser<String> asciiLowerCaseChar
      Parser for the switch-off events. Allows only ONE character.
    • event2start

      final Multimap<Event,Tuple2<Integer,Integer>> event2start
      Result of parsing the switch-on events, indicate when a particular matrix position/ set of matrix positions appears.
    • parse_on

      final Translet.Parser<?> parse_on
      Parser for the switch-on events. Allows a set of coordinate-pairs.
    • parse_off

      final Translet.Parser<?> parse_off
      Parser for the switch-off events. Allows a set of characters.
    • textData

      public static String[] textData
      The text data which shall appear on the screen, in exactly this matrix arragenment.
    • BLANK

      public static final Character BLANK
      Evident
  • Constructor Details

    • MaWiRic

      public MaWiRic(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg)
      Only constructor for this tscore data processors, found and instantiated by MfMain by reflection.
  • Method Details

    • update

      public void update()
      Translate untyped tscore data into semantically sensible "MaWiRic" data. This method reads the event lists contained in TimeScape->voices->bySourceOrder and writes to all the local Map and Set output data declared locally.
      Overrides:
      update in class SvgSource
    • isBlank

      public static boolean isBlank(char c)
      Evident
    • convertData

      protected void convertData()
      Generate SVG file, using auxiliary functions and called by superclass SvgSource.
      Specified by:
      convertData in class SvgSource