| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Harmonic.Evaluation.Analysis.Markov
Description
This module is used exclusively during data ingestion (app/Main.hs) to
compute transition probabilities from the YCACL corpus. These probabilities
are stored as edge weights in the Neo4j graph database.
This module is NOT used in the runtime generation path. At runtime, transition weights are read from Neo4j edges by Harmonic.Evaluation.Database.Query.
Academic Lineage
Data Science In The Creative Process (South, 2018), Section: Markov module. The Markov chain approach resolves "Generative Uninspiration" — the problem of manually traversing exhaustive overtone combination charts — by training transition probabilities on the Yale Classical Archives Corpus (Bach chorales and other composers).
Synopsis
- type Edge = (Cadence, Cadence)
- type TransitionCounts = Map Edge Double
- transitionCounts :: [Cadence] -> TransitionCounts
- transitionProbabilities :: [Cadence] -> Map Edge Double
Documentation
transitionCounts :: [Cadence] -> TransitionCounts Source #
Count each adjacent pair in a cadence sequence. Ingestion-only: the live generator reads edge weights from Neo4j rather than recomputing these.
transitionProbabilities :: [Cadence] -> Map Edge Double Source #
Normalise transitionCounts into per-source transition probabilities, so
the outgoing edges of each cadence sum to 1.