com.softsynth.jmsl.midi
Class MidiIO_MidiShare
java.lang.Object
com.softsynth.jmsl.midi.MidiIO
com.softsynth.jmsl.midi.MidiIO_MidiShare
- All Implemented Interfaces:
- Editable, MusicDevice
public class MidiIO_MidiShare
- extends MidiIO
Uses grame.midishare package to provide MIDI access. Visit
http://www.grame.fr/MidiShare
Some MODS by Stephane Letz June 13, 2002
- Author:
- Nick Didkovsky 3/21/01
Methods inherited from class com.softsynth.jmsl.midi.MidiIO |
addEditListener, addMidiParser, allNotesOff, allNotesOff, bendPitch, bendPitch, clearMidiLog, close, control, control, controlContinuous, controlContinuous, createMidiIO, edit, getEditEnabled, getInDevice, getMidiParser, getOutDevice, getQuiet, logMessage, logMessage, noteOff, noteOff, noteOff, noteOff, noteOn, noteOn, open, printMidiLog, programChange, programChange, removeEditListener, removeMidiParser, scheduleMessage, setEditEnabled, setInDevice, setMidiLogging, setOutDevice, setQuiet, sysex, test1, test2, test3, writeMidiFile |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static MidiIO_MidiShare instance()
- Returns:
- singleton instance of this class
openDevices
public void openDevices(int inDevice,
int outDevice)
- Specified by:
openDevices
in class MidiIO
closeDevices
public void closeDevices()
- Specified by:
closeDevices
in class MidiIO
synchClocks
public void synchClocks()
- Called automatically in openDevices(). Also called if JMSLTimeToMidiTime conversion calculates
a negative midi timestamp for some reason. Call this if you open MidiIO_MidiShare and subsequently change
JMSL.clock, by initializing JSynMusicDevice for example.
- Specified by:
synchClocks
in class MidiIO
sendMessage
public void sendMessage(int status,
int data1,
int data2)
- Specified by:
sendMessage
in class MidiIO
sendMessage
public void sendMessage(double timeStamp,
int status,
int data1,
int data2)
- Specified by:
sendMessage
in class MidiIO
sysex
public void sysex(double timeStamp,
byte[] data)
- Description copied from class:
MidiIO
- Send data[] as sysex at specified time. User should not include F0 and F7 (SysEx start/stop) in data[]!
- Specified by:
sysex
in class MidiIO
getInputDeviceNames
public java.lang.String[] getInputDeviceNames()
- Specified by:
getInputDeviceNames
in class MidiIO
getOutputDeviceNames
public java.lang.String[] getOutputDeviceNames()
- Specified by:
getOutputDeviceNames
in class MidiIO
startListening
public void startListening()
- Specified by:
startListening
in class MidiIO
stopListening
public void stopListening()
- Specified by:
stopListening
in class MidiIO
main
public static void main(java.lang.String[] args)
getClockDelta
public double getClockDelta()
- Returns:
- difference between JMSL clock origin and MIDI clock origin, used to convert between JMSL and MidiShare time
getJmslClockOrig
public double getJmslClockOrig()
- Returns:
- JMSL time when JMSL clock was synched to MidiShare clock
getMidiClockOrig
public int getMidiClockOrig()
- Returns:
- MidiShare time when JMSL clock was synched to MidiShare clock