User Forum    :: Powered by YaBB
  Ā« MIDI-OX User Forum - MIDI in stream Ā»
Welcome, Guest. Please Login or Register.
May 9th, 2025, 9:06am


Home Home Help Help Search Search Members Members Login Login Register Register


   MIDI-OX User Forum
   MIDI-OX
   Scripting Questions
(Moderator: Jamie OConnell)
   MIDI in stream
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: MIDI in stream  (Read 2564 times)
firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
MIDI in stream
« on: Jan 5th, 2004, 2:29pm »
Quote Quote Modify Modify

Hi
 
First of all, many thanks for developing this program. At the risk of sounding like some kind of evangelist, I have to say that it's changed my life. I play keyboards in a couple of bands, and it has made the whole process of patch / keyboard mapping virtually painless.
 
I've been developing a custom front end to let me use the rotary controllers on my keyboard to set sysex parameters. Unfortunately, although I can send MIDI info to the Ox, I can't read the incoming MIDI data.
 
I'm using MS Excel as a VB host under Windows XP. I had to change the syntax to open the MIDI Ox instance to 'Set mox = CreateObject("MIDIOX.MOXScript.1")'. Do I need to make any similar changes to the syntax for the MIDI in mapping?
 
Thanks again
 
Firebeard
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: MIDI in stream
« Reply #1 on: Jan 6th, 2004, 11:26am »
Quote Quote Modify Modify

I have never tried using VBA or Excel as the scripting engine, but I wouldn't be suprised if the syntax was somewhat different.  You should look for the method that VBA uses to implement connection point sinks or else try using the polling method of obtaining input.
IP Logged

--Jamie
Music is its own reward.

firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
Re: MIDI in stream
« Reply #2 on: Jan 20th, 2004, 6:03am »
Quote Quote Modify Modify

Jamie
 
Many thanks for your reply. I've installed WSH on my PC now, as VBA seems to know nothing about connection sinks or polling. I don't know if I've installed the right thing, though. It seems to be XML based, and the syntax seems to be quite different from what I'm used to. It even seems to be different from the scripting example in MIDI Ox help.
 
In Excel, I now have the option under {Tools / Macros} to go into Microsoft Script Editor, but this just gives me pages of native XML derived (presumably) from each worksheet. Before I get into trying to learn another new programming language (ho hum), could you please confirm that I am indeed using the right application?  
 
If you've got any ideas on any of this, I'd love to hear them!
 
Regards
 
Firebeard
IP Logged
firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
Re: MIDI in stream
« Reply #3 on: Jan 20th, 2004, 8:03am »
Quote Quote Modify Modify

Hello again
 
I've had another look at the VBA processing. The message I get when I try to use the standard code is 'the remote server machine does not exist or is unavailable'. I've tried re-registering the application, but still get this message. I think if I can get this sorted out, I should be OK.
 
The only other time I've seen this message is if I shut down MIDI Ox while my code is still running. Is there anything else I can try?
 
Thanks again
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: MIDI in stream
« Reply #4 on: Jan 24th, 2004, 1:41pm »
Quote Quote Modify Modify

It sounds to me like the VBA implementation of CreateObject() is different than the WSH version.  I have seen a similar one, where the 2nd parameter refers to a remote machine, rather than a connection point sync.  Check the VBA documentation for a full answer to that.
 
 
WSH (Windows Script Host) is not XML based: that must be something else?  WSH comes pre-installed on Windows XP: you should be able to run any of the example VBScript scripts that are installed with MIDI-OX.
« Last Edit: Jan 24th, 2004, 1:44pm by Jamie OConnell » IP Logged

--Jamie
Music is its own reward.

Peter L Jones
Expert
*****




Hit it

   
WWW

Gender: male
Posts: 978
Re: MIDI in stream
« Reply #5 on: Jan 24th, 2004, 7:45pm »
Quote Quote Modify Modify

Quote:
WSH (Windows Script Host) is not XML based

The "job" interface is XML based - I don't remember the file extension, though.  This lets you describe the scripting environment and, I think, provides right-click menu options for launching particular tasks from the file.
 
E.g. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script5 6/html/wsAdvantagesOfWs.asp
 
Extension for the XML files is .wsf.
« Last Edit: Jan 24th, 2004, 7:54pm by Peter L Jones » IP Logged

"...Playing fast around the drums is one thing. But to play with people for others, to listen to, that's something else. That's a whole other world." -- Tony Williams
firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
Re: MIDI in stream
« Reply #6 on: Jan 25th, 2004, 8:18pm »
Quote Quote Modify Modify

Hello
 
Thanks for your replies so far. What I thought was WSH is actually Microsoft Script Editor - sorry for the confusion.  
 
I've got the WSH library and object model loaded, I think. I've attached wshom.ocx and wshcon.dll attached to my VBA project. I can't see any other likely candidates for WSH.
 
Am I trying something impossible here? Are connection sinks something that native VB can handle but the dumbed-down VBA can't?
 
 
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: MIDI in stream
« Reply #7 on: Jan 26th, 2004, 3:09am »
Quote Quote Modify Modify

The scripts supplied with MIDI-OX all run vanilla VBScript.  Have you tried running any of them yet?  You run any of them by just double-clicking on them in Windows Explorer.
 
If you want to use VBA, you'll need to either find out how it implements connection sinks, or use the Polling method for obtaining MIDI Input.
IP Logged

--Jamie
Music is its own reward.

firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
Re: MIDI in stream
« Reply #8 on: Feb 8th, 2004, 2:42pm »
Quote Quote Modify Modify

Hi
 
Thanks again for your reply. The closest I can find relating to connection point sinks in VBA is events, but I'm not at all sure whether this will work. I don't really know enough about VBA, I guess.  
 
Has anyone out there ever tried getting Excel to read incoming MIDI ox MIDI data?  
 
IP Logged
firebeard
New Member
*




MIDI-OX Rules!

   


Posts: 6
Re: MIDI in stream
« Reply #9 on: Feb 14th, 2004, 5:47pm »
Quote Quote Modify Modify

I've got this sorted out. I had wrongly assumed that the MIDI Ox computer keyboard, which I used for testing my code, would appear as a MIDI message.  
 
When I used a normal MIDI keyboard, the code worked fine.
 
Thanks to everyone for their help on this
IP Logged
Jamie OConnell
Administrator
*****






   
WWW Email

Gender: male
Posts: 2027
Re: MIDI in stream
« Reply #10 on: Feb 15th, 2004, 1:34am »
Quote Quote Modify Modify

Quote:
I've got this sorted out. I had wrongly assumed that the MIDI Ox computer keyboard, which I used for testing my code, would appear as a MIDI message.

 
To use the MIDI-OX computer Keyboard as an input device to the script engine, you'd have to launch a second instance of MIDI-OX and connect them via MIDI Yoke or another Virtual driver.
IP Logged

--Jamie
Music is its own reward.

Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »


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