Package org.staccato

Class StaccatoUtil

java.lang.Object
org.staccato.StaccatoUtil

public class StaccatoUtil extends Object
  • Constructor Details

    • StaccatoUtil

      public StaccatoUtil()
  • Method Details

    • findNextOrEnd

      public static int findNextOrEnd(String s, char charToFind, int startIndex)
      Returns the index of the first instance of the charToFind
      Parameters:
      s -
      charToFind -
      startIndex -
      Returns:
    • findNextOrEnd

      public static int findNextOrEnd(String s, char[] charsToFind, int startIndex)
      Returns the index of the first instance of any of the charsToFind
      Parameters:
      s -
      charsToFind -
      startIndex -
      Returns:
    • createTrackElement

      public static String createTrackElement(byte track)
    • createLayerElement

      public static String createLayerElement(byte layer)
    • createInstrumentElement

      public static String createInstrumentElement(byte instrument)
    • createTempoElement

      public static String createTempoElement(int tempoBPM)
    • createKeySignatureElement

      public static String createKeySignatureElement(byte notePositionInOctave, byte scale)
    • createTimeSignatureElement

      public static String createTimeSignatureElement(byte numerator, byte powerOfTwo)
    • createBarLineElement

      public static String createBarLineElement(long time)
    • createTrackBeatTimeBookmarkElement

      public static String createTrackBeatTimeBookmarkElement(String timeBookmarkId)
    • createTrackBeatTimeBookmarkRequestElement

      public static String createTrackBeatTimeBookmarkRequestElement(String timeBookmarkId)
    • createTrackBeatTimeRequestElement

      public static String createTrackBeatTimeRequestElement(double time)
    • createPitchWheelElement

      public static String createPitchWheelElement(byte lsb, byte msb)
    • createChannelPressureElement

      public static String createChannelPressureElement(byte pressure)
    • createPolyphonicPressureElement

      public static String createPolyphonicPressureElement(byte key, byte pressure)
    • createSystemExclusiveElement

      public static String createSystemExclusiveElement(byte... bytes)
    • createControllerEventElement

      public static String createControllerEventElement(byte controller, byte value)
    • createLyricElement

      public static String createLyricElement(String lyric)
    • createMarkerElement

      public static String createMarkerElement(String marker)
    • createFunctionElement

      public static String createFunctionElement(String id, Object message)
    • createNoteElement

      public static String createNoteElement(Note note)
    • createNoteElement

      public static String createNoteElement(Note note, byte track)
    • createChordElement

      public static String createChordElement(Chord chord)