|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.humatic.mmj.MidiSystem
public class MidiSystem
MidiSystem provides static methods to open Midi ports and to get information on a machine's MIDI system. When using mmj via javasound an application does not use this class and the objects it creates, but accesses the CoreMIDI wrapper through standard javax.sound.midi methods.
Method Summary | |
---|---|
static void |
addSystemListener(MidiSystemListener msl)
Attaches a MidiSystemListener to be notified when changes in the Midi System - like device removal or attachment - occur. |
static void |
closeMidiSystem()
|
static void |
dump(byte[] data)
|
static void |
enableActiveSensing(boolean enable)
|
static CoreMidiDevice[] |
getDevices()
Returns an array of CoreMidiDevice objects for hard- and software devices available on the system. Virtual endpoints do not have enclosing devices and devices may be not currently connected (USB boxes) or not set online in OS X's Audio / Midi Setup. |
static long |
getHostTime()
Returns the current AudioSystem time in microseconds. |
static java.lang.String[] |
getInputs()
Returns the names of available Midi Inputs. |
static java.lang.String |
getJarVersion()
|
static java.lang.String |
getLibraryVersion()
|
static int |
getNumberOfInputs()
|
static int |
getNumberOfOutputs()
|
static java.lang.String[] |
getOutputs()
Returns the names of available Midi Outputs. |
static void |
initMidiSystem(java.lang.String virtualSource,
java.lang.String virtualDestination)
Initializes CoreMIDI and eventually creates virtual endpoints (set any unwanted to null). |
static MidiInput |
openMidiInput(int index)
Opens the CoreMIDI source at %index and returns a MidiInput object that an application can attach itself to as a MidiListener. |
static MidiOutput |
openMidiOutput(int index)
Opens the CoreMIDI destination at %index and returns a MidiOutput object that an application can use to send MIDI. |
static void |
setLibraryPath(java.lang.String path)
Allows to set the path the native library is loaded from. |
static void |
setMidiThru(int srcIndex,
int destBitMask)
Instructs the CoreMIDI Server to route MIDI from the source at %srcIndex to all destinations that the corresponding bits in %destBitMask are set for. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setLibraryPath(java.lang.String path) throws java.io.IOException
java.io.IOException
public static void initMidiSystem(java.lang.String virtualSource, java.lang.String virtualDestination)
public static CoreMidiDevice[] getDevices()
public static void closeMidiSystem()
public static int getNumberOfInputs()
public static java.lang.String[] getInputs()
public static int getNumberOfOutputs()
public static java.lang.String[] getOutputs()
public static void dump(byte[] data)
public static MidiInput openMidiInput(int index)
public static MidiOutput openMidiOutput(int index)
public static void setMidiThru(int srcIndex, int destBitMask)
public static java.lang.String getLibraryVersion()
public static java.lang.String getJarVersion()
public static long getHostTime()
public static void enableActiveSensing(boolean enable) throws java.lang.Exception
java.lang.Exception
public static void addSystemListener(MidiSystemListener msl)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |