public class CoreMidiOutputPort extends Object
| Modifier and Type | Field and Description |
|---|---|
private int |
midiPortReference |
| Constructor and Description |
|---|
CoreMidiOutputPort(int clientReference,
String portName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private int |
createOutputPort(int clientReference,
String portName)
Creates a CoreMIDI output port
|
void |
send(int destinationEndPointReference,
MidiMessage message,
long timestamp)
Sends a MIDI message on this output port to the specified destination end point
|
private void |
sendMidiMessage(int midiPortReference,
int destinationEndPointReference,
MidiMessage message,
long timestamp)
Transmits a MIDI message to the OSX CoreMidi device
|
private final int midiPortReference
public CoreMidiOutputPort(int clientReference, String portName) throws CoreMidiException
clientReference - The client referenceportName - The name of the portCoreMidiException - if there is a problem creating the portpublic void send(int destinationEndPointReference, MidiMessage message, long timestamp) throws CoreMidiException
destinationEndPointReference - The destination end point to send the message tomessage - The message to sendtimestamp - The time at which the message should take effect, in microseconds since the
system booted, with 0 meaning "immediately".CoreMidiException - if there is a problem sending the messageprivate int createOutputPort(int clientReference, String portName) throws CoreMidiException
Javah converts the Java function call to a C funtion call using
the signature
JNIEXPORT jint JNICALL Java_uk_co_xfactorylibrarians_coremidi4j_CoreMidiOutputPort_createOutputPort
(JNIEnv *, jobject, jint, jstring);
clientReference - The MIDI client referenceportName - The name of the output portCoreMidiException - if the port cannot be createdprivate void sendMidiMessage(int midiPortReference, int destinationEndPointReference, MidiMessage message, long timestamp) throws CoreMidiException
Javah converts the Java method call to a C function call using the signature.
JNIEXPORT void JNICALL Java_uk_co_xfactorylibrarians_coremidi4j_CoreMidiOutputPort_sendMidiMessage
(JNIEnv *, jobject, jint, jint, jobject, jlong);. See CoreMidiOutputPort.cpp
midiPortReference - The output MIDI port referencedestinationEndPointReference - The device to send the message tomessage - The message to sendtimestamp - The time at which the message should take effect, in microseconds since the
system booted, with zero meaning immediately.CoreMidiException - if there is a problem sending the messageCopyright © 2017. All rights reserved.