superboucle
superboucle copied to clipboard
midi feedback on update is not always sent properly
When a song is loaded, midi feedback for all clips states is sent, so on the device (i.e. the launchpad) the lights will be displayed according to the song's clip setup.
Mostly this works fine, but sometimes (in an unpredictable fashion) it does not: it just doesn't send anything or only a part of the expected midi signals (noticed with launchpad and double-checked with qmidiroute)
I plan to fix this in sonejostudios:Device_Rewrite but still creating this issue for reference My guess is, the reason has something to do with concurrency/blocking of the queue, but i have yet to further investigate it.
Can you make a new PR for this issue ? So I can merge this fix in master easily.
sure, i'll be back home next week and cant start working on that before then :) Am 03.09.2015 11:52 schrieb "Vampouille" [email protected]:
Can you make a new PR for this issue ? So I can merge this fix in master easily.
— Reply to this email directly or view it on GitHub https://github.com/Vampouille/superboucle/issues/35#issuecomment-137395143 .
Did you notice xruns when you have feedback issue ? Can you retry with gui window reduced (not visible on screen) ?
@sonejostudios tells me apparently there are xruns on song-load sometimes. Do you think this can be responsible for midi messages in the out_queue not being sent? (that sounds not safe to me) How would you suggest to fix it?
I think QT part sometimes slow down python interpreter, if you increase refresh rate of progress bar (main gui), you will have many xruns. Gui should not slow down jack callback because callbacks are called from another thread. One solution is to separate gui from main loop : maybe I need to create a python "thread" or run a second python interpreter. Second solution is to limit midi messages count sent by each jack loop : only retrieve first 10 midi events from queue and send other events on next loop.
Xruns is a big issue in superboucle
I assume, superboucle would not be the only pyqt based program having trouble with xruns then? Are there any interesting discussions, maybe in context of the python jack-lib-wrapper about the issue? however google didn't find too much :/