Interested in a training?
Contact us for a trainings and events or meet us at Real World in Orlando, Florida.
Contact us for a trainings and events or meet us at Real World in Orlando, Florida.
MBS Real Studio Plugin Tutorial Videos
Midi Receive Source
Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
End Class
Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
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
wend
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
Return
end if
end if
end if
next
MsgBox "No MIDI input device found."
quit
End Sub
End Class
Loading
Links
MBS Real Studio PDF Plugins - Bilder aus Nickenich