Class SyncPatterns2lilypond

java.lang.Object
eu.bandm.music.applications.indisp.SyncPatterns2lilypond

class SyncPatterns2lilypond extends Object
  • Field Details

    • PAUSES

      static final String[] PAUSES
  • Constructor Details

    • SyncPatterns2lilypond

      SyncPatterns2lilypond()
  • Method Details

    • oneNote2lilypond

      static void oneNote2lilypond(int vox, int pos, boolean isFirst, BiFunction<Integer,Integer,Integer> dynamics, PrintWriter pw)
      Parameters:
      dynamics - function from voice and timepoint into {0..3}
    • comment2lilypond

      static void comment2lilypond(int pos, @Opt String[] comment, PrintWriter pw)
    • beamGroup2lilypond

      static void beamGroup2lilypond(int vox, boolean[] events, int start, int len, BiFunction<Integer,Integer,Integer> dynamics, @Opt String[] comments, NSM.BeamStyle beamStyle, PrintWriter pw)
      Print one beam group.
    • voice2lilypond

      static void voice2lilypond(NSM pattern, boolean[] events, int lengthInMeasures, int vox, @Opt String instrName, BiFunction<Integer,Integer,Integer> dynamics, @Opt String[] comments, NSM.BeamStyle beamStyle, PrintWriter pw)
    • inMeasures

      static int inMeasures(int eventCount, NSM pattern)
    • convert

      static void convert(File outFile, String docFilename, @Opt String constructionDate, int barNum, boolean[][] allEvents, int eventCount, String[] parameterComments, BiFunction<Integer,Integer,Integer> dynamics, NSM pattern, NSM.BeamStyle beamStyle) throws FileNotFoundException
      Service one: write to one dedicated, complete lilypond source file.
      Throws:
      FileNotFoundException
    • append

      static void append(PrintWriter pw, String docFilename, @Opt String visibleMarker, boolean[][] allEvents, int eventCount, String[] parameterComments, BiFunction<Integer,Integer,Integer> dynamics, NSM pattern, NSM.BeamStyle beamStyle)
      Service two: Append to one large growing lilypond source file.
    • selections2lilypond

      static void selections2lilypond(NSM nsm, File target, NSM.BeamStyle beamStyle) throws FileNotFoundException
      Service three: Print scales of continuous selections by indispensability value. Numbering corresponds to that on the slider in the interactive GUI. The indispensability values, as assigned to the positions, go from 0 to size-1. Since GUI sliders have a "0" in the middle, it is sensible to define
        size  = all Pause
        size-1 play only the one most important (>= size-1)
        ...
        n  play only those which are >=  n 
        ...
        1  play only those which are >= 1  (ie. all but the smallest)
        0  play all 
        -1 play all but the largest ie. invalid input: '<' size - 1
        -2 play all but the largest two ie. invalid input: '<' size - 2 
        ...
        -n play SMALLER than size + n 
        ...
        -(size-1) play only the least ie.  invalid input: '<' 1 
        -size  ALL PAUSE ie. play smaller than 0 
        

      Attention: writes to pwd with a fixed file name.

      Throws:
      FileNotFoundException