|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.music.midi.Midi
public abstract class Midi
MIDI adapted from http://www.jsresources.org/examples/DumpReceiver.java.html
| Field Summary | |
|---|---|
static int |
BANK_LIMIT
|
static int |
CHANNEL_LIMIT
|
static int |
META_EVENT_CHANNEL_PREFIX
|
static int |
META_EVENT_COPYRIGHT
|
static int |
META_EVENT_CUE_POINT
|
static int |
META_EVENT_DEVICE_NAME
|
static int |
META_EVENT_END_OF_TRACK
|
static int |
META_EVENT_INSTRUMENT_NAME
|
static int |
META_EVENT_KEY_SIGNATURE
|
static int |
META_EVENT_LYRIC
|
static int |
META_EVENT_MARKER
|
static int |
META_EVENT_PORT
|
static int |
META_EVENT_PROGRAM_NAME
|
static int |
META_EVENT_SEQUENCE_NUMBER
|
static int |
META_EVENT_SEQUENCER_SPECIFIC
|
static int |
META_EVENT_SMPTE_OFFSET
|
static int |
META_EVENT_TEMPO
|
static int |
META_EVENT_TEXT
|
static int |
META_EVENT_TIME_SIGNATURE
|
static int |
META_EVENT_TRACK_NAME
|
static double |
MICROSECONDS_PER_MINUTE
|
static double |
MICROSECONDS_PER_SECOND
|
static int |
PAN_LIMIT
|
static int |
PAN_POSITION_CENTER
|
static int |
PITCH_BEND_CENTER
|
static int |
PORT_LIMIT
|
static int |
PROGRAM_LIMIT
|
static long |
seByteCount
System exclusive message byte count tracked by the decodeMessage(SysexMessage) method. |
static long |
seCount
System exclusive message count tracked by the decodeMessage(SysexMessage) method. |
static long |
smByteCount
Short message byte count tracked by the decodeMessage(ShortMessage) method. |
static long |
smCount
Short message count tracked by the decodeMessage(ShortMessage) method. |
static int |
VELOCITY_LIMIT
|
| Constructor Summary | |
|---|---|
Midi()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
decodeMessage(javax.sound.midi.MetaMessage message)
Decode a MIDI Meta message. |
static java.lang.String |
decodeMessage(javax.sound.midi.ShortMessage message,
boolean generalMidi)
Decode a MIDI ShortMessage instance. |
static java.lang.String |
decodeMessage(javax.sound.midi.SysexMessage message)
Decode a MIDI System Exclusive message. |
static int |
get14bitValue(int nLowerPart,
int nHigherPart)
Pack two 7-bit bytes into a 14-bit integer. |
static java.lang.String |
getHexString(byte[] aByte)
Convert a byte array into a hexadecimal string. |
static java.lang.String |
getHexString(javax.sound.midi.ShortMessage sm)
Convert a short MIDI message to a hexadecimal string. |
static java.lang.String |
getKeyName(int nKeyNumber,
boolean percussion)
Express a MIDI key number as a letter name, accidental, and octave number. |
static int |
microsecondsPerBeat(double beatsPerSecond)
Convert beats per second to microseconds per beat. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PITCH_BEND_CENTER
public static final int PAN_POSITION_CENTER
public static final int CHANNEL_LIMIT
public static final int PORT_LIMIT
public static final int PROGRAM_LIMIT
public static final int VELOCITY_LIMIT
public static final int PAN_LIMIT
public static final int BANK_LIMIT
public static final int META_EVENT_SEQUENCE_NUMBER
public static final int META_EVENT_TEXT
public static final int META_EVENT_COPYRIGHT
public static final int META_EVENT_TRACK_NAME
public static final int META_EVENT_INSTRUMENT_NAME
public static final int META_EVENT_LYRIC
public static final int META_EVENT_MARKER
public static final int META_EVENT_CUE_POINT
public static final int META_EVENT_PROGRAM_NAME
public static final int META_EVENT_DEVICE_NAME
public static final int META_EVENT_CHANNEL_PREFIX
public static final int META_EVENT_PORT
public static final int META_EVENT_END_OF_TRACK
public static final int META_EVENT_TEMPO
public static final int META_EVENT_SMPTE_OFFSET
public static final int META_EVENT_TIME_SIGNATURE
public static final int META_EVENT_KEY_SIGNATURE
public static final int META_EVENT_SEQUENCER_SPECIFIC
public static final double MICROSECONDS_PER_MINUTE
public static final double MICROSECONDS_PER_SECOND
public static long seByteCount
public static long smByteCount
public static long seCount
public static long smCount
| Constructor Detail |
|---|
public Midi()
| Method Detail |
|---|
public static int microsecondsPerBeat(double beatsPerSecond)
beatsPerSecond -
public static java.lang.String decodeMessage(javax.sound.midi.ShortMessage message,
boolean generalMidi)
message - A status byte with at most two data bytes.generalMidi - A flag indicating whether the file adheres to General MIDI standard.
public static java.lang.String decodeMessage(javax.sound.midi.SysexMessage message)
message - A MIDI system exclusive message.
public static java.lang.String decodeMessage(javax.sound.midi.MetaMessage message)
message - A MIDI meta message.
public static java.lang.String getKeyName(int nKeyNumber,
boolean percussion)
nKeyNumber - percussion - A flag indicating if the key event happens in a General MIDI file on channel 10.
public static int get14bitValue(int nLowerPart,
int nHigherPart)
nLowerPart - The fine byte.nHigherPart - The coarse byte.
public static java.lang.String getHexString(byte[] aByte)
aByte - A byte array.
public static java.lang.String getHexString(javax.sound.midi.ShortMessage sm)
sm - A short MIDI message.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||