TORQWAVE v0.24.0

Testing

Torqwave’s checks are one console program, built with the app, that runs against the real machine: its audio device, its installed plug-ins and the built app itself.

./build/TorqwaveTests_artefacts/Release/TorqwaveTests

The Mac app is universal, and the tests are too: Scripts/package.sh runs them once for each half, the Intel one under Rosetta (arch -x86_64 TorqwaveTests --app ...). In the Intel half, a bundle built only for Apple silicon (ArmOnlyBundle) takes the Intel-only bundle’s place and is reported as having no code for Intel Macs.

On Windows it is build\TorqwaveTests_artefacts\Release\TorqwaveTests.exe, and the same checks run, with these differences:

On Linux the same checks run, with these differences:

The master rack checks on separate outputs need an interface with eight outputs, as the surround device checks need six; with fewer they are skipped, on either system.

What they check:

The player only ever plays silence, so the tests make no sound. The live input test is opt-in because macOS asks for microphone access for each new build of the test binary, and the test waits until someone answers:

./build/TorqwaveTests_artefacts/Release/TorqwaveTests --live-input

One part at a time

A flag runs one part of the suite by itself and prints ALL PASSED or the number that failed: --instruments, --synth, --drums, --battery-kit, --swarm, --sampler, --keys, --console, --decrypt, --sequences, --drumgrid, --effect-previews, --crossfades, --tempo (audio that follows the tempo), --sounddesign, --picture, --small (mixer scenes, channel-strip presets and hardware inserts) and --ai.

./build/TorqwaveTests_artefacts/Release/TorqwaveTests --decrypt

Others write something to look at or listen to, and check nothing:

Flag What it does
--synth-window <folder>, --swarm-window <folder>, --sampler-window <folder>, --drums-window <folder>, --console-window <folder> Saves pictures of that instrument’s window, or of the signal console’s scope
--drums-guide <folder> Draws the guide’s pictures of Basic Drums (guide-drums.png and the four beside it in docs/screenshots), with sounds made for the pictures
--sequencer-guide <folder> Draws the guide’s picture of the Sequence Library and the Sequencer (guide-presets.png in docs/screenshots): the factory presets grouped by style and searched for “dark floor”, and Rumble Roller open
--drums-sources <folder> Renders each of Basic Drums’ 24 sources to listen to: alone (hard, soft, five semitones down and up) and in two bars over a plain groove, 48 files
--drums-sounds <folder>, --drums-demo <folder> Renders every note of the Standard kit and each kit’s main sounds; and four bars of a groove for each kit. The same files each time, so two builds can be compared byte for byte
--battery-kit-files <list> Reads every Battery kit named in a list of your own and prints counts only: how many read, how many samples they name and how many are found. Not part of the suite: the kits are yours
--sampler-content <folder> Renders Torqwave Sampler’s factory samples and their presets from Torqwave’s own instruments into the folder: Data/Samples in the repository, which the build zips into the app. The same files each time; the suite checks the shipped ones against it
--sampler-folder <folder> Tries every sound in a folder of your own in Torqwave Sampler: as the first sound, in place of another, and sliced at its hits. It prints what the sampler makes of each (length, root, loop, the level at its root, the slices) and fails a sound that loads but does not play at its root, or plays quieter in place of another. Not part of the suite: the folder is yours
--sound-demos <folder> Renders the Sounds pages’ MP3s and their index.json (--only synth,kits for some of the groups)
--quality-demos <folder> Renders the Quality page’s before-and-after clips, spectrograms and facts.json
--patch-levels, --patch-hashes <file> Prints each factory patch’s level; writes a hash of each factory and Complex patch’s render
--023 Runs the 38 checks covering Torqwave 0.23.0: the six Live Creative FX, Torqwave Synth MSEG Curve LFO / Arpeggiator / 4-scene Evolve morphing, four Live MIDI FX, Piano Roll ratchets / micro-timing / groove templates, Audio to MIDI (melody and drums), Sampler SFZ import / round-robin / Warp, Basic Drums 8-bus multi-out, Track Modulators, and CLAP 1.2 hosting
--023-demos <folder> Renders 8 showcase 48 kHz / 24-bit WAV clips demonstrating Torqwave 0.23.0’s Live Creative FX, Live MIDI FX, Synth Arp & 4-Scene Evolve morphing, Ratchets & MPC Groove, Audio to MIDI melody resynthesis, and Track Modulators (published on the site as docs/sounds/release-023.html)
--headless Runs the full test suite without hardware audio device checks or installed plug-in scans (falling back to Torqwave’s built-in effects for the plug-in menu); run automatically in GitHub Actions on Windows (windows-2025) and Linux (ubuntu-24.04 via xvfb-run)
--synth-identity Renders every factory and Complex patch, the synth’s reference renders, every preset and the fixture sessions and compares each, sample for sample, with what 0.22.0’s engine made of them (Tests/Fixtures/SynthIdentity): a change that adds to the synth must leave them all as they were. Optimized builds only (the fixtures are one’s); about four minutes. --record writes the fixtures, and only where none are
--session-reference <folder> Loads the sessions in Tests/Fixtures/SynthSessions (Torqwave Synth on their tracks: factory and Complex patches and a hand-set one, automation on the synth’s level, cutoff, macros, an LFO’s rate and an FM depth, wheel, CC 74 and bend lanes), plays each as a bounce does and writes the hashes to the folder. A missing fixture fails; --write-session-fixtures writes them, only where none are
--sequence-clips <folder> --into <folder> Renders each preset in the folder and those under it to a WAV; --exact writes 32-bit float, to compare two builds sample for sample
--decrypt-measure Decrypts the two pinned sets of factory patches, in a set number of rounds and until settled, with each patch’s distance, lock, key, rounds and time
--decrypt-real [files] Decrypts recordings from outside the synth until settled, with each round’s distance; wav=<folder> writes each chain as the window plays it
--decrypt-file <sound> Decrypts one sound file as the window does, printing each round’s best lock and distance
--decrypt-eval <url> <model> Compares Decrypt with and without a model on a server you run
--ai-eval <url> <model> Runs Ask Torq’s evaluation requests against a model on a server you run; --ai-eval-set <name> chooses the set (session, sequence, library, decrypt, or followup for requests that follow a conversation)

The Decrypt timings in the changelog and the guide are from an optimized build with no other tests running.

A page of each theme

./build/TorqwaveTests_artefacts/Release/TorqwaveTests --theme-sweep themes

draws the editor (waveform and spectrogram, a selection, markers, the lasso in hand), its strip, a session with two clips, the Amplitude Statistics, the Tonal Balance and the marker list in every theme, one themes/<theme>.png each, to look at after a change to a theme or a panel. Anything a component leaves unpainted shows red. The theme test checks the contrast rules on every theme and accent without looking; this is for the eye.

Under the debugger and the sanitizers

The suite is also run as a Debug build, which turns on JUCE’s assertions and leak detector, and as a build with the Address and Undefined Behaviour Sanitizers, which catch reads past a buffer, uses of freed memory and undefined arithmetic that a Release build passes over in silence. Each is its own build folder:

cmake -S . -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build build-debug --target TorqwaveTests
./build-debug/TorqwaveTests_artefacts/Debug/TorqwaveTests --app build-debug/Torqwave_artefacts/Debug/Torqwave.app/Contents/MacOS/Torqwave

F="-fsanitize=address,undefined -fno-omit-frame-pointer"
cmake -S . -B build-asan -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_C_FLAGS="$F" -DCMAKE_CXX_FLAGS="$F" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
cmake --build build-asan --target TorqwaveTests
ASAN_OPTIONS=detect_leaks=0 UBSAN_OPTIONS=print_stacktrace=1 ./build-asan/TorqwaveTests_artefacts/RelWithDebInfo/TorqwaveTests --app build-asan/Torqwave_artefacts/RelWithDebInfo/Torqwave.app/Contents/MacOS/Torqwave 2>&1 | tee asan.log
grep "runtime error\|ERROR: AddressSanitizer" asan.log

Both pass. Under the sanitizers the only reports are shifts of negative or too-large values inside the LAME encoder and JUCE’s bundled JPEG library, which are theirs; none is in Torqwave’s code. Under Debug the one timing check a Debug build can’t meet (scrubbing speed) is given four times the room, and these assertions remain, none ours: JUCE’s Opus reader building a tag from UTF-8 bytes as if ASCII (our tags are read from the file itself, so nothing shows), a Label grabbing focus in a mixer that is not on screen in the test, and the VST3 host’s checks on kHs Gain.

The plug-in sweep

The plug-in sweep is opt-in too: it scans every plug-in on the machine the way Scan for Plug-ins does, which takes a while with a large collection, and some commercial plug-ins open licence windows while it runs. It writes a report of what works and why the rest don’t:

./build/TorqwaveTests_artefacts/Release/TorqwaveTests --plugin-sweep plugin-sweep.txt

A real sound library

The Sound Library check on a real library is opt-in as well: it indexes a folder of sounds into a new index (in a temporary folder, deleted afterwards), scans it again with nothing changed, and times searches. It only reads the library’s files.

./build/TorqwaveTests_artefacts/Release/TorqwaveTests --library "/path/to/your sounds"