MIDI-OX User Forum (http://www.midiox.com/cgi-bin/yabb/YaBB.pl)
MIDI-OX >> Scripting Questions >> I can't get VBScript to see MIDI IN
(Message started by: rvanlaake on Nov 17th, 2017, 12:35pm)

Title: I can't get VBScript to see MIDI IN
Post by rvanlaake on Nov 17th, 2017, 12:35pm
Hello,

I am a newbie and am trying to get my VBScript (below) to work.... but with no luck. I am using a Boss GT-10 to send data (omni channel ON); I can see in the MIDIOX interface that the data comes in. But MOX.GetMidiInput() doesn't give any data, and  OnTrigger_MidiInput never gets called (the MsgBoxes never get shown). The connection between MIDIOX and my script is there; I can shut down MIDIOX with the option to also shutdown the script and it closes neatly with the "Goodbye" message.

What am I doing wrong????

Set MOX                  = WScript.CreateObject("Midiox.MoxScript.1", "OnTrigger_")  

MOX.FireMidiInput = 1
MOX.DivertMidiInput = 1      

While MOX.ShouldExitScript = 0
     str = MOX.GetMidiInput()
     If str <> "" Then
           MsgBox "midi input MOX.GetMidiInput!!! " & str
     End If
Wend

MOX.FireMidiInput = 0
MOX.DivertMidiInput = 0      
MOX.ShutdownAtEnd = True
Set MOX                  = Nothing
MsgBox "Goodbye"

'================================================================================
Sub OnTrigger_MidiInput( timestamp, status, chan, dat1, dat2)
     MsgBox " midi input OnTrigger_MidiInput !! *timestamp= " & timestamp & " *status= " & status & " *chan= " & chan & " *dat1= " & dat1 & " *dat2= " & dat2
End Sub

Title: Re: I can't get VBScript to see MIDI IN
Post by rvanlaake on Nov 18th, 2017, 7:51am
Fixed! It was the MIDI filter...

I was surprised to see that the MIDI filtering was an opt-out instead of opt-in. Also the fact that I could see the data pouring in in the MIDIOX interface led me to believe that there was a mistake in my programming instead of in my configuartion of MIDIOX.

Title: Re: I can't get VBScript to see MIDI IN
Post by Breath on Nov 19th, 2017, 8:14pm
Glad you sorted it. Well done.

All the best
Royce



MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.