Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,17 @@ The prober runs each plugin headless at every `--rates` rate, under an interpose
allocations, locks and syscalls its `process()` makes while every parameter is swept, and prints
the file's SHA-256 beside what it measured. The verdict is the real-time-safety one: **suitable**
only on a clean count, **unsuitable** on any allocation, lock, syscall, main-thread host call from
`process()` or `CLAP_PROCESS_ERROR`, **unknown** when it could not be counted. `--out` writes one
`process()` or `CLAP_PROCESS_ERROR`, **unknown** when it could not be counted. An instrument is
quiet until it is played, so a plugin with a note input is also played, at every rate and 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, all notes off, in the dialect its note input
reads (CLAP's, else MIDI's). An allocation, lock or syscall while it plays 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`). `--out` writes one
document per plugin binary and host profile, named `<sha256>.<profile>.rt-safety.json`, so a
verdict never outlives the bytes it was measured on. Each line also carries the plugin's pin, an
verdict never outlives the bytes it was measured on. Its schema is `plugin-qualify.rt-safety/2`: `/1` with
`measured.noteSweep` added and the note sweep's reasons in `verdict`; a plugin with no note input
reads the same verdict under both. Each line also carries the plugin's pin, an
`integrity` block: the `.clap`'s SHA-256 by its file name and the parameter-layout fingerprint
`omx-layout/1:<sha256>`, both computed through plugin-hostd's `pin.h`, which is what a console
hands plugin-hostd as `pin_set` before it adds the plugin. `OMX_CLAP_QUALIFY` and `OMX_RT_INTERPOSE`
Expand Down Expand Up @@ -181,6 +189,7 @@ hosts. Two projects share the measurements and differ only in the profile they c
```
plugin-qualify --host-profile jalv ./my-synth.lv2 # zynthian: one jalv process per plugin
plugin-qualify --host-profile mod-host ./my-fx.lv2 # MOD: one shared mod-host process
plugin-qualify --host-profile omx-clap-host ./my-synth.clap # omx-clap-host, alone or under plugin-hostd
plugin-qualify --host-profile jalv,mod-host,openmixer-console <uri> # one verdict per profile
plugin-qualify --host-profile ./my-host.json <uri> # your own host
```
Expand All @@ -190,8 +199,13 @@ plugin-qualify --host-profile ./my-host.json <uri> # your own ho
| `openmixer-console` (default) | in-process (the console's RT thread) | no | the console's in-process table | 0.05 at 96000 / 1024 |
| `jalv` | per-process | yes | jalv 1.6.8 `src/jalv.c` (zynthian's fork passes the same list) | 0.25 at 48000 / 256 |
| `mod-host` | shared-process | yes | mod-host f14a230 `src/effects.c` | 0.05 at 48000 / 128 |
| `omx-clap-host` | shared-process | yes | the console's in-process table (the same LV2 feature provider) | 0.05 at 48000 / 128 |

The `jalv` and `mod-host` budgets are defaults, not a measurement of your board. State your own
`omx-clap-host` offers a CLAP plugin the console's six host extensions and three more,
`clap.preset-load/2`, `clap.track-info/1` and `clap.remote-controls/2`. A CLAP plugin judged
under it is probed again with those three offered, so its verdict holds for the host it runs in.

The `jalv`, `mod-host` and `omx-clap-host` budgets are defaults, not a measurement of your board. State your own
by writing a profile file. Every field is required; a missing or mistyped field is refused and
never filled in with a default:

Expand Down
9 changes: 9 additions & 0 deletions native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#
# make -C native build/clap-qualify, build/lv2_measure, build/lv2_host_probe, build/rt_interpose.so,
# build/fixtures/{rt-safe,rt-unsafe,controls,params-2048,params-2049,info-fails,leaky-delay,undeclared-delay}.clap,
# build/fixtures/{synth,synth-alloc,synth-midi}.clap,
# build/fixtures/fail-alloc.so,
# build/fixtures/lv2/{rt-safe,rt-unsafe,host-faithfulness}.lv2
# build/lv2_measure_options_test the measurer's feature options oracle
Expand Down Expand Up @@ -78,6 +79,7 @@ CFLAGS += -std=gnu11 -Wall -Wextra -Werror=implicit-function-declaration -Werror
all: $(BUILD)/clap-qualify $(BUILD)/lv2_measure $(BUILD)/lv2_host_probe $(BUILD)/lv2_measure_options_test $(BUILD)/rt_interpose.so $(BUILD)/fixtures/rt-safe.clap $(BUILD)/fixtures/rt-unsafe.clap \
$(BUILD)/fixtures/controls.clap $(BUILD)/fixtures/params-2048.clap $(BUILD)/fixtures/params-2049.clap \
$(BUILD)/fixtures/info-fails.clap $(BUILD)/fixtures/leaky-delay.clap $(BUILD)/fixtures/undeclared-delay.clap \
$(BUILD)/fixtures/synth.clap $(BUILD)/fixtures/synth-alloc.clap $(BUILD)/fixtures/synth-midi.clap \
$(BUILD)/fixtures/fail-alloc.so \
$(BUILD)/fixtures/lv2/rt-safe.lv2/gain.so $(BUILD)/fixtures/lv2/rt-unsafe.lv2/gain.so \
$(BUILD)/fixtures/lv2/host-faithfulness.lv2/host-faithfulness.so
Expand Down Expand Up @@ -137,6 +139,13 @@ $(BUILD)/fixtures/leaky-delay.clap: fixtures/gain.c | $(BUILD)/fixtures
$(BUILD)/fixtures/undeclared-delay.clap: fixtures/gain.c | $(BUILD)/fixtures
$(CC) $(CPPFLAGS) $(CFLAGS) $(CLAP_CFLAGS) -DFIXTURE_DELAY=$(FIXTURE_DELAY) -DFIXTURE_UNDECLARED -shared -fPIC -fvisibility=hidden $(LDFLAGS) -o $@ $<

# the instrument the note sweep plays: clean, allocating on note on, and reading MIDI's dialect alone
$(BUILD)/fixtures/synth.clap: fixtures/synth.c | $(BUILD)/fixtures
$(CC) $(CPPFLAGS) $(CFLAGS) $(CLAP_CFLAGS) -shared -fPIC -fvisibility=hidden $(LDFLAGS) -o $@ $< -lm
$(BUILD)/fixtures/synth-alloc.clap: fixtures/synth.c | $(BUILD)/fixtures
$(CC) $(CPPFLAGS) $(CFLAGS) $(CLAP_CFLAGS) -DFIXTURE_ALLOCATES_ON_NOTE -shared -fPIC -fvisibility=hidden $(LDFLAGS) -o $@ $< -lm
$(BUILD)/fixtures/synth-midi.clap: fixtures/synth.c | $(BUILD)/fixtures
$(CC) $(CPPFLAGS) $(CFLAGS) $(CLAP_CFLAGS) -DFIXTURE_MIDI_ONLY -shared -fPIC -fvisibility=hidden $(LDFLAGS) -o $@ $< -lm
# a preload failing one chosen allocation, for the prober's out-of-memory paths
$(BUILD)/fixtures/fail-alloc.so: fixtures/fail-alloc.c | $(BUILD)/fixtures
$(CC) $(CPPFLAGS) $(CFLAGS) -shared -fPIC -fvisibility=hidden $(LDFLAGS) -o $@ $<
Expand Down
Loading
Loading