0.42.0 (78): preset randomizer for five devices (Android and iOS)

A RANDOM button in the preset bar of the Synth, Morph Pad, Grain Cloud,
Wavetable and Ambience Reverb editors: it rolls a playable patch and names it.
The rules live in core/src/model/Randomizer.cpp and are shared, so a seed gives
the same patch on both platforms. Android reaches it over JNI as preset text and
imports it; iOS writes the Params into the slot. Neither touches the slot's own
files — a loaded sample or an imported wavetable survives a roll, because the
dice are for the settings, not for the sounds.

Scattering values over the parameter ranges produces silence and the occasional
scream, so the rules encode three things instead: something always sounds (a
layer is always up, an envelope that decays to nothing gets a body, a filter is
never shut, a reverb is never fully dry); levels share a budget and resonance,
drive and saturation stay out of the range where a patch screams; and tunings
come from consonant intervals rather than a uniform draw.

core/tests/randomizer_test.cpp is the specification: it renders every device over
hundreds of seeds through the real voice and fails on anything out of range,
silent, clipping or non-finite. Every bound that looks arbitrary was put there by
a seed it caught — a band-pass parked above the note (peak 0.010 against a 0.3
median), a Vel -> Cutoff mod slot closing the filter (0.41 -> 0.02), a choir-only
Morph Pad through its own band-pass, and MORPH TO, which a roll now leaves alone
because MORPH TIME carries a held note all the way onto a factory drone at a
level the randomizer never chose (1.33 with every layer of its own at zero).
--dump <TYPE> <seed> [key=value ...] re-renders one roll with overrides, which is
how each of those was found.

Also fixes the shared engine not compiling outside Apple's toolchain: a missing
<cstdint> in core/include/sizzle/Model.hpp. No change to the apps, but the
engine's tests and benchmark now build with GCC too — which is how the rules
above were iterated while the Mac was unreachable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Reactorcoremeltdown
2026-11-18 20:55:23 +01:00
co-authored by Claude Opus 5
parent e78b2c1418
commit 0d6ed4694f
18 changed files with 1033 additions and 4 deletions
+17
View File
@@ -5,6 +5,23 @@ version in `versions.properties`; versions before 0.28.0 are described in the gi
log (one commit per version). Since 0.37.0 Android and iOS share one version and
one feature set; the iOS side of each version is in `ios/CHANGELOG.md`.
## 0.42.0 (versionCode 78)
- **RANDOM:** the Synth, Morph Pad, Grain Cloud, Wavetable and Ambience Reverb
editors have a RANDOM button in the preset bar. It throws a new patch into the
editor and names it ("Hazy Drift"). It is a starting point rather than a slot
machine: a roll is always something you can hear and never something that
clips, because levels, filters and envelopes are drawn inside ranges that keep a
patch in that territory instead of scattered over the whole knob. It replaces
the editor's settings like loading a preset does, so SAVE first if you want to
keep what is there — but it never touches a sample you loaded or a wavetable you
imported. The other devices have none on purpose: a Sampler is only as
interesting as the sound you put in it, and the MIDI effects have too few
settings for a dice roll to say anything. (iOS has the same in 0.42.0.)
- Fix: the shared engine did not compile outside Apple's toolchain — a missing
`<cstdint>` in `core/include/sizzle/Model.hpp`. No change to the apps; it means
the engine's tests and benchmark now build with GCC too.
## 0.41.1 (versionCode 77)
<<<<<<< HEAD