home/ atoms/ constrained-randomness

Effective generative music constrains the output space first so every random result is musically acceptable

Raw randomness sounds like noise; constrained randomness sounds like a musician improvising. Every generative technique in live coding works by passing randomness through a musical constraint — a scale, a probability, a grid, or a small step size. The golden rule is to constrain the output space first so that every possible result is acceptable, then let chance fill it. A random melody over a minor pentatonic (scale-constraint) cannot hit a wrong note; a random rhythm from euclidean-rhythm cannot sound arhythmic. Design the box before introducing chance, rather than randomizing freely and hoping.

Examples

Good: randomize degree within a scale constraint — every result is in-key Bad: randomize pitch freely — high chance of dissonance // Strudel: note(irand(7).scale(“c:minor”))

Assessment

State the golden rule of constrained randomness and give two examples of constraints that make a random output space musically safe.

“The golden rule**: constrain the *output space* so every possible result is acceptable. A random melody over a **minor pentatonic** (`scale-constraint`) can't hit a wrong note”
context/ · L2-composer/music/generative.md · chunk 1