Package org.staccato
Class StaccatoUtil
- java.lang.Object
-
- org.staccato.StaccatoUtil
-
public class StaccatoUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StaccatoUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
createBarLineElement(long time)
static java.lang.String
createChannelPressureElement(byte pressure)
static java.lang.String
createChordElement(Chord chord)
static java.lang.String
createControllerEventElement(byte controller, byte value)
static java.lang.String
createFunctionElement(java.lang.String id, java.lang.Object message)
static java.lang.String
createInstrumentElement(byte instrument)
static java.lang.String
createKeySignatureElement(byte notePositionInOctave, byte scale)
static java.lang.String
createLayerElement(byte layer)
static java.lang.String
createLyricElement(java.lang.String lyric)
static java.lang.String
createMarkerElement(java.lang.String marker)
static java.lang.String
createNoteElement(Note note)
static java.lang.String
createNoteElement(Note note, byte track)
static java.lang.String
createPitchWheelElement(byte lsb, byte msb)
static java.lang.String
createPolyphonicPressureElement(byte key, byte pressure)
static java.lang.String
createSystemExclusiveElement(byte... bytes)
static java.lang.String
createTempoElement(int tempoBPM)
static java.lang.String
createTimeSignatureElement(byte numerator, byte powerOfTwo)
static java.lang.String
createTrackBeatTimeBookmarkElement(java.lang.String timeBookmarkId)
static java.lang.String
createTrackBeatTimeBookmarkRequestElement(java.lang.String timeBookmarkId)
static java.lang.String
createTrackBeatTimeRequestElement(double time)
static java.lang.String
createTrackElement(byte track)
static int
findNextOrEnd(java.lang.String s, char[] charsToFind, int startIndex)
Returns the index of the first instance of any of the charsToFindstatic int
findNextOrEnd(java.lang.String s, char charToFind, int startIndex)
Returns the index of the first instance of the charToFind
-
-
-
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)
-
-