Markov (major) and (minor)
Common-practice harmonic-function tables. See Aldwell & Schachter, Harmony and Voice Leading; Schoenberg, Structural Functions of Harmony (1954). Weights here are hand-tuned, not corpus-fitted.
Pick a style above and press Play to hear chords sampled from a Markov chain over diatonic functions, or step through a preset progression. The workbench is grouped by engine layer (Plan, Decision, Voicing, Surface), so each panel shows the state and the visualization for one part of the pipeline. For the formal probability theory behind the chain, see Markov chains; for chord shapes and the interval geometry of a single chord, see Chord qualities; for voice-leading-driven motion between triads (P, L, R transformations on the Tonnetz), see Neo-Riemannian harmony.
Graphic grammar: pale chromatic ring, red root, black selected tones, translucent red-to-blue chord body; the dimmed previous chord lingers as a "ghost" polygon during transitions.
Phrase type and rhythm are chosen one phrase ahead. When an antecedent finishes, its shape (rhythm, function contour, function-distance curve, bass direction, accompaniment) is stored for the next consequent to answer.
Each chord starts as a function transition row, then is reshaped in stages: cadence boosts at phrase edges, style grammar, phrase-memory reuse, and cadence templates near the end. Occasionally a secondary dominant overrides the pick.
Each reshape stage as its own bar: raw, cadence-boosted, style, memory, cadence-template, final.
Preset mode: chords are read from a fixed sequence, so there's no probability row to reshape. The function dots and function graph still track which diatonic role each chord plays.
Every inversion is scored as previous_motion + 0.4 × expected_next_motion. When a consequent is answering, the antecedent's bass direction biases the choice so the answer mirrors the question's contour.
The accompaniment pattern is chosen per phrase, then ornament density follows phrase position: openings stay bare, mid-phrase accepts passing tones, the pre-cadence slot gets an appoggiatura. Every cadence type releases longer. Walking bass aims at the next root.
Common-practice harmonic-function tables. See Aldwell & Schachter, Harmony and Voice Leading; Schoenberg, Structural Functions of Harmony (1954). Weights here are hand-tuned, not corpus-fitted.
The "axis" bias (I–V–vi–IV) and strong V→vi (deceptive) are documented in the McGill Billboard Project (Burgoyne, Wild & Fujinaga 2011) and de Clercq & Temperley, A Corpus Analysis of Rock Harmony (2011).
ii–V–I dominance and vi→ii back-cycling are pedagogical staples (e.g. Aebersold), and have been empirically measured against the iRealPro corpus by Broze & Shanahan, Diachronic Changes in Jazz Harmony (2013).
Strong vii°→I and V→I are signatures of the chorale style. HMM and n-gram models trained on the chorales appear in Allan & Williams, Harmonising Chorales by Probabilistic Inference (NIPS 2005), and the earlier HARMONET system (Hild, Feulner & Menzel 1992).
Antecedent / consequent / deceptive / open phrase types follow William Caplin, Classical Form (1998). The phrase-level transitions here are hand-tuned to favor the antecedent→consequent period.
All five chord tables are stylized approximations calibrated to evoke each idiom; they aren't the empirical numbers from the cited works. Look there for real corpus data.
Markov modes plan a phrase ahead. The engine carries a phrase type (antecedent, consequent, deceptive, or open) and a rhythm pattern that fixes the slot durations for the whole phrase. The phrase type itself is sampled from a phrase-level Markov chain that favors antecedent → consequent pairs.
Each style has a seven-function transition table. The current row passes through five reshapes in order (raw → cadence-position boosts → style grammar → phrase-memory reuse → cadence-template rewrite → final), and the Decision Trace renders one bar per stage so each reshape's fingerprint is visible. Occasionally a secondary dominant (V/V, V/vi, V/ii) overrides the pick entirely; the trace marks the override row in red.
In the last two slots of a phrase the cadence template takes over from the Markov bias. Antecedents aim at a half cadence on V; consequents pass through predominant → dominant → tonic; deceptive phrases go through V to vi; jazz mode prefers ii7 → V7 → Imaj7. Every cadence type also gets a duration extension so the close has room to register.
When an antecedent completes, the engine stores its shape: rhythm sequence, function contour, function-distance curve, bass direction, and accompaniment pattern. If the next phrase is a consequent, all five are replayed for the opening and middle. Function contour biases the Markov row, rhythm replaces the consequent's own sequence, the function-distance curve blends into the dynamic shape, and bass direction biases the inversion choice. The last two slots fall through to the cadence template so the answer closes instead of copying. (The Voicing panel's "function distance" strip shows this curve over time; it's a heuristic distance-from-tonic based on harmonic function, not an acoustic dissonance measurement.)
After the chord function is chosen, every inversion is scored. The chosen voicing minimizes motion from the previous chord and weights likely next chords: previous_motion + 0.4 × expected_next_motion. When a consequent is answering, the antecedent's stored bass direction adds a small tie-breaking bias so the answer mirrors the question's contour.
The accompaniment pattern is chosen per phrase. Ornament density follows phrase position: the opening slot stays bare (no passing tones, no neighbors), mid-phrase slots accept passing tones, and the pre-cadence slot earns an appoggiatura, a chromatic upper neighbor that lands on the downbeat and resolves down by half-step into a chord tone. The pre-cadence slot also moves more (shorter durations); every cadence releases longer. Walking bass aims at the next root.