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

Re: [pygame] Getting midi events for midi files playing in pygame



Hi,

you should be able to do it with pygame.midi with a fair bit of work.  However pygame currently does not have any special midi timing code, so you'd have to write that yourself (or maybe someone else has written some).  You'd also need to do the midi file parsing yourself.  There's probably existing packages to do both though.

There's the pygame.midi module, which can get input midi, and also output midi.  There is also pygame.music.play which can play midi.



On Wed, Oct 27, 2010 at 5:20 PM, Ivan DelSol <sunspider@xxxxxxxxx> wrote:
I'm writing a visualizer for midi in pygame. Currently, I play a midi
file in one program and get midi events in pygame via a virtual patch
cable.
I'd much rather play the midi file in pygame and receive the events,
so that the user doesn't have to run a virtual patch program at the
same time. Is that possible?