Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsMidiMBS class.

WindowsMidiMBS.Connect(output as WindowsMidiOutputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
The Connect function connects a MIDI input device to a MIDI thru or output device, or connects a MIDI thru device to a MIDI output device.

self must be a MIDI input device or a MIDI thru device.
output must be the MIDI output or thru device.

After calling this function, the MIDI input device receives event data in an DeviceData event whenever a message with the same event data is sent to the output device driver.

A thru driver is a special form of MIDI output driver. The system will allow only one MIDI output device to be connected to a MIDI input device, but multiple MIDI output devices can be connected to a MIDI thru device. Whenever the given MIDI input device receives event data in an DeviceData event, a message with the same event data is sent to the given output device driver (or through the thru driver to the output drivers).

Lasterror is set.

WindowsMidiMBS.Disconnect(output as WindowsMidiOutputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
The Disconnect function disconnects a MIDI input device from a MIDI thru or output device, or disconnects a MIDI thru device from a MIDI output device.

self must be a MIDI input device or a MIDI thru device.
output must be the MIDI output device to be disconnected.

MIDI input, output, and thru devices can be connected by using the Connect function. Thereafter, whenever the MIDI input device receives event data in an DeviceData event, a message with the same event data is sent to the output device driver (or through the thru driver to the output drivers).

Lasterror is set.

WindowsMidiMBS.Idle

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Processes events.

Midi events are buffered in data structures. This method dispatches them to the Xojo event handlers.
Call this method as often as you need events to fire. For example every 100ms in a timer.

WindowsMidiMBS.InputDevice(index as Integer) as WindowsMidiInputInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
The InputDevice function queries a specified MIDI input device to determine its capabilities.
Example
dim midi as WindowsMidiMBS // your midi object
dim n,c as Integer
dim i as WindowsMidiInputInfoMBS

c=midi.NumberOfMidiInputDevices-1

for n=0 to c
i=midi.InputDevice(n)

listbox1.AddRow str(n+1)
listbox1.Cell(listbox1.LastIndex,1)=i.Name
listbox1.Cell(listbox1.LastIndex,2)=hex(i.DriverVersion)

next

Index is from 0 to NumberOfMidiInputDevices-1.

Some examples using this method:

WindowsMidiMBS.NumberOfMidiInputDevices as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Returns the number of MIDI input devices present in the system.
Example
dim midi as new WindowsMidiMBS
MsgBox str(midi.NumberOfMidiInputDevices)

A return value of zero means that there are no devices.

Some examples using this method:

WindowsMidiMBS.NumberOfMidiOutputDevices as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Returns the number of MIDI output devices present in the system.
Example
dim midi as new WindowsMidiMBS
MsgBox str(midi.NumberOfMidiOutputDevices)

A return value of zero means that there are no devices.

Some examples using this method:

WindowsMidiMBS.OutputDevice(index as Integer) as WindowsMidiOutputInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
The OutputDevice function queries a specified MIDI output device to determine its capabilities.
Example
dim midi as WindowsMidiMBS // your midi object
dim c,n as Integer
dim o as WindowsMidiOutputInfoMBS

c=midi.NumberOfMidiOutputDevices-1

for n=0 to c
o=midi.OutputDevice(n)

listbox2.AddRow str(n+1)
listbox2.Cell(listbox2.LastIndex,1)=o.Name
listbox2.Cell(listbox2.LastIndex,2)=hex(o.DriverVersion)

next

Index is from 0 to NumberOfMidiOutputDevices-1.

Some examples using this method:

The items on this page are in the following plugins: MBS Audio Plugin.


The biggest plugin in space...