Closed benjamind2008 closed 12 years ago
Unfortunately I cannot reproduce your issue. I ran the code and it runs for 10 seconds, printing every MIDI message received from my MIDI controller. Running it again, it only prints new messages.
Actually, since the same messages show up in different runs of the program for you, I can hardly imagine this being an issue with RtMidi or the Python module. What OS are you using and what kind of MIDI port is number 2 on your system? Also, have you double-checked the output of the program that generates the messages, e.g. by recording them in a sequencer?
Thanks Guido. I think it could be the LoopBe30 midi loopback system I'm using. Port number 2 was "Internal MIDI channel 1" on my system, and I connected my output program to that MIDI port to test how it received messages. I use the LoopBe30, but I might uninstall it and use MidiYoke instead and see if I have the same issue. As you say it could also be the program I'm using to output. I use Synfire Pro which is a music prototyping program.
regards Ben
On 5/10/12, Guido Lorenz reply@reply.github.com wrote:
Unfortunately I cannot reproduce your issue. I ran the code and it runs for 10 seconds, printing every MIDI message received from my MIDI controller. Running it again, it only prints new messages.
Actually, since the same messages show up in different runs of the program for you, I can hardly imagine this being an issue with RtMidi or the Python module. What OS are you using and what kind of MIDI port is number 2 on your system? Also, have you double-checked the output of the program that generates the messages, e.g. by recording them in a sequencer?
Reply to this email directly or view it on GitHub: https://github.com/superquadratic/rtmidi-python/issues/7#issuecomment-5604713
I am running this code (sorry if the code seems a little messy, it's better than the older code I had, I fixed up some stuff):
Each time I run it, the queue does not appear to flush when the port is closed, and periodically I would want to clear the queue so that it does not run out of queue space ;)
Each time I run the program, the old messages seem to re-iterate and the new messages that I generate via an external program are just added to the queue (which is good), but the old messages don't seem to get flushed out of the queue as I would expect them to when I close the port, but I don't know how to flush the queue as there appears to be no function to do that. But I'm not sure why it isn't clearing the queue when I close the port, is this something I am doing wrong, or if there is something I am missing?