So, the plan, some time ago in 2.79 days I wrote some AN nodes to interface with Pygame.Midi to move objects when MIDI keys are pressed see here, I had an interface node that monitored the feed from Pygame and fed the MIDI string to nodes that controlled the objects.
Now I should like to re-create this in my own system, not dependant upon AN - there is far more in AN than I need to do this…
The system needs to be running “all the time” i.e. so many per second to monitor the feed from my MIDI keyboard. I had guessed at timers &/or handlers, but really need something to read to show me a workflow to achieve this.
I have created a way to animate & make sound files from a MIDI.csv file example below:
But I really want to add an interface to my MIDI keyboard & MIDI controller.
My work to date is here, it is early days, so no docstrings, etc yet! It did port my earlier AN work to 2.8, so I have the code necessary to make the new nodes in Clockworx Music, but I need to understand how to run several times per second, maybe 25? so I can animate “live” or use the keyboard to set keyframes, etc. as I did before in AN.
Thanks for your help in this, I really appreciate it.