Hearing page: how a tone becomes something heard, at /hearing #83

Merged
merge-queue merged 2 commits from hearing-page into main 2026-11-19 13:22:45 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/ROMAINE-56

Adds a page at romaine.life/hearing: three interactive sections, with sound, on how one wave of air becomes notes. It came out of a conversation about the difference between melody and harmony (JM-1).

Added

  • hearing/: plain JS + Vite + canvas 2D, built by a new Dockerfile stage into frontend/hearing.
    1. The ear splits sound by frequency: a plucked string (Karplus-Strong), simple waveforms or the microphone, drawn as the one waveform that reaches the ear and as the response along an unrolled cochlea (Greenwood's map, Patterson's rounded-exponential filters one critical band wide), with the heard pitch's harmonics marked.
    2. Pitch is computed: ten harmonics switched on and off; with the fundamental removed, or only 4, 5 and 6 on, the YIN pitch finder still reads the fundamental, and the wave's repeats are marked.
    3. Two notes: both notes' overtones on one axis, rubbing pairs red and matching pairs green, and the Sethares/Plomp-Levelt roughness curve across an octave, with and without overtones.
  • hearing/src/dsp.js holds the math with no browser APIs. npm test (Node's test runner, 13 tests: missing fundamental, residue pitch, pluck tuning on all six open strings, roughness dips at the fifth and octave only with overtones) and npm run lint (ESLint) run in the web-app suite's check-test job, which picks up every package with a test script.
  • The image self-test checks /hearing/; the landing page lists it; README describes it.

Left alone: the other pages, the server's routing (static files already serve /hearing/).

Failure states are shown in each section: no Web Audio, microphone blocked, missing, busy or unplugged. The microphone feeds only the analyser, never the speakers. One section sounds at a time. Drawing runs only while sound is live; sections 2 and 3 redraw on change.

Checked: ci-check (lint, tests); the built page driven in muted headless Chrome through every source, preset and interval, with no console errors.

Work package: https://openproject.home.romaine.life/wp/ROMAINE-56 Adds a page at romaine.life/hearing: three interactive sections, with sound, on how one wave of air becomes notes. It came out of a conversation about the difference between melody and harmony (JM-1). **Added** - `hearing/`: plain JS + Vite + canvas 2D, built by a new Dockerfile stage into `frontend/hearing`. 1. The ear splits sound by frequency: a plucked string (Karplus-Strong), simple waveforms or the microphone, drawn as the one waveform that reaches the ear and as the response along an unrolled cochlea (Greenwood's map, Patterson's rounded-exponential filters one critical band wide), with the heard pitch's harmonics marked. 2. Pitch is computed: ten harmonics switched on and off; with the fundamental removed, or only 4, 5 and 6 on, the YIN pitch finder still reads the fundamental, and the wave's repeats are marked. 3. Two notes: both notes' overtones on one axis, rubbing pairs red and matching pairs green, and the Sethares/Plomp-Levelt roughness curve across an octave, with and without overtones. - `hearing/src/dsp.js` holds the math with no browser APIs. `npm test` (Node's test runner, 13 tests: missing fundamental, residue pitch, pluck tuning on all six open strings, roughness dips at the fifth and octave only with overtones) and `npm run lint` (ESLint) run in the web-app suite's check-test job, which picks up every package with a test script. - The image self-test checks `/hearing/`; the landing page lists it; README describes it. **Left alone:** the other pages, the server's routing (static files already serve `/hearing/`). Failure states are shown in each section: no Web Audio, microphone blocked, missing, busy or unplugged. The microphone feeds only the analyser, never the speakers. One section sounds at a time. Drawing runs only while sound is live; sections 2 and 3 redraw on change. Checked: `ci-check` (lint, tests); the built page driven in muted headless Chrome through every source, preset and interval, with no console errors.
Hearing page: how a tone becomes something heard, at /hearing (ROMAINE-56)
Some checks failed
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite web-app / scope (push) Has been skipped
Suite web-app / check-test (push) Has been skipped
Suite web-app / check-image (push) Has been skipped
Suite web-app / publish (push) Has been skipped
Suite web-app / publish-static (push) Has been skipped
Suite web-app / reused-checks (push) Has been skipped
Suite default / scope (pull_request) Successful in 4s
Suite cluster-service / scope (pull_request) Successful in 4s
Suite web-app / scope (pull_request) Successful in 5s
Suite default / check-rules (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / check-image (pull_request) Has been skipped
Suite web-app / publish (pull_request) Has been skipped
Suite web-app / publish-static (pull_request) Has been skipped
Suite cluster-service / reused-checks (pull_request) Successful in 4s
Suite default / check-fetches (pull_request) Successful in 4s
Suite web-app / check-test (pull_request) Failing after 9s
merge-queue CI failed: Suite web-app / check-test (pull_request)
Suite default / reused-checks (pull_request) Successful in 4s
Suite web-app / check-image (pull_request) Successful in 16s
Suite web-app / reused-checks (pull_request) Successful in 4s
44cc90e2ba
First-time contributor

merge-queue stopped this at 44cc90e: CI failed: Suite web-app / check-test (pull_request). Push a fix, or once it is fixed outside this pull request, remove and re-add the queue label.

merge-queue stopped this at 44cc90e: CI failed: Suite web-app / check-test (pull_request). Push a fix, or once it is fixed outside this pull request, remove and re-add the `queue` label.
Hearing page: lint script and ESLint config, which the web-app suite runs for every tested package
All checks were successful
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite web-app / publish-static (push) Has been skipped
Suite web-app / scope (push) Has been skipped
Suite web-app / check-test (push) Has been skipped
Suite web-app / check-image (push) Has been skipped
Suite web-app / publish (push) Has been skipped
Suite web-app / reused-checks (push) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 4s
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / check-image (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite web-app / scope (pull_request) Successful in 4s
Suite default / scope (pull_request) Successful in 4s
Suite web-app / publish (pull_request) Has been skipped
Suite web-app / publish-static (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite cluster-service / reused-checks (pull_request) Successful in 4s
Suite default / check-fetches (pull_request) Successful in 4s
Suite web-app / check-test (pull_request) Successful in 10s
Suite default / reused-checks (pull_request) Successful in 4s
Suite web-app / check-image (pull_request) Successful in 16s
Suite web-app / reused-checks (pull_request) Successful in 3s
merge-queue landed on main
75d38a8f21
merge-queue deleted branch hearing-page 2026-11-19 13:22:45 -08:00
Sign in to join this conversation.
No description provided.