VSA Melody

the note model, as one hypervector.

The same idea as Markov Melody, but the "what-follows-what" table collapses into a single hypervector M = Σ bind(context, ρ(next)). To compose, unbind the current context out of M and clean up. It's lossier than a count table — watch it fray as you shrink D — but it can do what a table can't, like transpose the whole tune with one operation.

key: 0

What M expects next — cleanup similarities

Unbinding the last context out of M gives a blurry vector; its similarity to each known event is the (approximate) next-note distribution. Shrink D and these bars get noisy — crosstalk swamps the signal.

Pitch atoms

Each pitch is ρⁱ(seed) — a permutation power of one vector. So shifting every note up a step is a single ρ applied across the tune: transposition is algebra, not arithmetic. The − / + step buttons do exactly that, then clean up.

How it works. Every note-event (pitch, dur) is a hypervector bind(PITCHᵢ, DUR_d). The model folds each corpus transition into one running sum, M += bind(context, ρ(next)), where context is the ρ-summed last k events. To predict, bind M with the current context and undo the ρ: out comes the next event blurred by every other transition, which cleanup snaps to the nearest real event. Sampling temperature softens that argmax into a distribution.

Tie to Neuron Lab. This is literally Imagine a Move's forward model M = Σ bind(state⊗action, ρ(next)) and Sequence Replay's ρ-history, pointed at music. Versus Markov Melody's exact count table, the hypervector is lossy (the capacity cliff — turn D down to hear it), but it buys composition (pitch ⊗ duration ⊗ … in one slot) and algebra (transpose, invert, retrograde as operators). The whole "model" is one D-dimensional vector.