home/ atoms/ constrain-then-randomize-order

Choose the scale, chord, and grid first, then let chance fill them; never randomize constraints and content at once

The constrain-then-randomize pattern is an ordering rule: first choose the constraints (scale, chord, Euclidean grid), and only then let random-walk, weighted-choice, or degrade fill them. The order matters — you must never randomize the constraints and the content at the same time, because if both the box and its contents move, nothing anchors the result and the output stops sounding intentional. Fixing the constraint box first is what guarantees every random result lands inside a musically acceptable space.

Examples

Good: fix c:minor + a Euclidean grid, THEN degrade/random-walk inside it Bad: randomize the scale AND the notes simultaneously — no anchor

Assessment

State the constrain-then-randomize ordering rule and explain why randomizing the constraints and the content at once breaks it.

“**Constrain then randomize**: choose scale + chord + Euclidean grid first, *then* let random-walk / weighted-choice / degrade fill it. Never randomize the constraints and the content at once.”
context/ · L2-composer/music/generative.md · chunk 1