For reference, I couldn't do what I wanted using pygame alone, but with midi-ox and midi-yoke I was able to play the midi file and use virtual midi-patches to pipe info to both pygame and my system's midi player. Neat!
On Oct 27, 10:33 am, René Dudfield <[email protected]> wrote: > 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 <[email protected]> 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?
