Platforms to show: All Mac Windows Linux Cross-Platform

MidiClientMBS.Available as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: True if the MIDI stuff was successfull loaded.

Feedback, Comments & Corrections

MidiClientMBS.close
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: The destructor.
Notes: There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.

Feedback, Comments & Corrections

MidiClientMBS.CreateDestination(name as CFStringMBS, TargetEndpointObject as MidiEndpointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.4 Yes No No Yes, macOS only No
Function: Create a virtual destination in a client.
Notes:
Clients may use this to create virtual destinations.
Lasterror is set.
You must pass a valid new MidiEndpointMBS for TargetEndpointObject. Best is if you make a subclass from MidiEndpointMBS and fill the event. You can add there additional methods and properties. CreateDestination will than fill the handle property on success.

Feedback, Comments & Corrections

MidiClientMBS.CreateInputPort(name as CFStringMBS, targetportobject as MidiPortMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Create an input port through which the client may receive incoming MIDI messages from any MIDI source.
Example:
dim mc as MidiClientMBS
dim mp as MidiPortMBS

mc=new MidiClientMBS
mc.Init NewCFStringMBS("Testapp")

mp=new MidiPortMBS
mc.CreateInputPort NewCFStringMBS("Testport"), mp

if mp.Handle=0 then
MsgBox "There was an error: "+str(mc.Lasterror)
else
MsgBox "ok"
end if
Notes:
After creating a port, use MIDIPortConnectSource to establish an input connection from any number of sources to your port.

Lasterror is set.

As you can subclass the MidiPortMBS class you must pass to this function a valid MidiPortMBS object so it can be filled.

Feedback, Comments & Corrections

MidiClientMBS.CreateOutputPort(name as CFStringMBS, targetportobject as MidiPortMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Create an output port through which the client may send outgoing MIDI messages to any MIDI destination.
Example:
dim mc as MidiClientMBS
dim mp as MidiPortMBS

mc=new MidiClientMBS
mc.Init NewCFStringMBS("Testapp")

mp=new MidiPortMBS
mc.CreateOutputPort NewCFStringMBS("Testport"), mp

if mp.Handle=0 then
MsgBox "There was an error: "+str(mc.Lasterror)
else
MsgBox "ok"
end if
Notes:
Output ports provide a mechanism for MIDI merging. The system assumes that each output port will be responsible for sending only a single MIDI stream to each destination, although a single port may address all of the destinations in the system.

Lasterror is set.

As you can subclass the MidiPortMBS class you must pass to this function a valid MidiPortMBS object so it can be filled.

Feedback, Comments & Corrections

MidiClientMBS.CreateSource(name as CFStringMBS) as MidiEndpointMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.3 Yes No No Yes, macOS only No
Function: Creates a new virtual Midi source.
Example:
dim m as MidiClientMBS
dim e as MidiEndpointMBS

m=new MidiClientMBS

// Initialize
m.Init NewCFStringMBS("Hallo")

// Create device:
e=m.CreateSource(NewCFStringMBS("Hallo"))

// if error is 0 and handle is not 0, it's okay
MsgBox "error: "+str(m.Lasterror)+", handle: "+str(e.Handle)
Notes:
Lasterror is set.
Returns nil on any error.

Clients may use this to create virtual sources.

After creating a virtual source, use Received to transmit MIDI messages from your virtual source to any clients connected to the virtual source.

Feedback, Comments & Corrections

MidiClientMBS.FindObjectByUniqueID(id as Integer) as MidiObjectMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.3 Yes Yes No Yes No
Function: Locate a device, typedefal device, entity, or endpoint by its uniqueID.
Notes:
New for CoreMIDI 1.3.
You may cast the returned object to MidiEndpointMBS, MidiEntityMBS or MidiDeviceMBS. RB's "isa" command may help you.
Returns nil on any error. Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.GetDestination(index as Integer) as MidiEndpointMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Return one of the destinations in the system.
Notes:
The index goes from 0 to NumberOfDestinations-1.
Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

MidiClientMBS.GetDevice(index as Integer) as MidiDeviceMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Return one of the devices in the system.
Notes:
To enumerate the entities in the system, you can walk through the devices, then walk through the devices' entities.

Note: If a client iterates through the devices and entities in the system, it will not ever visit any virtual sources and destinations created by other clients. Also, a device iteration will return devices which are "offline" (were present in the past but are not currently present), while iterations through the system's sources and destinations will not include the endpoints of offline devices.

Thus clients should usually prefer NumberOfSources, GetSource, NumberOfDestinations and GetDestination to iterating through devices and entities to locate endpoints.

Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

MidiClientMBS.GetExternalDevice(index as Integer) as MidiDeviceMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Return one of the external devices in the system.
Notes:
The index goes from 0 to NumberOfDevices-1.
Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

MidiClientMBS.GetSource(index as Integer) as MidiEndpointMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Return one of the sources in the system.
Notes:
The index goes from 0 to NumberOfSources-1.
Lasterror is set.
Returns nil on any error.

Feedback, Comments & Corrections

MidiClientMBS.Init(name as CFStringMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Creates a new Client object with the given client name.
Notes: Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.NumberOfDestinations as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Returns the number of destinations in the system.
Example:
dim m as new MidiClientMBS
dim n as Integer = m.NumberOfDestinations

MsgBox "NumberOfDestinations: "+str(n)
Notes:
Returns 0 on any error.
Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.NumberOfDevices as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Returns the number of devices in the system.
Example:
dim m as new MidiClientMBS
dim n as Integer = m.NumberOfDevices

MsgBox "NumberOfDevices: "+str(n)
Notes:
Returns 0 on any error.
Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.NumberOfExternalDevices as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Returns the number of typedefal MIDI devices in the system.
Example:
dim m as new MidiClientMBS
dim n as Integer = m.NumberOfExternalDevices

MsgBox "NumberOfExternalDevices: "+str(n)
Notes:
External MIDI devices are MIDI devices connected to endpoints via a standard MIDI cable. Their presence is completely optional, only when a UI somewhere adds them.

New for CoreMIDI 1.1.

Returns 0 on any error.
Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.NumberOfSources as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.1 Yes No No Yes, macOS only No
Function: Returns the number of sources in the system.
Example:
dim m as new MidiClientMBS
dim n as Integer = m.NumberOfSources

MsgBox "NumberOfSources: "+str(n)
Notes:
Returns 0 on any error.
Lasterror is set.

Feedback, Comments & Corrections

MidiClientMBS.Send(port as MidiPortMBS, endpoint as MidiEndpointMBS, packets as MidiPacketListMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacCF Plugin 3.3 Yes No No Yes, macOS only No
Function: Sends midi data using the port to the given endpoint.
Example:
// Not 100% if this example works:
dim client as MIDIClientMBS
dim outport as MIDIPortMBS
dim dest as MIDIEndpointMBS
dim pack as MIDIPacketMBS
dim list as MIDIPacketListMBS
dim packs(-1) as MIDIPacketMBS

client = new MidiClientMBS

if client <> nil then
client.Init newcfstringmbs("CoreMIDI")
outport = new MIDIPortMBS
client.CreateOutputPort(NewCFStringMBS("outport"), outport)
dest = client.getDestination(0)
outport.connectSource dest

pack = new MIDIPacketMBS
list = new MIDIPacketListMBS
pack.timeStamp = nil
pack.datastring = chrb(&h90)+chrb(&h5A)+chrb(&h7C)
packs.append pack
if not list.FillList(packs) then
msgBox "bad"
end

client.Send(outport, dest, list)
end
Notes:
Events with future timestamps are scheduled for future delivery. The system performs any needed MIDI merging.

Lasterror is set.

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS FileMaker Plugins