Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsMidiOutputMBS class.

WindowsMidiOutputMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Closes the output device.

Closes the device with waiting till device is done.
Handle is set to 0 and lasterror is set.

WindowsMidiOutputMBS.Open(DeviceID as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Opens the midi device with the given index.

DeviceID is from 0 to NumberOfMidiOutputDevices-1.
Lasterror is set.

WindowsMidiOutputMBS.OpenDefault

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Opens the Midi mapper which opens the device the user selected as the default midi device.

If only one midi output device is available this one is opened.
On success the handle property is not zero.
Lasterror is set.

Some examples using this method:

WindowsMidiOutputMBS.OutputErrorText(errorcode as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Translates an error number into a human readable text.

Returns "" on unknown errros.
String returned has Windows ANSI text encoding.

WindowsMidiOutputMBS.Reset

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Resets the output device.

Lasterror is set.

WindowsMidiOutputMBS.SendData(data as memoryblock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 12.5 ❌ No ✅ Yes ❌ No ❌ No All
Sends sysex data.

Lasterror is set.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798474(v=vs.85).aspx

See also:

WindowsMidiOutputMBS.SendData(data as memoryblock, size as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Sends sysex data.
Example
dim m as MemoryBlock
dim o as WindowsMidiOutputMBS // your midi output

m=NewMemoryBlock(8)

m.Byte(0)=&hF0
m.Byte(1)=&h7F
m.Byte(2)=&h7F
m.Byte(3)=&h04
m.Byte(4)=&h01
m.Byte(5)=&h7F
m.Byte(6)=&h7F
m.Byte(7)=&hF7

o.SendData m

Lasterror is set.
size is the size of the memoryblock to use. A wrong value will crash the application.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798474(v=vs.85).aspx

See also:

WindowsMidiOutputMBS.SendData(data as string)

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

Lasterror is set.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798474(v=vs.85).aspx
The plugin prepares MIDIHDR structure and uses your data there.

See also:

WindowsMidiOutputMBS.SendMessage(message as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Sends a short midi message immediately.
Example
dim o as WindowsMidiOutputMBS // your windows midi output
// &h90 = Note down
// &h43 = the note number
// &h40 = the velocity
o.SendMessage &h404390

The message is stored in one 32bit integer.
lowest 8 bit is status, second 8 bit is data1, third 8 bit is data2 and highest 8 bit is left 0.

Between sending note on and off messages, you need to leave time for actual playback.
Lasterror is set.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798481(v=vs.85).aspx

See also:

WindowsMidiOutputMBS.SendMessage(status as Integer, data1 as Integer, data2 as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
Sends a short midi message immediately.
Example
dim o as WindowsMidiOutputMBS // your windows midi output
// &h90 = Note down
// &h3C = the note number
// &h40 = the velocity
o.SendMessage &h90, &h3C, &h40

Lasterror is set.
Between sending note on and off messages, you need to leave time for actual playback.

see also
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798481(v=vs.85).aspx

See also:

WindowsMidiOutputMBS.Volume as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS Audio Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No All
The volume to be used for this device.
Example
dim m as WindowsMidiOutputMBS // your midi output

m.Volume=0 // all silent
m.Volume=&hFFFF0000 // right only
m.Volume=&h0000FFFF // left only or max volume for mono device
m.Volume=&h7FFF7FFF // half volume for both channels

Not all devices can set the volume.
Lasterror is set.

The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting. A value of &hFFFF represents full volume, and a value of &h0000 is silence.

If a device does not support both left and right volume control, the low-order word of dwVolume specifies the mono volume level, and the high-order word is ignored.
(Read and Write computed property)

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


The biggest plugin in space...