Skip to content

Make openwig portable to Linux#4

Open
Axyom wants to merge 1 commit into
masterfrom
feature/linux-portability
Open

Make openwig portable to Linux#4
Axyom wants to merge 1 commit into
masterfrom
feature/linux-portability

Conversation

@Axyom

@Axyom Axyom commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Makes the SDK run on Linux. The resolver/bridge architecture was already OS-agnostic (Bitwig ships the same obfuscated jar bytecode on every platform, the bridge is TCP loopback, and the controller/installer/data paths already had Linux branches), so this closes the two genuinely Windows-only spots and labels the result honestly.

What changed

  • _find_bitwig_root() (song.py): per-OS probe instead of winreg-or-C:/. Linux checks /opt/bitwig-studio, /usr/share/bitwig-studio and both flatpak locations; macOS the .app bundle. Candidates are validated by the presence of Library/devices (the factory-device dir the SDK actually loads from), so the probe self-corrects if a distro layout differs. BITWIG_PATH still overrides everything.
  • render_to_wav() (wire/render.py): per-platform dispatch. Windows keeps the WASAPI loopback capture unchanged; Linux records the default sink''s PulseAudio/PipeWire monitor source as raw s16le via parecord (pulseaudio-utils; PipeWire systems serve it through pipewire-pulse), with the same return contract (path/seconds/rate/channels/rms/silent). Other platforms raise a clear error.
  • Docs/README/classifiers: Linux marked experimental with the pulseaudio-utils requirement spelled out.

Validation

  • 81 unit tests pass, including new coverage for the probe preference order, the pactl default-sink parser, and the backend dispatch.
  • Windows render path verified live after the refactor (non-silent 4.8s capture of the running project).
  • The ubuntu CI jobs already prove the package installs and imports on Linux.
  • Not yet validated against a live Linux Bitwig (no Linux box here): doctor, the live tests, and a real parecord capture still need a session on Linux. The docs say so and ask for reports.

The resolver/bridge architecture was already OS-agnostic (same Bitwig jar
bytecode everywhere, TCP loopback, per-OS controller paths); this closes the
two genuinely Windows-only spots:

- _find_bitwig_root(): per-OS probe instead of winreg-or-C:/. Linux checks
  /opt/bitwig-studio, /usr/share/bitwig-studio and the flatpak locations;
  macOS the .app bundle; candidates validated by the presence of
  Library/devices (what the SDK actually needs). BITWIG_PATH still overrides.
- render_to_wav(): dispatches per platform. Windows keeps the WASAPI loopback
  capture (verified live after the refactor: non-silent 4.8s take); Linux
  records the default sink''s monitor source as raw s16le via parecord
  (pulseaudio-utils; PipeWire serves it through pipewire-pulse) with the same
  return contract; other platforms get a clear error.

Docs/packaging mark Linux as experimental: the code paths are unit-tested
(probe preference order, default-sink parsing, dispatch) but not yet
validated against a live Linux Bitwig.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant