I’m dragging my feet on this LMDB implementation, but tonight got things far along enough to send a param update to a running astrid program. It’s read from the LMDB database inside the audio callback. Updates are received via the instrument’s message handling thread when a param update message comes through the queue.
I’m getting xruns with pipewire-jack and LMDB though. I have no reason
to blame pipewire, but I am a bit curious if using the native
jack backend will make any difference. I tried starting the test program
setting the latency explictly with PIPEWIRE_LATENCY=“1024/48000”
astrid-pulsar but was getting xruns even then sometimes.
LMDB reads shouldn’t block, but disabling the reads in the audio callback makes the xruns go away, so that’s not super encouraging. I’ll have to spend some more time with the LMDB docs. The documentation is very good, but the abstractions are kind of confusing in the way that environments and transactions and databases and cursors nest. I’m hoping that I’m using it wrong. Otherwise… maybe try a local memory cache and use another thread to do slower reads? I’m not sure.
Still, it was exciting to be able to interact with a stream-based astrid instrument for the first time. Wiring up serial input and output seems like a good next step for this project… getting closer to being able to start building this test program into something more specifically for rain.