totally different tack, but you may like to know that the monome serial protocol is pretty straightforward. so yeah i’d go for the hardware route, why not
a programmable adapter that took hardware midi and emitted monome serial would be easy to make and widely useful. (i probably have some arduino emulator code bits lying around that could be posted). i don’t know if its ever been tested but i think you can just tell serialosc your serial device has M buttons and N encoders and &c.
(actually guess i don’t know if apc40 even has hardware midi out… so maybe nevermind)
but for software, yeah emulating all of serialoscd sounds like a lot. i’m thinking of all the multiple device and configuration managment stuff it does.) for a single device it seems not too bad: one thread to read midi / send osc, one other thread to read osc / send midi. i don’t even see why they’d need much synchronization
in C i guess i’d use liblo; gives you an OSC server thread with a callback and lets you dispatch OSC client messages asynchronously from any thread. (i guess pyosc is similar.) and i guess portmidi if you don’t want to deal with sysfs or alsa directly. (dunno about realtime midi in python. sounds fishy)
[ed: omg, lol]
Will the secret handshake prevent us from turning a Monome + BCR into an APC?