generative mutation, statistics, and hybrid reasoning
mutation introduces controlled variability to sequences or templates over time. it enables evolving patterns, generative variation, and non-repetitive textures in synthesis and composition.
a template is a base sequence or pattern—a blueprint of values or onsets. mutations operate on copies of this template rather than the original, ensuring you always have a known starting point.
mutations modify the working copy via operations such as:
accumulating mutations means each mutation builds upon the previous state, leading to gradually evolving sequences.
to prevent unbounded drift and reintroduce periodic structure, mutations can be reset:
by combining accumulation and reset, you can craft rich generative behaviors:
by leveraging templates, accumulation, and reset strategies, you can generate sequences that balance predictability (through resets to known templates) with novelty (through cumulative mutation), yielding dynamic and engaging musical structures.
Per-element change
map
Cumulative mutation
fold
, scanl
Generative unfolding
unfold
Evolving stateful system
Functional analogue: state monad
Purpose: handles resets, random mutation, and branching
this section defines statistical tools to analyze, compare, and generate time-variant parameter patterns. by summarizing complex detail into concise metrics, you can guide monte-carlo generators, target specific pattern characteristics, or blend existing motifs.
note: pointwise interpolation creates similarity by direct value blending, while statistics-based methods operate on aggregated properties.
mu = (1/N) * sum_{i=1 to N} x_i
use: center generated values so total “energy” or centroid aligns with target.
the middle value when data are sorted. use: ensure half the values lie above and half below, giving robustness to outliers.
sigma = sqrt((1/N) * sum_{i=1 to N} (x_i - mu)^2)
use: control overall variability or “jitter” of parameters.
range = max(x) - min(x)
use: bound generated values within desired dynamic or spectral limits.
min(x)
, max(x)
use: clamp generation or normalization processes.
gamma1 = ((1/N) * sum_{i=1 to N} (x_i - mu)^3) / sigma^3
use: bias generation toward longer tails of high or low values.
gamma2 = ((1/N) * sum_{i=1 to N} (x_i - mu)^4) / sigma^4 - 3
use: distinguish between flat vs. heavy-tailed distributions.
COM = (sum_{i=1 to N} (i * x_i)) / (sum_{i=1 to N} x_i)
use: measure where energy or weight concentrates in time or frequency.
count of distinct overlapping subsequences up to length L.
low example: 11111
, 112112
→ few unique patterns
high example: 12345
, 112212
→ many unique patterns
use: quantify repetitiveness or novelty.
apply any of the above statistics (mean, sigma, skew) to
Δ[n] = x[n] - x[n-1]
use: control smoothness vs. abrupt changes in envelopes or sequences.