MilkDrop: a preset generator of our own (#579, part 1) - #609
Merged
Merged
Conversation
Four axes (energy, warmth, density, motion) and a seed write an original .milk: six motion patterns, six wave patterns, four shape patterns, four composite and two warp shaders, all written in this repository, in MilkDrop 2's file format. - A code (energy-warmth-density-motion-seed) brings a preset back; the id comes from it, so saving the same preset twice leaves one file. - Each part draws from its own random stream, so a slider changes the preset rather than replacing it. - Only arithmetic reaches the written numbers: the same code gives the same file on every platform. Golden hashes pin it. - Nothing flashes: no invert/solarize/brighten, no step functions, colours built to stay in [0,1] at any volume (MilkDrop wraps them). Measured on 200 presets x silence, demo and loud bass: no shader fell back, none went black, white, frozen or flashed more than twice a second. Refs #579
Studio gets a card with the four sliders, a code field, Generate, Shuffle and Save to Library. - Generate loads the preset without saving it, through the MilkDrop panel's own selection path. Rating, favorite and tags stay off for the unsaved id and back navigation skips it. - Save writes the generator's last result, not the screen, and the MilkDrop panel takes it into its list at once. - A slider regenerates with the same seed when released, not while dragging. - Every new string has an English entry. Refs #579
The 200-preset and 960x720 probes ran again on the committed generator: the 320x180 figures are unchanged; a frame took 3.0-3.4 ms and one 960x720 run of 120 reached two flashes a second. The saved author, like the name, is in the interface's language. Refs #579
This was referenced Sep 23, 2026
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.
The first half of #579: a MilkDrop preset generator of our own. Mash-ups come in a second PR.
What it does
Studio → MilkDrop Preset Generator: four sliders (energy, warmth, density, motion) and a seed write an original
.milk.Preview, save and code
md_gen1_<code>, so saving twice leaves one file.energy-warmth-density-motion-seedbrings a preset back.Safety
above,below,iforrand.Measured
Scripts outside the repo, the engine in Electron, flash limiter and reduced motion off.
The probe found four defects, and the generator changed for each:
Tests
37 new tests: 24 for the generator and 13 for the panel with a fake DOM. The i18n coverage test also scans the new panel. 26 of 26 mutations are caught.
npm testpasses 2147/2147; smoke passes, and the user-data checksums were unchanged.Not done: mash-ups (next PR), and MIDI/OSC or web-remote actions that generate.
Refs #579