Make openwig portable to Linux#4
Open
Axyom wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-studioand both flatpak locations; macOS the.appbundle. Candidates are validated by the presence ofLibrary/devices(the factory-device dir the SDK actually loads from), so the probe self-corrects if a distro layout differs.BITWIG_PATHstill 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 viaparecord(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.Validation
pactldefault-sink parser, and the backend dispatch.parecordcapture still need a session on Linux. The docs say so and ask for reports.