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

Re: [pygame] MIDI output on OS X???



Hi,

it seems to be able to list output devices that are plugged in.  Like it lists my midi keyboard when plugged in.

However it does not seem to list the internal midi hardware on sound cards.

pygame.midi uses CoreMIDI through portaudio on OSX.  pygame.music.midi uses a different older API.  So maybe that's the cause of the problems.

Will need to look into it some more.  If you can, please ask on the portmedia mailing list at: http://lists.create.ucsb.edu/mailman/listinfo/media_api

If you can't post, I'll follow up on it later there.


cheers,


On Thu, Oct 8, 2009 at 10:20 AM, Chris Phoenix <cphoenix@xxxxxxxxx> wrote:
I'd like to make a MIDI sound from a Python program. PyGame's midi
module was supposed to do it, but it doesn't seem to have a default
midi output device - or any midi output device!

pygame.midi.get_default_output_id() returns -1. Half an hour of
googling didn't help. Looking at the unit tests didn't help (there's a
bugfix aimed at this problem, but it seems to just bypass the test).

The mixer module can indeed read a midi file and make a sound come out
the speakers, but I'd rather drive the midi directly instead of
writing mini-files and playing them...

What should I pass in to pygame.midi.Output() on 10.5? Or what should
I do to create the midi device so that
pygame.midi.get_default_output_id() will tell me something other than
-1?

Thanks...

Chris

--
Chris Phoenix
cphoenix@xxxxxxxxx
650-776-5195

Director of Research
Center for Responsible Nanotechnology
http://CRNano.org