-
Method create
void Public.Sound.Midi.Device()->create(int ID)
- Description
Create a MIDI object for communication. You have to provide a device ID. ID numbers start from zero and go up until the maximum available. (Which can be checked with a control object, using the count_devices() function.)
- Note
Each port is another device!
-
Method set_ID
void Public.Sound.Midi.Device()->set_ID(int ID)
- Description
Access another device with this object.
-
Method get_ID
int Public.Sound.Midi.Device()->get_ID()
- Description
Retrieve the ID of the MIDI device this object addresses.
-
Method get_version
int Public.Sound.Midi.Device()->get_version()
- Description
Not really needed in most circumstanses. It gives you the version number of the PortMidi library.
-
Method get_interface
string Public.Sound.Midi.Device()->get_interface()
- Description
This gives you the type of interface that goes with the device, like ALSA or Jack.
-
Method get_name
string Public.Sound.Midi.Device()->get_name()
- Description
This gives you the descriptive name of this interface.
-
Method is_input
int Public.Sound.Midi.Device()->is_input()
- Description
See if this device is an input or output.
-
Method is_output
int Public.Sound.Midi.Device()->is_output()
- Description
See if this device is an input or output.
-
Method is_open
int Public.Sound.Midi.Device()->is_open()
- Description
See if this device is opened, which is needed before you can use it.
-
Method open
int Public.Sound.Midi.Device()->open()
- Description
Open the device. The return value will be null or an error id.
-
Method message
int Public.Sound.Midi.Device()->message(int status, int data1, int data2)
- Description
Directly output a MIDI message.
- Parameter status
The status byte, like 0x90 for a note-on event. Consult a MIDI manual for more information.
- Parameter data1
- Parameter data2
The two parts of the midi message
-
Method read
int Public.Sound.Midi.Device()->read()
- Description
Call this function to see if there is MIDI input waiting to be parsed. Returns 1 if a new message is waiting or 0 zero when the MIDI buffer was empty. A negative number signals an error.
- Note
Use the functions get_status(), get_data1() and get_data2() to get the actual information contained in the message.
-
Method get_status
int Public.Sound.Midi.Device()->get_status()
- Description
Retreive the status byte from the last read message.
-
Method is_data1
int Public.Sound.Midi.Device()->is_data1()
- Description
Retreive the first data byte from the last read message.
-
Method is_data2
int Public.Sound.Midi.Device()->is_data2()
- Description
Retreive the second data byte from the last read message.
-
Method is_data1
int Public.Sound.Midi.Device()->is_data1()
- Description
Retreive the first data byte from the last read message.
-
Method close
int Public.Sound.Midi.Device()->close()
- Description
Close this device. Returns zero or an error code.
-
Method create
void Public.Sound.Midi.Device()->create(int ID)
- Description
Create a MIDI object for communication. You have to provide a device ID. ID numbers start from zero and go up until the maximum available. (Which can be checked with a control object, using the count_devices() function.)
- Note
Each port is another device!
-
Method set_ID
void Public.Sound.Midi.Device()->set_ID(int ID)
- Description
Access another device with this object.
-
Method get_ID
int Public.Sound.Midi.Device()->get_ID()
- Description
Retrieve the ID of the MIDI device this object addresses.
-
Method get_version
int Public.Sound.Midi.Device()->get_version()
- Description
Not really needed in most circumstanses. It gives you the version number of the PortMidi library.
-
Method get_interface
string Public.Sound.Midi.Device()->get_interface()
- Description
This gives you the type of interface that goes with the device, like ALSA or Jack.
-
Method get_name
string Public.Sound.Midi.Device()->get_name()
- Description
This gives you the descriptive name of this interface.
-
Method is_input
int Public.Sound.Midi.Device()->is_input()
- Description
See if this device is an input or output.
-
Method is_output
int Public.Sound.Midi.Device()->is_output()
- Description
See if this device is an input or output.
-
Method is_open
int Public.Sound.Midi.Device()->is_open()
- Description
See if this device is opened, which is needed before you can use it.
-
Method open
int Public.Sound.Midi.Device()->open()
- Description
Open the device. The return value will be null or an error id.
-
Method message
int Public.Sound.Midi.Device()->message(int status, int data1, int data2)
- Description
Directly output a MIDI message.
- Parameter status
The status byte, like 0x90 for a note-on event. Consult a MIDI manual for more information.
- Parameter data1
- Parameter data2
The two parts of the midi message
-
Method read
int Public.Sound.Midi.Device()->read()
- Description
Call this function to see if there is MIDI input waiting to be parsed. Returns 1 if a new message is waiting or 0 zero when the MIDI buffer was empty. A negative number signals an error.
- Note
Use the functions get_status(), get_data1() and get_data2() to get the actual information contained in the message.
-
Method get_status
int Public.Sound.Midi.Device()->get_status()
- Description
Retreive the status byte from the last read message.
-
Method is_data1
int Public.Sound.Midi.Device()->is_data1()
- Description
Retreive the first data byte from the last read message.
-
Method is_data2
int Public.Sound.Midi.Device()->is_data2()
- Description
Retreive the second data byte from the last read message.
-
Method is_data1
int Public.Sound.Midi.Device()->is_data1()
- Description
Retreive the first data byte from the last read message.
-
Method close
int Public.Sound.Midi.Device()->close()
- Description
Close this device. Returns zero or an error code.
|