matrixctl very slow to update?

gpvillamil's icon

I'm in the process of writing (yet another) Monome emulator patch for the Novation Launchpad.

However, I'm stymied: I'm using a matrixctl to display the user interface, and it is slow, very slow. It is slower to refresh on screen than the MIDI being sent to the Launchpad (ie the Launchpad seems to be refreshing more quickly and fluidly than the matrixctl.)

I thought I might have made a mistake in my patch, but then I noticed that the popular Boiingg app (http://docs.monome.org/doku.php?id=app:boiingg), which also uses a matrixctl for display, also has this issue. In fact, I ran my emulator to control the Boiingg application (works fine), but noticed that my on-screen display and the Boiingg matrix display were both lagging behind the actual LEDs on the Launchpad.

I've attached my patch, would appreciate it if someone would have a look. Is matrixctl really that slow? Is there a way to speed it up? Should I just jack it in and do something using jsui?

How the attached patch works: open the patch, enter the prefix in the text field (it also responds to the monome /sys/prefix command), double-click on the notein and midiout objects to set the Launchpad MIDI ports.

It responds to monome /led /led_col /led_row /frame and /clear commands.

Try it with the boiingg app - set the prefix to /osc.