Repository navigation
Play instruments when qualifying them, and add an omx-clap-host profile (#72) - #81
Merged
Merged
Conversation
…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).
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.
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 gainsnoteSweep(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 offersclap.preset-load/2,clap.track-info/1,clap.remote-controls/2(host functions that answer nothing), and lists them inhostExtensions.noteSweepReasonsbesideclapRtReasons; new codeshosting.rt-safety.clean-under-notes,hosting.rt-safety.violations-under-notes,hosting.rt-safety.notes-unmeasured. A plugin with no note input gets none.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).qualifyClapTargetsruns the prober once per offer the asked profiles need and judges each profile from its own run.synth.clap,synth-alloc.clap(malloc on note on),synth-midi.clap.Schema change (additive, versioned):
plugin-qualify.rt-safety/1becomesplugin-qualify.rt-safety/2=/1+measured.noteSweep+ the note sweep's reasons inverdict.reasons. Every/1field is unchanged; an effect's/2verdict equals its/1verdict.Reader contract for omx-plugins (
tools/qualify-release.sh): it reads onlyverdict.ratingandverdict.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 newhosting.rt-safety.*codes.Tests (podman, worker image f05555bdca2de108 + jack/lv2 devel)
synth-alloc.clapreadssuitableunderopenmixer-console. After:unsuitable,hosting.rt-safety.violations-under-notes, under bothopenmixer-consoleandomx-clap-host;synth.clapreadssuitableunderomx-clap-host.--offerand the omx-clap-host verdict, an unknown--offerrefused), parse and verdict units,proberOffer, one run per offer, the profile held to omx-clap-core'sclap_host_extensions.handconfigure_core, and an instrument suitable underomx-clap-hostand unsuitable underopenmixer-consolein the classifier.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, withPLUGIN_HOSTDpointed at a built daemon forpins-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.