yusefnapora / lumachromatic

An exploration of color and harmony, to be used with the Lumatone isomorphic keyboard. Work in progress.
https://app.lumachromatic.art
6 stars 3 forks source link

feat: driver per board #16

Open kbrandwijk opened 1 year ago

kbrandwijk commented 1 year ago

Changing all lights and waiting for an ack for each individual message is a somewhat slow process. We can leverage the fact that ack messages include the boardIndex to deal with all boards in parallel.

This PR adds a boardIndex property to the MidiDriver, and creates a separate driver for each board. Each driver only handles messages for one board.

I've also lowered the retry timeout to the point where it did not trigger any additional retries, which is a lot lower than the original value.

It's hard to time the process end to end due to the asynchronous nature of the process, but from testing locally I can confidently say that this is a lot faster.