Package org.staccato

Class StaccatoUtil


  • public class StaccatoUtil
    extends java.lang.Object
    • Constructor Detail

      • StaccatoUtil

        public StaccatoUtil()
    • Method Detail

      • findNextOrEnd

        public static int findNextOrEnd​(java.lang.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​(java.lang.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 java.lang.String createTrackElement​(byte track)
      • createLayerElement

        public static java.lang.String createLayerElement​(byte layer)
      • createInstrumentElement

        public static java.lang.String createInstrumentElement​(byte instrument)
      • createTempoElement

        public static java.lang.String createTempoElement​(int tempoBPM)
      • createKeySignatureElement

        public static java.lang.String createKeySignatureElement​(byte notePositionInOctave,
                                                                 byte scale)
      • createTimeSignatureElement

        public static java.lang.String createTimeSignatureElement​(byte numerator,
                                                                  byte powerOfTwo)
      • createBarLineElement

        public static java.lang.String createBarLineElement​(long time)
      • createTrackBeatTimeBookmarkElement

        public static java.lang.String createTrackBeatTimeBookmarkElement​(java.lang.String timeBookmarkId)
      • createTrackBeatTimeBookmarkRequestElement

        public static java.lang.String createTrackBeatTimeBookmarkRequestElement​(java.lang.String timeBookmarkId)
      • createTrackBeatTimeRequestElement

        public static java.lang.String createTrackBeatTimeRequestElement​(double time)
      • createPitchWheelElement

        public static java.lang.String createPitchWheelElement​(byte lsb,
                                                               byte msb)
      • createChannelPressureElement

        public static java.lang.String createChannelPressureElement​(byte pressure)
      • createPolyphonicPressureElement

        public static java.lang.String createPolyphonicPressureElement​(byte key,
                                                                       byte pressure)
      • createSystemExclusiveElement

        public static java.lang.String createSystemExclusiveElement​(byte... bytes)
      • createControllerEventElement

        public static java.lang.String createControllerEventElement​(byte controller,
                                                                    byte value)
      • createLyricElement

        public static java.lang.String createLyricElement​(java.lang.String lyric)
      • createMarkerElement

        public static java.lang.String createMarkerElement​(java.lang.String marker)
      • createFunctionElement

        public static java.lang.String createFunctionElement​(java.lang.String id,
                                                             java.lang.Object message)
      • createNoteElement

        public static java.lang.String createNoteElement​(Note note)
      • createNoteElement

        public static java.lang.String createNoteElement​(Note note,
                                                         byte track)
      • createChordElement

        public static java.lang.String createChordElement​(Chord chord)