Skip to content

JackDAW-Haiku stack 0.2 (hrev59846)

Latest

Choose a tag to compare

@rations rations released this 18 Jul 15:57
6de8dcd

JackDAW-Haiku stack 0.2 (hrev59846)

Native audio production on Haiku. JackDAW is a multitrack DAW built on Haiku's
native Interface Kit, together with a USB-audio driver (UAC2), the JACK server, a
patchbay, VST3 and LV2 plugin hosting, and three plugins — NAMku (Neural Amp
Modeler), DRUMku (drum sampler) and hktuner (chromatic tuner). Verified on
Haiku nightly hrev59846 x86_64.

Looking for testers with a class-compliant USB Audio Class 2.0 interface to record,
and run the plugins. One kernel driver is built from source (guided below); the rest
installs as packages.


What's new since 0.1

Plugins now have native GUIs. VST3-haiku gained Haiku editor support (the SDK's
platform-type plumbing for a BView* parent), and JackDAW embeds a plugin's own editor
directly in its FX window when the plugin provides one, falling back to generic sliders
when it doesn't. NAMku and DRUMku both ship native Interface Kit editors.

LV2 hosting — a second plugin format behind the same host API. The new lv2_haiku
package carries the LV2 stack (lilv, serd, sord, sratom, zix and the specification
bundles) built natively, plus a headless JACK LV2 host with a parameter REPL and the
lilv tools. LV2 plugins load in JackDAW alongside VST3, and a plugin's native HaikuUI
BView UI is embedded in the FX window the same way.

hktuner — a new chromatic tuner LV2 plugin: stereo pass-through, clean-room MPM/NSDF
pitch detection run off the audio thread via the LV2 worker extension, an LED-matrix
Interface Kit GUI, and a settable A4 reference (380–500 Hz).

A capture-path pop is fixed in JACK. The hmulti backend read capture from the
freshest filled buffer and paced on playback. When the device clock and the bus clock
drifted enough to complete two record buffers in one period, a whole period of audio was
silently skipped — audible as a pop with no xrun reported. Capture is now consumed
through a sequential cursor that advances one buffer per cycle, starting a buffer behind
the freshest fill as jitter cushion. If you heard intermittent pops on 0.1 that never
showed up in the xrun counter, this is that bug.

Parallel track processing in JackDAW, via an RT work-stealing worker pool, with the
JACK thread taking a share of the work itself. Sessions with several plugin-laden tracks
now spread across cores instead of serializing on one.

Also: project save/load and offline/realtime render (WAV, plus FLAC/MP3 where the local
libsndfile supports them), MIDI control-surface mapping, and per-plugin CPU timings under
JACKDAW_DIAG=1 that attribute a callback overrun to a specific plugin.


Prerequisites

  • Haiku nightly hrev59846, x86_64. The kernel driver is ABI-tied to this revision — on
    any other nightly you must rebuild it (same script, new HREV=).
  • A class-compliant UAC2 USB audio interface. Tested: Behringer UMC204HD
    (1397:0508), XMOS-based NUX USB Audio 2.0 (20b1:2018). Other UAC2 devices are
    expected to work but untested.

Step 1 — USB-audio driver (build from source, required first)

Stock Haiku sees UAC2 interfaces but won't publish an audio node for them, so JACK has no
device to open. Install the driver override from
haiku-kernel-usb — full steps in its
dist/INSTALL.md.

The build needs a Haiku source tree on the usb-audio-uac2 branch (this is where the
driver changes live) plus the Haiku build tools. Get the source, then build and install:

# 1. Haiku source with the driver changes (shallow clone is enough; a few GB)
git clone -b usb-audio-uac2 --depth 1 https://github.com/rations/haiku.git ~/haiku

# 2. Build tools
pkgman install -y jam nasm gcc_syslibs_devel zlib_devel zstd_devel

# 3. Build the three add-ons and install the override
git clone https://github.com/rations/haiku-kernel-usb
cd haiku-kernel-usb/dist
HREV=hrev59846 HAIKU_SRC=$HOME/haiku ./build-driver.sh
./install-driver.sh

Then reboot and tap Space at power-on to reach the boot menu → Select safe mode
options → Disable system components → add-ons → kernel → boot
→ toggle xhci → Return
back to main menu and select continue booting.
(This must be redone each boot; the persistent route is the haiku.hpkg swap in INSTALL.md.)

Verify:

listusb                       # your interface enumerates
ls /dev/audio/hmulti/          # an audio node appears (usb)

Step 2 — Install the stack

Download all .hpkg files below into one folder, then install them together in one
command
so pkgman can resolve the stack (external deps like glib2/libsndfile/libsamplerate
are pulled automatically from HaikuPorts):

pkgman install ./jack-*.hpkg ./jack_tools-*.hpkg ./jackgraph-*.hpkg \
  ./vst3_haiku-*.hpkg ./lv2_haiku-*.hpkg \
  ./namku-*.hpkg ./drumku-*.hpkg ./hktuner-*.hpkg ./jackdaw-*.hpkg

Install them as a group — jackdaw depends on jack and lv2_haiku, which are among
these files, not HaikuPorts packages. Installing jackdaw.hpkg on its own will fail to
resolve.

Upgrading from 0.1: install the new files the same way; pkgman replaces the older
versions in place. lv2_haiku and hktuner are new and must be included — jackdaw 0.2
requires lv2_haiku at runtime for the LV2 specification bundles.

Step 3 — Run

Start the JACK server from Jack Settings in Jack Graph. In the settings window select usb/1
in Interface Sample rate 48000 Frames/period 256 Periods/buffer 3 check the boxes for MIDI driver
and Realtime.and click start. Then launch JackDAW from Deskbar (or JackDAW):
You can also start Jack from the terminal but will not be able to stop it using Jack Graph if you do.

jackd -X haikumidi -d hmulti -d /dev/audio/hmulti/usb/1 -r 48000 -p 256 -n 3

NAMku and DRUMku appear in JackDAW's plugin list, and hktuner in its LV2 list. Load a
.nam capture + an impulse-response .wav in NAMku; point DRUMku at your .wav drum
samples. Plugins with a native editor open it inside the FX window.


What's included

Package Role
jack JACK2 audio server + libraries
jack_tools JACK command-line tools (jack_lsp, jack_connect, …)
jackgraph Patchbay / connection GUI
vst3_haiku VST3 SDK host + example plugins
lv2_haiku LV2 stack, spec bundles, JACK LV2 host + tools
namku NAMku — Neural Amp Modeler VST3
drumku DRUMku — drum sampler VST3
hktuner hktuner — chromatic tuner LV2
jackdaw JackDAW — the multitrack DAW

The USB-audio driver is not a package (kernel add-ons are ABI-tied to the hrev) — build it
from source per Step 1.

Known caveats

  • Driver is not upstreamed; install it as the reversible non-packaged override above.
    Rollback: rm /boot/system/settings/packages and reboot.
  • The xhci boot-menu blacklist is per-boot unless you do the persistent haiku.hpkg swap.
  • VST3 CC / pitch-bend into plugins is implemented but only partially hardware-tested.
  • LV2 instruments are not loadable yet — there is no MIDI→atom path, so the LV2
    catalog lists effects only. VST3 instruments (DRUMku) are unaffected.
  • LV2 plugins with ui:showInterface-only UIs are not supported; only native HaikuUI
    editors embed. Log-scale control ports get linear sliders.
  • Rescanning plugins is additive — a removed bundle keeps a stale catalog entry until
    restart.
  • LV2 plugin binaries built for another OS are filtered out of the catalog rather than
    failing at load, so a bundle copied from Linux simply will not appear.
  • Heavy neural models (NAMku A1/WaveNet captures) are memory-bound and can exceed a small
    period on older CPUs. If you hear xruns with one, raise Frames/period to 512 rather than
    reaching for a lighter capture.
  • The HaikuPorts .recipe files in each repo are drafted but not validated.

Reports welcome — please include your hrev, USB interface (ID from listusb), and JACK
buffer settings.