Beautiful Bleep

Host notes

  • Ableton Live hosts plugins in one process and runs tracks on parallel threads. Each track keeps its own transport stamps, so the position rule applies. MIDI generated by a plugin is only routable from VST3 instruments: use the "MIDI From" routing of a second MIDI track.
  • Bitwig can sandbox plugins in separate processes. The bus is shared memory, so this works. All processes must use the same namespace.
  • Logic / AUv3 sandbox: sandboxed app extensions may not open POSIX shared memory. bb_bus_open then fails with BB_ERR_SHARED_MEMORY; keep working without the bus.
  • Offline export runs faster than real time. Report BB_BLOCK_PLAYING and the true transport position, and timing stays exact.

Pitfalls

  1. Calling [non-RT] functions on the audio thread. bb_connect, the list functions and registration take a cross-process lock.
  2. Saving the requested UID instead of bb_endpoint_uid. After a device duplication they differ.
  3. Loading cables before adding inputs. Unknown inputs are skipped.
  4. Moving host parameters to show modulation. Apply modulation inside the DSP and draw it in your UI instead.
  5. Assuming zero latency. Feedback through the bus adds one block per pass.
  6. Renaming outputs between versions breaks users' cables. Treat port names as API.
  7. Forgetting BB_BLOCK_PLAYING. Without it, timing falls back to the wall-clock rule, which isn't deterministic during export.