MIDI Output – Giavapps MIDI

midi_output_device_count() Returns the amount of connected MIDI Output devices. This function detects new connected MIDI Output devices.

 

midi_output_device_name(DeviceIndex) Returns the name of a connected MIDI Output device.

DeviceIndex: zero-based index of the device.

 

midi_output_auto_open(AutoOpen) Specifies if Giavapps MIDI should automatically open all connected MIDI Output devices. By default this feature is disabled.

AutoOpen: enable (true) or disable (false) the auto open feature.

 

midi_output_open(DeviceIndex) Opens the specified MIDI Output device. Only opened devices can receive messages.

DeviceIndex: zero-based index of the device.

 

midi_output_open_all() Opens all connected MIDI Output devices.

 

midi_output_close(DeviceIndex) Closes the specified MIDI Output device.

DeviceIndex: zero-based index of the device.

 

midi_output_close_all() Closes all connected MIDI Output devices.

 

midi_output_instrument(DeviceIndex, Channel, InstrumentNumber) Sets the specified instrument to a connected MIDI Output device.

DeviceIndex: zero-based index of the device.
Channel: MIDI Channel (015).
InstrumentNumber: instrument number (0127).

 

midi_output_pan(DeviceIndex, Channel, Pan) Sets the specified panning to a connected MIDI Output device.

DeviceIndex: zero-based index of the device.
Channel: MIDI Channel (015).
Pan: panning (0127), 0 = left, 64 = center, 127 = right.

 

midi_output_note_on(DeviceIndex, Channel, NoteNumber, Velocity) Plays the specified note on a connected MIDI Output device.

DeviceIndex: zero-based index of the device.
Channel: MIDI Channel (015).
NoteNumber: note number (0127).
Velocity: velocity (0127).

 

midi_output_note_on_ext(DeviceIndex, Channel, InstrumentNumber, Pan, NoteNumber, Velocity) Calls midi_output_instrument(), midi_output_pan(), midi_output_note_on() functions all in one.

DeviceIndex: zero-based index of the device.
Channel:
channel (015).
InstrumentNumber: channel (0127).
Pan: panning (0127), 0 = left, 64 = center, 127 = right.
NoteNumber: note number (0127).
Velocity: velocity (0127).

 

midi_output_note_off(DeviceIndex, Channel, NoteNumber) Stops the specified note on a connected MIDI Output device.

DeviceIndex: zero-based index of the device.
Channel: MIDI Channel (015).
NoteNumber: note number (0127).

 

midi_output_message(DeviceIndex, Byte1, Byte2, Byte3) Sends a custom message to a connected MIDI Output device. This function is for advanced users only. For more info about MIDI Messages click here.

DeviceIndex: zero-based index of the device.
Byte1: first byte.
Byte2: second byte.
Byte3: third byte.

 

Code Examples

 

Checking Available MIDI Output Devices

 

show_message(‘You have ‘+string(midi_output_device_count())+‘ usable MIDI Output devices on this computer!’);

for
(i = 0; i < midi_output_device_count(); i++)
{
show_message(‘ID: ‘+string(i)+‘#NAME: "’+midi_output_device_name(i)+‘"’);
}

 

Enabling Auto Open Feature

 

midi_output_auto_open(1);//automatically opens all connected MIDI Output devices

 

Sending a Custom Message to a connected MIDI Output Device

 

midi_output_message(0,144,60,100);//FIRST OUTPUT DEVICE – NOTE C5 ON – CHANNEL 1 – VELOCITY 100

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Leave a Reply

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

*