bergamote / micronux

Linux Editor for Alesis Micron synth programs
16 stars 1 forks source link

speed up send #7

Closed bergamote closed 4 years ago

bergamote commented 4 years ago

Right now pressing send (and by extension, using auto-send) does the following:

  1. merge the settings that have changed with the ones that haven't
  2. write the settings to a text file
  3. convert with alesis' script, which reads the text file and writes a sysex file
  4. read the generated sysex file and send it's content with rtmidi

So we're accessing the disc 4 times (2x read, 2x write). With auto-send that happens every time any single setting is changed. This is crazy. Threading things might help, but even then.

Therefore I'm hacking a 'live' option (-l) onto alesis' script so that it accepts a list of settings from stdin, spews out the sysex on stdout and skips the file writing business.
Now, Alesis' perl script is All rights reserved copyrighted so I should really reimplement the whole thing in python instead. But the script is over 15 years old and the Micron doesn't come up on the legacy support page. Also, Bret Victor is an awesome coder and it would take me years of learning python and perl to rewrite it. So for now I'm going ahead with my ugly hack.

bergamote commented 4 years ago

done, but ugly, stdout give a dot separated list of hex, some of which still need to be right-padded with a zero