[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.midi using portmidi?



So it looks like the midi module was always working fine on the mac's that I tested on.

What wasn't working was print statements going to the console after pygame.init is called, but only on one computer. stderr kept going to the console, but all stdout (which print was going to) got swallowed, making me thing the midi example was not getting events in the input test

The stdout problem seems to happen with multiple pygame (1.8.1 and 1.9.0) and python (2.5, 2.6) versions. Both computers are OS X Leopard and have the exact same versions of SDL stuff. The one that has the stdout going away problem is an iMac with a Leopard upgrade. the one that keeps stdout working just fine is a mac mini with a fresh leopard install.

would be nice to be fixed I guess, but I have no idea where I'd start looking for a cause...


On Mon, Jan 26, 2009 at 1:21 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
Hi,

this notes a patch for 10.5sdk
http://lists.create.ucsb.edu/pipermail/media_api/2009-January/000703.html

Also found a section on OSX here:
http://cratel.wichita.edu/cratel/cratel_pyportmidi

Also, have you tried the .c test programs that come with portmidi?

cheers,


On Sun, Jan 25, 2009 at 9:15 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
> So I got pygame building on mac with portmidi now - although I can't seem to
> get the midi.py example to do anything.
>
>  the xcode proj for portmidi seems to have the porttime sources incorporated
> into it, rather than built as a separate lib, so the porttime dependency
> doesn't exist, which was causing trouble. Also the static libportmidi.a lib
> requires linkage to the CoreMidi framework, which was also causing trouble.
>
> So I decided to kill 2 birds with one stoney-hack and made PORTTIME
> dependency be a dependency on porttime.
>
> But now when I install the pygame on a machine with a midi keyboard
> attached, and run examples/midi.py with either --output or --list, it waits
> a long time, then prints "in stat: : No such file or directory" 4 times.
>
> looking at portmidi's sources, that error seems to com from it trying to
> read the "/PortMidi/PM_RECOMMENDED_INPUT_DEVICE" setting from some prefs
> file "com.apple.java.util.prefs.plist" as part of it's initialization.
>
> It seems really bizarre and rather dumb to me that portmidi would use java
> for anything, and I'm starting to wonder if the thing even works on
> Leopard...
>
>
> On Tue, Jan 13, 2009 at 2:49 PM, René Dudfield <renesd@xxxxxxxxx> wrote:
>>
>> I think with portmidi, compiling it ourselves on mac is the way to go.
>>  Seemed easy to compile on win/linux... so hopefully it compiles ok on
>> mac too.
>>
>
>