Midi Receive Source

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /kunden/macsw.de/webseiten/monkeybreadsoftware-video/rbformat/rbcode.php on line 244
Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
End Class

Class Window1
Inherits Window
// Controls
End ControlInstance
Sub Action() Handles Event
dim d as PortMidiEventMBS

while s.Poll<>0

dim e as integer = s.Read(d)
if e = 1 then

List.AddRow Format(d.When, "0")
List.Cell(List.LastIndex, 1) = str(d.Status)
List.Cell(List.LastIndex, 2) = str(d.Data1)
List.Cell(List.LastIndex, 3) = str(d.Data2)
List.ScrollPosition = List.LastIndex
end if

End Sub
End ControlInstance

// Properties
Dim p As PortMidiMBS

Dim s As PortMidiStreamMBS

// Event implementations
Sub Open()
p = new PortMidiMBS

dim c as integer = p.CountDevices - 1

for DeviceID as integer = 0 to c

dim info as PortMidiDeviceInfoMBS = p.DeviceInfo(DeviceID)

if info<>nil then
if info.HasInput then

// found device
s = new PortMidiStreamMBS
dim e as integer = s.OpenInput(DeviceID, 100)

if e = 0 then
Title = info.Name+" - "+info.InterfaceName
end if
end if
end if

MsgBox "No MIDI input device found."

End Sub
End Class

Watch other Xojo videos:

ThumbnailMBS Xojo Plugin, June 2021 News


27:58 minutes
ThumbnailMBS Xojo Plugins 21.1


23:12 minutes
ThumbnailInstalling a Xojo Web App Server


28:19 minutes
ThumbnailMBS Plugin Installation Win


22:03 minutes
ThumbnailMBS Plugin Installation Mac


25:17 minutes
ThumbnailXDC 2020 MBS Plugins Presentation


38:59 minutes

MBS Xojo Plugins

Start Chat