What does Harmonic Surprise, Shepard Tones and Musical Chills conclude, in numbers, about “The Classics Examined: Three Hearings of the Xianchi Music, Sound without Sorrow or Joy, and Hanslick's "Forms Moved in Sound"”?

Answer: The fear, slackness and bewilderment of the three hearings of the Xianchi music correspond, in a learning listener, to an initial surprisal of 2.315 bits; a fall to 2.042 bits with excess surprise of only 0.086 once the music is familiar; and a rise to 3.167 bits with excess surprise of 1.085 once the source changes. Ji Kang's "the heart and the sound are plainly two things" holds in information theory: the surprisal profiles of the same music for two listeners correlate at only -0.10; but loudness is 32 sones for both, and arousal really does lie in the sound. Hanslick's restriction of musical content to forms moved in sound is strikingly close to Ji Kang's "restless or calm", and both underrated the force of expectation itself.

Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; it is not medical advice, claims no health effect, and is not marketing-compliance or legal advice. Chapter 1 writes harmony as a Markov chain: under an illustrative matrix a deceptive cadence carries 3.06 bits of surprisal and an authentic cadence only 0.51.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.086, 1.085, 2.042, 2.315, 3.167

block chords phase surprisal pred. entropy excess
11-40 fear 2.315 2.249 0.065
241-80 slack 2.073 2.029 0.045
381-120 slack 2.053 1.969 0.084
4 121-160 slack2.042 1.956 0.086
5 161-200 bewilder3.167 2.082 1.085
6 201-240 bewilder2.989 2.207 0.782
true entropy rate of the tonal source 1.913; uniform 2.585
Show the full program
# Chapter 7. p71: "first fear, then slackness, at last bewilderment"
# (Zhuangzi, Tian yun) as a learning listener. The listener predicts
# each chord from Dirichlet counts (prior 0.5 per cell, six chords).
# Chords 1 to 160 come from the ILLUSTRATIVE tonal matrix of p11;
# chords 161 to 240 from a source with no tendencies (uniform), the
# "no tail at the end, no head at the start" of the text.
# Per block of 40: mean surprisal, mean predictive entropy of the
# listener, and their gap (excess surprise), averaged over 200
# simulated listeners with a fixed seed.
import math
import random

CH = ["I", "ii", "IV", "V", "vi", "bVI"]
P = {
    "I":   [0.05, 0.15, 0.30, 0.30, 0.15, 0.05],
    "ii":  [0.05, 0.05, 0.05, 0.75, 0.05, 0.05],
    "IV":  [0.25, 0.10, 0.05, 0.45, 0.10, 0.05],
    "V":   [0.70, 0.02, 0.05, 0.08, 0.12, 0.03],
    "vi":  [0.05, 0.30, 0.35, 0.20, 0.05, 0.05],
    "bVI": [0.20, 0.05, 0.25, 0.40, 0.05, 0.05],
}
UNI = [1 / 6] * 6
RUNS = 200
rng = random.Random(20261112)
acc = [[0.0, 0.0] for _ in range(240)]
for _ in range(RUNS):
    cnt = {c: [0.5] * 6 for c in CH}
    prev = "I"
    for n in range(240):
        src = P[prev] if n < 160 else UNI
        nxt = rng.choices(CH, weights=src)[0]
        tot = math.fsum(cnt[prev])
        pred = [x / tot for x in cnt[prev]]
        acc[n][0] += -math.log2(pred[CH.index(nxt)]) / RUNS
        acc[n][1] += -math.fsum(q * math.log2(q) for q in pred) / RUNS
        cnt[prev][CH.index(nxt)] += 1
        prev = nxt
rows = acc
NAMES = ["fear", "slack", "slack", "slack", "bewilder", "bewilder"]
print("block chords   phase      surprisal  pred. entropy  excess")
for b in range(6):
    blk = rows[40 * b:40 * b + 40]
    s = math.fsum(r[0] for r in blk) / 40
    h = math.fsum(r[1] for r in blk) / 40
    print("{:>5} {:>3}-{:<4} {:<10} {:>9.3f} {:>14.3f} {:>7.3f}".format(
        b + 1, 40 * b + 1, 40 * b + 40, NAMES[b], s, h, s - h))
print("true entropy rate of the tonal source 1.913; uniform {:.3f}".format(
    math.log2(6)))

Single source and citation

Fan, Y. (2026). Harmonic-Expectation Violation Entropy in Orchestral Scoring, the Shepard-Tone Illusion and the Dynamics of Musical Chills (Version 1.0.0), Chapter 7: The Classics Examined: Three Hearings of the Xianchi Music, Sound without Sorrow or Joy, and Hanslick's "Forms Moved in Sound". 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-163 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026163,
  author    = {Fan, Yafu},
  title     = {Harmonic-Expectation Violation Entropy in Orchestral Scoring, the Shepard-Tone Illusion and the Dynamics of Musical Chills},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book