[{"data":1,"prerenderedAt":23},["ShallowReactive",2],{"project-omx-clap-core-":3},{"page":4,"others":19},{"slug":5,"src":6,"title":6,"source":7,"toc":8,"html":18},"","README.md","https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002FREADME.md",[9,12,15],{"id":10,"title":11},"install","Install",{"id":13,"title":14},"status","Status",{"id":16,"title":17},"try-it","Try it","\u003Ch1 id=\"omx-clap-host\">omx-clap-host\u003C\u002Fh1>\n\u003Cp>omx-clap-host hosts CLAP and LV2 audio plugins without a screen. You drive it over a socket\nwith the same text commands as mod-host, and each plugin appears in your JACK or PipeWire\ngraph as a client of its own. It is for controllers, mixers and stage rigs on Linux that\nalready talk to mod-host and want CLAP plugins beside their LV2 ones.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Same protocol as mod-host: \u003Ccode>add\u003C\u002Fcode>, \u003Ccode>param_set\u003C\u002Fcode>, \u003Ccode>bypass\u003C\u002Fcode>, \u003Ccode>connect\u003C\u002Fcode>, with mod-host's replies and error codes.\u003C\u002Fli>\n\u003Cli>Every plugin is a JACK client \u003Ccode>effect_&lt;N&gt;\u003C\u002Fcode> with ports \u003Ccode>in_&lt;k&gt;\u003C\u002Fcode> and \u003Ccode>out_&lt;k&gt;\u003C\u002Fcode>, laid out as mod-host lays out an LV2 plugin.\u003C\u002Fli>\n\u003Cli>Instruments work too: a note input becomes a MIDI port, \u003Ccode>effect_&lt;N&gt;:midi_in\u003C\u002Fcode>, and a note output another, \u003Ccode>effect_&lt;N&gt;:midi_out\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>LV2 plugins too: \u003Ccode>add lv2:&lt;uri&gt; &lt;N&gt;\u003C\u002Fcode> (or the URI alone, as mod-host takes it) runs an LV2 plugin from \u003Ccode>LV2_PATH\u003C\u002Fcode> on the same ports, its controls addressed by their LV2 symbols.\u003C\u002Fli>\n\u003Cli>Tempo-synced plugins get a transport: \u003Ccode>set_bpm\u003C\u002Fcode>, \u003Ccode>set_bpb\u003C\u002Fcode> and \u003Ccode>transport\u003C\u002Fcode> drive the host's own, or \u003Ccode>-t\u003C\u002Fcode> follows the JACK transport.\u003C\u002Fli>\n\u003Cli>Meters and latency reach your graph: gain-reduction meters come back as \u003Ccode>output_set\u003C\u002Fcode> lines, and the plugin's latency is published on its ports.\u003C\u002Fli>\n\u003Cli>A plugin's own window, on request: \u003Ccode>show_external_ui &lt;N&gt;\u003C\u002Fcode> puts it on your display, as jalv and mod-host show one, and \u003Ccode>hide_external_ui &lt;N&gt;\u003C\u002Fcode> takes it off. On a Wayland session it is a Wayland window when the plugin has one; X11 otherwise.\u003C\u002Fli>\n\u003Cli>\u003Ccode>-S\u003C\u002Fcode> shows every plugin's window as it is added; with no display the command says so by code and the audio runs on.\u003C\u002Fli>\n\u003Cli>\u003Ccode>omx-clap-scan\u003C\u002Fcode> lists what a CLAP file holds (parameters, ports, latency), as text or JSON; \u003Ccode>--fields\u003C\u002Fcode> dumps every field one CLAP or LV2 plugin states, the records plugin-hostd builds its descriptors from.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>An LV2 plugin runs natively: it is a real LV2 instance, loaded through lilv into the host's own\nprocess, with no emulation and no wrapper process. What sits between it and the host is the\nLV2 adapter, the library \u003Ccode>libomx-clap-lv2\u003C\u002Fcode> linked into omx-clap-host, and it maps the host\ninterface only: the plugin's ports and controls are presented as CLAP ports and parameters, so\none hosting core drives both formats. Any program can link the adapter too, from the package\n\u003Ccode>omx-clap-lv2-devel\u003C\u002Fcode> (\u003Ccode>libomx-clap-lv2-dev\u003C\u002Fcode> on Debian). lilv is loaded on the first LV2 add. A\nplugin the adapter cannot map is refused with its reason: \u003Ccode>resp -102 hosting.features.missing\u003C\u002Fcode>.\nWhat is supported, what is not and the test behind each row is in\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002Fdocs\u002Flv2-compatibility.md\">docs\u002Flv2-compatibility.md\u003C\u002Fa>. plugin-hostd, which runs each plugin in a\nprocess of its own, hosts CLAP and LV2 with omx-clap-host as the worker of both, and mod-host for\nan LV2 plugin the adapter refuses.\u003C\u002Fp>\n\u003Cp>The CLAP hosting core is a library of its own, \u003Ccode>libomx-clap-core\u003C\u002Fcode>, for programs that host CLAP\nplugins themselves: it checks a plugin before using it, runs its audio on your thread and keeps\nits parameters and state. The host, the core and the LV2 adapter share one version.\u003C\u002Fp>\n\u003Ch2 id=\"install\">Install\u003C\u002Fh2>\n\u003Cp>Fedora (x86_64 and aarch64):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>sudo dnf install https:\u002F\u002Fwww.openmixer.org\u002Frpm\u002Fopenmixer-release.noarch.rpm\nsudo dnf install omx-clap-host\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Debian bookworm and trixie and Raspberry Pi OS (amd64 and arm64):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>curl -fsSLO https:\u002F\u002Fwww.openmixer.org\u002Fdeb\u002Fopenmixer-release.deb &amp;&amp; sudo apt install .\u002Fopenmixer-release.deb\nsudo apt install omx-clap-host\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The latest release ships these packages, all from the same version:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>What\u003C\u002Fth>\n\u003Cth>Fedora\u003C\u002Fth>\n\u003Cth>Debian\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>The host and the scanner: \u003Ccode>omx-clap-host\u003C\u002Fcode>, \u003Ccode>omx-clap-scan\u003C\u002Fcode>, their manual pages\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-host\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-host\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>The hosting core, a shared library\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-core\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>libomx-clap-core1\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Headers, pkg-config file and ABI baseline to build a program on the core\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-core-devel\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>libomx-clap-core-dev\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>The core's definitions in omx-contract's contract directory: hosting limits and codes, the host verbs\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-core-contract\u003C\u002Fcode> (noarch)\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-core-contract\u003C\u002Fcode> (all)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Headers, pkg-config file and static library of the LV2 adapter, to link at build time (LV2 at run time is \u003Ccode>omx-clap-host\u003C\u002Fcode> with lilv)\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>omx-clap-lv2-devel\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>libomx-clap-lv2-dev\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>For your own program, install the \u003Ccode>-devel\u003C\u002Fcode> \u002F \u003Ccode>-dev\u003C\u002Fcode> package and build with\n\u003Ccode>pkg-config --cflags --libs omx-clap-core\u003C\u002Fcode> (and \u003Ccode>omx-clap-lv2\u003C\u002Fcode> for the adapter).\u003C\u002Fp>\n\u003Ch2 id=\"status\">Status\u003C\u002Fh2>\n\u003Cp>The latest release is packaged for Fedora 44 and Debian bookworm and trixie. What\nthe continuous integration runs on every push, and the packages it builds:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The plugin lifecycle and the scanner against fake plugins, including a plugin that crashes.\u003C\u002Fli>\n\u003Cli>The hosting core with untrusted plugins, under AddressSanitizer and UndefinedBehaviorSanitizer.\u003C\u002Fli>\n\u003Cli>The LV2 adapter against fixture bundles, validated with \u003Ccode>lv2_validate\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>An LV2 plugin through the host in a JACK graph: \u003Ccode>add lv2:&lt;uri&gt;\u003C\u002Fcode>, refusals with their codes,\nparameters by symbol, \u003Ccode>lv2:enabled\u003C\u002Fcode> as the bypass, state, presets and remove; and its output bit\nfor bit against mod-host and against the adapter in process.\u003C\u002Fli>\n\u003Cli>The host in a JACK graph, over PipeWire's JACK and over JACK2's \u003Ccode>jackd\u003C\u002Fcode> (x86_64): port layout,\nlatency, MIDI input for instruments, meters.\u003C\u002Fli>\n\u003Cli>The exported symbols of \u003Ccode>libomx-clap-core\u003C\u002Fcode> against a versioned baseline.\u003C\u002Fli>\n\u003Cli>RPMs (Fedora 44, x86_64 and aarch64) and DEBs (bookworm and trixie, amd64 and arm64), each\ninstalled in a clean root or container.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Almost all of LV2 is supported: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002Fdocs\u002Flv2-compatibility.md\">docs\u002Flv2-compatibility.md\u003C\u002Fa> lists\neach feature with the test behind it, and the few that are not supported, each with its reason.\nEvery CLAP extension, what the host does with it and the test behind each claim, is in\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002Fdocs\u002Fclap-compatibility.md\">docs\u002Fclap-compatibility.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"try-it\">Try it\u003C\u002Fh2>\n\u003Cp>List what a CLAP file holds (any \u003Ccode>.clap\u003C\u002Fcode> will do; this one is LSP's):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>omx-clap-scan \u002Fusr\u002Flib64\u002Fclap\u002Flsp-plugins.clap\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Start the host. It prints \u003Ccode>omx-clap-host ready!\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>omx-clap-host -n -p 5555\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>In another terminal, load a limiter, set its output gain to -6 dB and read it back\n(messages end in a NUL byte, which \u003Ccode>printf\u003C\u002Fcode> adds; a parameter is the plugin's CLAP id,\nwhich the scan prints):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>send() { printf '%s\\0' &quot;$1&quot; | nc -w3 127.0.0.1 5555 | tr '\\0' '\\n'; }\nsend &quot;add clap:\u002Fusr\u002Flib64\u002Fclap\u002Flsp-plugins.clap#in.lsp-plug.limiter_stereo 0&quot;   # resp 0\nsend &quot;param_set 0 3630838676 -6&quot;                                               # resp 0\nsend &quot;param_get 0 3630838676&quot;                                                  # resp 0 -6.0000\nsend &quot;bypass 0 1&quot;                                                              # resp 0\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The plugin is now the JACK client \u003Ccode>effect_0\u003C\u002Fcode>: link your audio to its \u003Ccode>in_&lt;k&gt;\u003C\u002Fcode> ports and take it\nfrom its \u003Ccode>out_&lt;k&gt;\u003C\u002Fcode> ports. On a desktop, or over the VNC display a Zynthian serves, a plugin that\nhas its own window shows it (CLAP plugins with Wayland or X11 windows; LV2 desktop UIs are not\nshown yet):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>send &quot;show_external_ui 0&quot;                                                      # resp 0\nsend &quot;hide_external_ui 0&quot;                                                      # resp 0\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The show tries, in order: a Wayland floating window, when \u003Ccode>WAYLAND_DISPLAY\u003C\u002Fcode> names a compositor\nand the plugin offers one; an X11 window embedded in one of the host's, on \u003Ccode>DISPLAY\u003C\u002Fcode>; an X11\nfloating window. The first the plugin offers whose display answers is taken.\u003C\u002Fp>\n\u003Cp>An LV2 plugin is added by its URI, from the bundles on \u003Ccode>LV2_PATH\u003C\u002Fcode>, and its controls are its port\nsymbols, as with mod-host. Its audio ports are read by the LV2 port groups, so a mono-in\nstereo-out reverb has \u003Ccode>in_1\u003C\u002Fcode> and \u003Ccode>out_1\u003C\u002Fcode>, \u003Ccode>out_2\u003C\u002Fcode>; a plugin the LV2 adapter cannot map answers\n\u003Ccode>resp -102\u003C\u002Fcode> and the code that says why:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>send &quot;add lv2:urn:zamaudio:ZamComp 1&quot;                                          # resp 1\nsend &quot;param_set 1 thr -20&quot;                                                     # resp 0\nsend &quot;param_get 1 thr&quot;                                                         # resp 0 -20.0000\nsend &quot;add lv2:http:\u002F\u002Fmoddevices.com\u002Fplugins\u002Fcaps\u002FPlate 2&quot;                       # resp 2\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>More: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002Fdoc\u002Freference.md\">every command, meters, bypass, port layout, latency and scanning\u003C\u002Fa>, the\nmanual pages (\u003Ccode>man omx-clap-host\u003C\u002Fcode>, \u003Ccode>man omx-clap-scan\u003C\u002Fcode>) and \u003Ca href=\"https:\u002F\u002Fwww.openmixer.org\">https:\u002F\u002Fwww.openmixer.org\u003C\u002Fa>.\nBuilding from source: see \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFreeMixer\u002Fomx-clap-core\u002Fblob\u002Fd53f42b8689dc42669552b8518feef626ea9c828\u002FBUILDING.md\">BUILDING.md\u003C\u002Fa>.\u003C\u002Fp>\n",[20],{"slug":21,"title":22},"thread-pool","The CLAP thread pool",1793954995988]