Skip to content

Play instruments when qualifying them, and add an omx-clap-host profile (#72) - #81

Merged
linuxnow merged 1 commit into
mainfrom
feat/72-play-instruments
Oct 16, 2026
Merged

linuxnow merged 1 commit into
mainfrom
feat/72-play-instruments

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

Part of #72: the CLAP arm and the profile. Follow-ups filed under #72: #77 (LV2 instruments fed MIDI), #78 (cost with a chord held), #79 (the full classifier reads the note sweep; an instrument's latency is not an impulse mismatch).

What changes

  • native/clap-qualify.c: a plugin with a note input is played at every rate under a count of its own, after the parameter sweep: a chord, pitch bend and CC 1 across a block, pressure, the chord off, a burst of 32 note ons in one block and their offs, all notes off, in the dialect its first note input reads (CLAP note events and expressions, else MIDI bytes). The line gains noteSweep (applicable, dialect, blocks, noteEvents, processErrors, nonFinite, interposer, and the three counts and events under the interposer). xruns are not measured: the prober is headless, as for the effect sweep.
  • --offer <ext,...>: the prober also offers clap.preset-load/2, clap.track-info/1, clap.remote-controls/2 (host functions that answer nothing), and lists them in hostExtensions.
  • Judge: noteSweepReasons beside clapRtReasons; new codes hosting.rt-safety.clean-under-notes, hosting.rt-safety.violations-under-notes, hosting.rt-safety.notes-unmeasured. A plugin with no note input gets none.
  • Profile omx-clap-host: the console's six extensions plus the three above, instruments fed, shared process, latency uncompensated, LV2 features the console's in-process table (same provider), budget mod-host's (0.05 at 48000/128). qualifyClapTargets runs the prober once per offer the asked profiles need and judges each profile from its own run.
  • Fixtures: synth.clap, synth-alloc.clap (malloc on note on), synth-midi.clap.

Schema change (additive, versioned): plugin-qualify.rt-safety/1 becomes plugin-qualify.rt-safety/2 = /1 + measured.noteSweep + the note sweep's reasons in verdict.reasons. Every /1 field is unchanged; an effect's /2 verdict equals its /1 verdict.

Reader contract for omx-plugins (tools/qualify-release.sh): it reads only verdict.rating and verdict.rtSafe, so it keeps working unchanged. Its comment and its self-test stub name /1; they should say /2, and the gate now refuses an instrument that allocates on a note even when its parameter sweep is clean. openmixer's locale tables need the three new hosting.rt-safety.* codes.

Tests (podman, worker image f05555bdca2de108 + jack/lv2 devel)

  • Red before: origin/main's CLI on synth-alloc.clap reads suitable under openmixer-console. After: unsuitable, hosting.rt-safety.violations-under-notes, under both openmixer-console and omx-clap-host; synth.clap reads suitable under omx-clap-host.
  • New tests: live note-sweep cases (clean, allocating, MIDI-only, an effect not played, no interposer, --offer and the omx-clap-host verdict, an unknown --offer refused), parse and verdict units, proberOffer, one run per offer, the profile held to omx-clap-core's clap_host_extensions.h and configure_core, and an instrument suitable under omx-clap-host and unsuitable under openmixer-console in the classifier.
  • Sabotage by hand: the note sweep skipped in the prober: 4 red; the violations rule removed from noteSweepReasons: 2 red; restored: green.
  • make -C native deps all asan, pnpm lint, pnpm check:generated, pnpm test:py (176 passed): green. CI=1 pnpm test: 444 passed, with PLUGIN_HOSTD pointed at a built daemon for pins-file.test.ts.

Not green, not mine: clap-loader.test.ts > 'walks the CLAP path as before when the LV2 path holds no bundle' is red in this image on origin/main too: it walks the image's /usr/lib/clap. Filed #80.

…le (#72)

An instrument is quiet and cheap until a voice plays, so a synth that
allocates on note on read suitable. The CLAP prober now plays every plugin
with a note input, at every rate, under a count of its own: a chord, the
pitch bent and a controller moved, pressure, the chord let go, a burst of
32 note ons in one block and their offs, and all notes off, in the dialect
its note input reads (CLAP's, else MIDI's). The line gains a noteSweep
block; an allocation, lock or syscall while played is unsuitable
(hosting.rt-safety.violations-under-notes), an instrument that could not be
played under the interposer is unknown (hosting.rt-safety.notes-unmeasured).

The verdict document becomes plugin-qualify.rt-safety/2: /1 with
measured.noteSweep and the note sweep's reasons in verdict. A plugin with
no note input reads the same verdict as before.

The omx-clap-host profile: the console's six CLAP host extensions plus the
three omx-clap-host configures (preset-load, track-info, remote-controls),
instruments fed, shared process, latency uncompensated. The prober offers
those three with --offer, and a CLAP target is probed once per offer its
profiles need, so each verdict is taken with its host's extensions. Its
list is held to omx-clap-core's clap_host_extensions.h and configure_core.

Fixtures: synth.clap (clean), synth-alloc.clap (allocates on note on) and
synth-midi.clap (MIDI's dialect only).
@linuxnow
linuxnow merged commit b9a7245 into main Oct 16, 2026
21 checks passed
@linuxnow
linuxnow deleted the feat/72-play-instruments branch October 16, 2026 06:13
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