aolsenjazz / super-controller

Give your MIDI devices super powers: take control of the lights, messages, and communication between controllers.
MIT License
19 stars 2 forks source link

Translator excessive delay #15

Closed aolsenjazz closed 2 days ago

aolsenjazz commented 5 days ago

Expected Behavior

Translator plugin transforms message in <1ms

Current Behavior

Translator took 3-4ms to translate

Steps to Reproduce

Just use the translator for anything

Possible Solution (Not obligatory)

Store overrides as a hash map rather than just a list. JSON.stringify is probably what's killing this

aolsenjazz commented 3 days ago

It seems that this is not an issue with our implementation, but an underlying component: either with @julusian/midi, rtmidi, or CoreMIDI.

More specifically, whenever a new message is sent to a client > a few ms after the previously-sent message, there will be a 10-30ms delay in between invoked port.send(msg) and the time at which the message is actually received by the controller as reported by MIDI Monitor.

This is, of course, unacceptable for performance critical music software.

aolsenjazz commented 3 days ago

Tested the underlying rtmidi library, problem still exists. Not a @julusian/midi issue

aolsenjazz commented 2 days ago

This is, frustratingly, an issue with MIDI monitor; using Mimic's internal monitoring, all messages are received, transmitted to UI, and the message list rerendered in < 3 ms