|
||
Title: Problems with COM Scripting (Python) Post by NeoAlus on Sep 22nd, 2002, 4:16am I have found two problems with accessing the COM interface from Python. The first is that for some reason the event callback (OnMidiInput) sems to be called sporadically and obviously not frequently enough to receive all of the MIDI data which is being generated. (Watching for a certain event, I find it once in about 1/1000th of the time. Sometimes 4 or so in a row.) The second problem is that calls to OutputMidiMsg() don't appear to send any data to MIDI-OX unless I set DivertMidiData to 1. (which means I'd have to script all the MIDI-routing I'm already doing in MIDI-OX) I'm not sure if these problems only occur when accessing the COM API from Python or if they are more common. -NeoAlus |
||
Title: Re: Problems with COM Scripting (Python) Post by Jamie OConnell on Sep 22nd, 2002, 3:03pm OnMidiInput() should be called for each event in the stream. To verify this you can create a test loop that does nothing but send each item received in OnMidiInput() back to MIDI-OX using OutputMidiMsg(). You should see all data in the output monitor with 'COM' in the input device field. There is a supplied example which does this: MOXPythonDemo.py |
||
Title: Re: Problems with COM Scripting (Python) Post by cappy2112 on Mar 21st, 2005, 12:10pm on 09/22/02 at 15:03:03, Jamie OConnell wrote:
Jamie In the MOXPythonDemo.py file, you have this comment # Python Native example. This uses Python Win32 COM to generate a Sink # This must be run under PythonWin.exe environment (or matbe IDLE), not Python.exe # or Pythonw.exe -- there are known problems running Win32UI module. I've run python scripts (not related to Midiox) which use win32ui, win32con win32com, using Python.exe. I'm wondering why your comment states that the MOXPythonDemo.py file has to be run from PythonWin.exe. This was written about 2 years ago and several revs of Python have been released since then. |
||
Title: Re: Problems with COM Scripting (Python) Post by Jamie OConnell on Mar 22nd, 2005, 8:30pm Quote:
Exactly. It could be well out of date. Let me know if it is. |
||
Title: Re: Problems with COM Scripting (Python) Post by cappy2112 on May 21st, 2006, 11:33pm Can I use any of the DLL's from Midiox thru Python (either with or without COM) to send/receive sysex? Ideally, I'd like to supply just a python script (and any necessary Midiox dlls) to be able to send/receive sysex, without the Midiox GUI from showing. Can this be done ? if so, how ? thanks |
||
MIDI-OX User Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |