LYNX SHARE plays through PipeWire directly when it runs (Ubuntu 22.10+, Fedora 34+, Debian 12, current Arch / Manjaro
and most other current distributions), else through JACK (a running JACK server) or ALSA. Nothing extra has to
be installed: LYNX SHARE loads libpipewire-0.3.so.0, libjack.so.0 and libdbus-1.so.3 from the system only when they are
there.
Options › Audio settings › Driver:
| Driver | When | Notes |
|---|---|---|
| PipeWire (native) | a PipeWire daemon answers | LYNX SHARE's own PipeWire client. Low latency, shared with every other program. Chosen automatically on the first start. |
| JACK / PipeWire | a JACK server runs, or PipeWire with pipewire-jack |
JUCE's JACK client. Use it with a real JACK server (jackd / jackdbus). |
| ALSA | always | Talks to the sound card. default / pipewire share it; a hw: device takes the card for LYNX SHARE alone. |
A first start (no saved audio setup) opens the first of PipeWire → JACK → ALSA that has devices. A saved choice is kept.
node.latency); when another program asks for
a smaller one PipeWire runs smaller (LYNX SHARE follows), when it runs a larger one LYNX SHARE processes it in blocks of the chosen size.node.rate); if the graph keeps its rate, PipeWire
resamples LYNX SHARE's stream.LYNX in pw-link, qpwgraph, Helvum or Carla (ports LYNX:output_FL,
LYNX:output_FR, LYNX:input_FL…), so it can be wired to other programs.systemctl --user restart pipewire, updates): LYNX SHARE reconnects within about two seconds.LYNX_NO_PIPEWIRE=1 hides the native driver (for comparisons).The audio thread should run with real-time priority, or the sound can break up when the desktop is busy. LYNX SHARE asks for it on its own, without root, in this order:
SCHED_FIFO directly when your limits allow it (ulimit -r above 0: the audio group / limits.conf, as JACK
set-ups have);rtkit, installed on most desktops; PipeWire uses it too);Options › Audio settings › Status shows the result ("Audio thread: real-time priority (RealtimeKit, priority 20)"). When nothing allowed it, the line says so, and the first time the sound breaks up LYNX SHARE explains the fix once:
sudo apt install rtkit, sudo dnf install rtkit, sudo pacman -S rtkit), oradd yourself to the audio group with a real-time limit, e.g. /etc/security/limits.d/audio.conf:
@audio - rtprio 95
@audio - memlock unlimited
then sudo usermod -aG audio $USER,
and log out and in again. LYNX_NO_RT=1 skips the request (for comparisons).
LYNX --devices out.txt # driver types, devices, PipeWire version and defaults
LYNX --devicetest PipeWire "System default" out.txt "*" # opens output + input for 1 s
LYNX --devicetest PipeWire "Loopback" out.txt "Loopback" --buffer 64 --roundtrip # round trip through a loopback
LYNX --rtstress project.lynx out.txt 30 --type PipeWire --buffer 128 [--log dir] [--settingsshot audio.png]
--rtstress reports the device, the audio thread's priority, deadline misses, late calls and dropouts. A PipeWire
loopback for --roundtrip:
pw-loopback --capture-props='media.class=Audio/Sink node.name=loop_sink node.description=Loopback' --playback-props='media.class=Audio/Source node.name=loop_source node.description=Loopback'.
Measured in round 161 (docs/analise/REA_rodada161a.md): through a PipeWire loopback the round trip is exactly one
quantum (64 samples = 1.33 ms at 48 kHz, 128 = 2.67 ms, 256 = 5.33 ms); the demo project at 32/64/128/256 samples ran
without a missed deadline or dropout (4–10 % of one CPU core).
VST3, CLAP, LV2 and VST2 (.so) plugins are scanned from the standard folders (~/.vst3, /usr/lib/vst3, ~/.lv2,
/usr/lib/lv2, ~/.clap, ...) and any folder added in Options › Plugins. Plugin processes (Options › Plugins;
each plugin in its own process, one process per vendor, or all plugins in one process, round 190jg) works on Linux too:
a crashing or frozen plugin is muted and LYNX SHARE keeps running (round 161b, docs/analise/REA_rodada161b.md). Windows plugins work through yabridge +
Wine (checked with yabridge 5.1.1 and Wine 10.0, also in the separate process); see docs/PLATFORMS.md.
LYNX --sandboxtest plugin.vst3 out.txt [--editor] # a plugin in the separate process, incl. a hang and a crash
The AppImage runs from anywhere, offline, and can update itself with
AppImageUpdate (appimageupdatetool LYNX-*.AppImage). On the
first start the setup wizard offers to add LYNX SHARE to the applications menu and to open .lynx files with it (it writes
~/.local/share/applications/com.lynx_share.LYNX.desktop, the icon and the MIME type); Options › General turns it
on or off later, and LYNX SHARE updates the entry when the AppImage file moves. From a terminal:
./LYNX-*.AppImage --menu-entry on (or off).
LYNX SHARE draws with JUCE's software renderer on Linux (X11 or XWayland). Since round 161b knobs and rounded panels come from
cached pre-rendered images, which made the Mixer and Playlist several times cheaper to draw (docs/analise/REA_rodada161b.md). LYNX --uiperf project.flp out.txt
times the drawing of the main windows on your machine.
Moving playheads (the Playlist, Piano roll and Event editor, Gross Beat's locator) are drawn by the X server while the
song plays, since round 190jx: the playhead's picture is sent once, and each frame the server puts back the pixels it
covered, saves the ones under its new place and composites it there (XRender). LYNX itself paints nothing for it.
Measured on Xvfb with Thief playing (median of 5 runs each, LYNX --uiperf with LYNX_UIPERF_ONLY="overlay A/B"):
| view | window frames/s | painted Mpx/s | LYNX CPU | message thread | X server CPU |
|---|---|---|---|---|---|
| Playlist, repainted (before) | 98.0 | 17.56 | 60.4 % | 16.1 % | 3.5 % |
| Playlist, drawn by the X server | 28.3 | 1.22 | 56.4 % | 11.0 % | 4.6 % |
| Piano roll, repainted (before) | 97.4 | 14.42 | 66.6 % | 23.7 % | 3.3 % |
| Piano roll, drawn by the X server | 28.1 | 1.48 | 56.6 % | 12.5 % | 1.5 % |
LYNX_OVERLAY=0 turns it off (the views repaint their playheads as before); without the X Render extension it is off by
itself. LYNX_OVERLAY_STATS=<file> writes what it did every 2 seconds (frames, fallbacks and why, JUCE's blits).