Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Starting a parallel thread from the scene
-
Is there any way to start a parallel thread from the scene?
-
Could you be a bit more specific, i.e. what are you trying to accomplish? In general, you should be able to use the
threading
module as usual, but I can't think of a lot of use cases, except for maybe the AI in a turn-based-game or something like that. -
I want to start the play function of the "mido" Python Module on a loaded Midi file from a scene and visualize and play the messages by filling a list of the Midi nodes. Parallel I want be able to play my nodes by touching the screen like in the piano.py. If I start a loop directly from a scene the "touch_began" doesn't catch the messages until the loop ended. Probably I need to start / stop a parallel Thread to play the MidiFile and be able record my nodes in the same time.
-
I figured out. Now I can read, write, realtime (play, record) and edit MIDI files :-)
-
@laszlo-j-hermann Is your solution open source (can we see?) or not?