Scripted RAVET Delay check (any format, macOS/Linux/Windows)¶
tools/reaper-validation/delay.py runs the tempo-synced delay
through REAPER unattended, in one plug-in format per run, and checks the audio.
It needs no manual dialog handling when it works, and it never uses the normal
REAPER configuration or projects:
- It creates a new work directory (default
target/reaper-delay/<format>-<time>) holding a disposable resource directory (resource/reaper.ini, passed with-cfgfile), a private copy of the bundle underplugins/<format>, the synthetic source and the generated ReaScript. Only that format's REAPER plug-in path points at the copy; the VST path points at an empty directory and the startup VST scan is skipped (vst_scan=2) unless VST3 is under test, because REAPER always appends the system VST3 folders and one unresponsive third-party plug-in there can stall startup. - It launches
reaper -cfgfile <ini> -nosplash -ignoreerrors -newinst <script.lua>in its own process group, waits for REAPER to quit (default timeout 240 s, after which REAPER and any scan helpers are stopped), then runs the checker. - On macOS,
--reapermay nameREAPER.app; the driver then runs a cached private copy (target/reaper-delay/app) with its own bundle identifier,org.ravet.reaper-harness, re-signed ad hoc. macOS keys its "reopen windows after an unexpected quit" prompt to the bundle identifier, so a terminated test run would otherwise block every later launch, including the normal REAPER.--no-isolatedisables the copy. - Guards: the script refuses to touch the host unless
reaper.GetResourcePath()is the disposable directory (it then logsABORTand the driver kills REAPER without letting it save settings), and the driver fails the run if any top-level file in the normal REAPER resource directory (~/Library/Application Support/REAPER,~/.config/REAPER,%APPDATA%\REAPER) changed during it.
The ReaScript (delay.lua) logs REAPER's version and every installed
RAVET Delay entry, inserts the one whose name starts with the format prefix
(CLAP: RAVET Delay, LV2: RAVET Delay, VST3: RAVET Delay,
AU: RAVET: RAVET Delay; --fx-name overrides), finds the controls by name and
drives them in physical units when REAPER reports the physical range (CLAP,
LV2) or normalized units otherwise (VST3, AU). Every edit is read back after the
plug-in has flushed it. It renders the master mix (48 kHz, 4 s, no tail) to
fixed.wav (sync off, time 100 ms, feedback 0, mix 100), saves and reopens the
project and checks every control, renders recalled.wav, then sets sync on,
division 1/8 and mix 50 at 150 BPM, renders synced.wav, saves, reopens and
checks the controls and tempo again, and quits REAPER. Hardware sends of the
master are muted; nothing is played live.
delay_checks.py reads the renders. The source holds stereo impulses at frames
24000 and 96000 (+0.5 left, −0.25 right). Each render must hold the dry impulse
scaled by 1 − mix at those frames, one echo scaled by mix exactly 4800 frames
(100 ms) or 9600 frames (1/8 at 150 BPM = 200 ms) later, and silence (error ≤
1e-4) elsewhere. It prints PASS/FAIL lines and RESULT PASS|FAIL, also
written to output/render-check.log; the driver exits non-zero on failure.
python3 tools/reaper-validation/delay_checks.py <work>/output re-checks a run.
Build the bundle first (only the delay crate is built), then run per OS:
# macOS
python3 scripts/bundle-clap.py --plugin delay --profile release
python3 scripts/bundle-lv2.py --plugin delay --sdk "$(brew --prefix lv2)"
python3 tools/reaper-validation/delay.py --format clap \
--bundle "target/clap/release/RAVET Delay.clap" --reaper /Applications/REAPER.app
python3 tools/reaper-validation/delay.py --format lv2 \
--bundle target/lv2/ravet_delay.lv2 --reaper /Applications/REAPER.app
# Linux (from a desktop session, or export its variables over SSH, e.g.
# XDG_RUNTIME_DIR=/run/user/$(id -u) WAYLAND_DISPLAY=wayland-1 DISPLAY=:0)
python3 scripts/bundle-clap.py --plugin delay --profile release
python3 scripts/bundle-lv2.py --plugin delay --sdk /path/to/lv2-1.18.10
python3 tools/reaper-validation/delay.py --format clap \
--bundle "target/clap/release/RAVET Delay.clap" --reaper /usr/bin/reaper
python3 tools/reaper-validation/delay.py --format lv2 \
--bundle target/lv2/ravet_delay.lv2 --reaper /usr/bin/reaper
If the log shows Installed RAVET Delay candidates: none, add the right
plug-in path key with --ini KEY=VALUE, or pass --env-path to also export
CLAP_PATH/LV2_PATH. --env-path is off by default because the variable
reaches any REAPER process started from that environment.
VST3 and AUv2 runs use the same driver: --format vst3 --bundle <path>.vst3
(the startup VST scan then runs, including the system VST3 folders), and
--format au for an AU component already installed in a system Components
folder, since REAPER scans AUs only there. VST3 has run on Linux and Windows.
The AU Delay has run on macOS arm64 and under Rosetta 2
(run). Do not use a
sandbox-exec wrapper for AU runs, because REAPER then sees none of the AU's
parameters.
# Linux VST3
python3 scripts/bundle-vst3.py --plugin delay --sdk /path/to/vst3sdk --profile release
python3 tools/reaper-validation/delay.py --format vst3 \
--bundle target/vst3/generic/delay/release/VST3/Release/ravet_delay_vst3.vst3 --reaper /usr/bin/reaper
The ReaScript also logs REAPER's audio system (Audio system JACK,
Audio system WaveOut); the checks need one that is running.
Windows¶
On Windows the driver writes clap_path_win64, lv2path_win64 and
vstpath64 (the keys REAPER 7.82 x64 names in reaper.exe and kept in the
disposable ini after a run) and [audioconfig] mode=2 (WaveOut). Without an
audio setting, a fresh configuration stops at "You have not yet selected an
audio device". With no audio system running (mode=5 on the tested VM), CLAP
parameter edits never reached the plug-in, because REAPER flushes them from
the audio thread. verchk=0 (written on every platform) turns off the online
version check, whose "New Version Notification" dialog stopped three Windows
runs mid-script.
Windows bundles are cross-built on Linux with --target windows
(decision 0285):
python3 scripts/bundle-clap.py --plugin delay --profile release --target windows
python3 scripts/bundle-vst3.py --plugin delay --sdk /path/to/vst3sdk --profile release --target windows
python3 scripts/bundle-lv2.py --plugin delay --sdk /path/to/lv2-1.18.10 --target windows
# → target/clap/windows/release/RAVET Delay.clap
# target/vst3/generic/delay/windows-release/VST3/Release/ravet_delay_vst3.vst3
# target/lv2/windows/ravet_delay.lv2
With Python on the Windows machine, the driver command is the same as
elsewhere (py -3 tools\reaper-validation\delay.py --format clap --bundle
"…\RAVET Delay.clap" --reaper C:\REAPER\reaper.exe). That form has not been
run: the tested Windows 11 VM has no Python. For such a machine, prepare on
another computer, run the generated PowerShell script on Windows, and check
on the first computer:
# 1. Prepare (Linux/macOS). Paths in the ini and script name the Windows copy.
python3 tools/reaper-validation/delay.py --format vst3 \
--bundle target/vst3/generic/delay/windows-release/VST3/Release/ravet_delay_vst3.vst3 \
--windows-root 'C:\Users\me\ravet-reaper' --work target/reaper-delay/win-vst3-1
# 2. Copy the work directory over (here with OpenSSH).
scp -r target/reaper-delay/win-vst3-1 me@vm:C:/Users/me/ravet-reaper/
# 3. Run it in the logged-on user's desktop session as a scheduled task, poll
# for run-windows.done, then delete the task.
ssh me@vm "schtasks /create /tn ravet-reaper /tr 'powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File C:\Users\me\ravet-reaper\win-vst3-1\run-windows.ps1' /sc once /st 23:59 /it /f; schtasks /run /tn ravet-reaper"
ssh me@vm "Test-Path C:\Users\me\ravet-reaper\win-vst3-1\run-windows.done"
ssh me@vm "schtasks /delete /tn ravet-reaper /f"
# 4. Copy back and check renders, host log and guard snapshots.
scp -r me@vm:C:/Users/me/ravet-reaper/win-vst3-1 target/reaper-delay/win-vst3-1.back
python3 tools/reaper-validation/delay.py --check-only target/reaper-delay/win-vst3-1.back
--windows-root only prepares. --reaper then names the Windows executable
(default C:\REAPER\reaper.exe), and --timeout/--quit-grace are written
into run-windows.ps1. That script records the user, session and REAPER
version in run-windows.log; writes guard-before.tsv and guard-after.tsv
(size, modification time and SHA-256 of each top-level file in
%APPDATA%\REAPER and in REAPER's program directory, where a portable install
keeps its configuration); launches the driver's command; stops at the same
ABORT, DONE + quit grace and timeout conditions; and kills only the REAPER
process it started (taskkill /T). --check-only runs the render checks and
fails if any guarded file changed.
The run must be in the interactive desktop session. Started directly from a
Windows OpenSSH login (session 0, not interactive), REAPER wrote no host log
in 120 s. A task created with /it by the logged-on user runs in that user's
console session (session 1, interactive) and works. On the tested VM REAPER
takes about 20 s to reach the script; runs took 28–36 s. If a run times out,
look at the screen (on a QEMU VM, the monitor's screendump command) and set
the blocking dialog's preference with --ini ([SECTION]KEY=VALUE writes
outside [REAPER]).
Executed results are recorded in work status. A pass covers the tested REAPER version, OS, format and offline render path only: no live playback, device, deadline, editor or automation claim.