Midi In Sample

Apr 23, 2012 at 5:31 AM

Do you have a simple asmple to read input? I used the following code but cannot trigger an input event.

 

 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Minput =New MidiInputDevice 

Minput.Open(0)

 

Me.Text = Minput.Name

Minput.Start()

MsgBox(Minput.Connected)

 

AddHandler Minput.LongMsgReceived, AddressOf shortinput

 

End Sub
Private Sub shortinput(ByVal sender As Object, ByVal e As MidiServices.LongMsgReceivedEventArgs)

MsgBox(e.Message)

End Sub