So I am working on this thingy where I use my MIDI Keyboard with drumpads as a kind of streamdeck but than different.
I need to use a:
async def mainloop():
running = True
while running:
for msg in midi_in.iter_pending():
# do stuff here with msg
What ever I try, it doesn't want to run both at the same time
Here is a list with things I tried:
- using
loop.create_task(mainloop())
- threading
loop.run_forever and running asyncio.run_coroutine_threadsafe(mainloop(), loop)
But yeah I just need to listen on the CurrentProgramSceneChanged and CurrentSceneCollectionChanged events and the events from my midi input.
Please help me out!
P.s. There is some kind of pressure on this, cause it is needed pretty soon!