Re: [pygame] detectng midi events in pygame?

2010-12-17 Thread Brian Gryder
Thanks for your reply Lenard, I looked at the examples and created this working program (see program below). When I close the program, this error message appears in the terminal: PortMidi call failed... PortMidi: `Bad pointer' type ENTER... What can I change in the program to avoid the

Re: [pygame] detectng midi events in pygame?

2010-12-17 Thread Lenard Lindstrom
Hi, See below: On 17/12/10 05:13 PM, Brian Gryder wrote: #--start miditest.py-- import pygame import pygame.midi from pygame.locals import * [snip some code] print exit button clicked. i.close() Replace i.close() with del i pygame.midi.quit() pygame.quit()

[pygame] detectng midi events in pygame?

2010-12-15 Thread Brian Gryder
How can I detect midi events in pygame? I am able to detect the count of MIDI devices and input and output device names (see program below) I'd like to display the midi note names like C3 ON or D3 OFF. I am using the JACK Audio Connection Kit. Any code snippets, links to articles, or suggestions

Re: [pygame] detectng midi events in pygame?

2010-12-15 Thread Lenard Lindstrom
Hi Brian, The pygame midi.py example has an input event display mode. python -m pygame.examples.midi -i It is in the examples subdirectory in the pygame package directory. Unfortunately, the PortMidi with pygame.midi wraps does not have a midi event callback option, so midi events must be