Class SvgSource.Process

java.lang.Object
eu.bandm.tools.util.java.Iterators.Pairwise<Event>
eu.bandm.music.top.SvgSource.Process
Enclosing class:
SvgSource

abstract class SvgSource.Process extends eu.bandm.tools.util.java.Iterators.Pairwise<Event>
Visits all events of a given iterator pairwise and prepares time and interpolation values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
    The onset time point of the later event currently under visit.
    protected boolean
    Whether the earlier event has a "interpolate" flag set in its tscore source.
    protected final @Opt Map<Event,String>
    The event parameters "interpolation mode", if present.
    protected double
    The onset time point of the earlier event currently under visit.

    Fields inherited from class eu.bandm.tools.util.java.Iterators.Pairwise

    _last, it, lit
  • Constructor Summary

    Constructors
    Constructor
    Description
    Only constructur, sets up all parameters for the execution by Iterators.Pairwise.process().
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Can be overridden by the user to visit the very first element before the first pair is visited by Iterators.Pairwise.pairwise(Object,Object).
    void
    pairwise(Event predec, Event current)
    Must be overridden by the user to visit the define what to do with each pair of adjacent elements.
    protected double
    Get the onset time of the event according to the calendearic time data in the score.

    Methods inherited from class eu.bandm.tools.util.java.Iterators.Pairwise

    last, process

    Methods inherited from class java.lang.Object

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

    • ipoltable

      @Opt protected final @Opt Map<Event,String> ipoltable
      The event parameters "interpolation mode", if present.
    • predecTime

      protected double predecTime
      The onset time point of the earlier event currently under visit.
    • currentTime

      protected double currentTime
      The onset time point of the later event currently under visit.
    • ipol

      protected boolean ipol
      Whether the earlier event has a "interpolate" flag set in its tscore source.
  • Constructor Details

    • Process

      public Process(Iterable<Event> it, @Opt @Opt Map<Event,String> ipoltable)
      Only constructur, sets up all parameters for the execution by Iterators.Pairwise.process().
      Parameters:
      it - iterable, normally related to one single voice, e.g. from voiceEvents(v, range_respectingDomainOrder(rat2tp)) or sim.
      ipoltable - gives for each event the interpolation mode to the subsequent value, in a symbolic text form.
  • Method Details

    • time

      protected double time(Event e)
      Get the onset time of the event according to the calendearic time data in the score.
    • first

      public void first(Event e)
      Description copied from class: eu.bandm.tools.util.java.Iterators.Pairwise
      Can be overridden by the user to visit the very first element before the first pair is visited by Iterators.Pairwise.pairwise(Object,Object).
      Overrides:
      first in class eu.bandm.tools.util.java.Iterators.Pairwise<Event>
    • pairwise

      public void pairwise(Event predec, Event current)
      Must be overridden by the user to visit the define what to do with each pair of adjacent elements. These are visited in the sequential order of the underlying Iterator. On Execution, that has berformed a Iterator.next(), so that it "points" (e.g. with its Iterator.hasNext() to the successor of the later of both visited elements. Here: prepare the registers ipol and currentTime.
      Specified by:
      pairwise in class eu.bandm.tools.util.java.Iterators.Pairwise<Event>