Skip to content

feat(editor): feel-vs-tempo marker — half/double-time is a FEEL (P2-8) - #278

Merged
byrongamatos merged 1 commit into
mainfrom
feat/editor-feel-marker
Jul 15, 2026
Merged

feat(editor): feel-vs-tempo marker — half/double-time is a FEEL (P2-8)#278
byrongamatos merged 1 commit into
mainfrom
feat/editor-feel-marker

Conversation

@ChrisBeWithYou

@ChrisBeWithYou ChrisBeWithYou commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

⚠ STACKED on #277 (P2-6), which stacks on #276 (P2-5) — base is feat/editor-grouping-aware. Merge order: #276#277 → this; after each squash, rebase --onto, retarget, ancestry check (the #230 ritual).

What

P2-8 — half/double-time is a FEEL, never a fake tempo change. The convergence every instrument seat named as a requirement: a half-time chorus is a pulse-tier change over a constant tempo, and reading it as an octave tempo jump was a top mapping failure mode.

  • feel marker (ratio ∈ {½, 1, 2}, applies from its bar until the next feel mark — the time_signatures rule). Right-click a barline: Half-time feel / Double-time feel / Straight time from here. No beat ever moves — it's a TempoMarkCmd metadata edit with exact undo.
  • The metronome accents the felt pulse — under half-time, the strong click lands every other beat (what a drummer actually references).
  • Map Health expects onsets on felt beats only — a genuinely sparser half-time section reads green coverage of its felt pulse instead of "missing onsets" grey.
  • Scan's 2:1 detection now defaults to the feel marker: the confirm bar's primary (teal) button is Half-time feel — grid, audio, and notes all stay put — and the feat(editor): Scan offers the octave rescue — one click when the grid reads double/half the real tempo #269 grid octave-rescue becomes the explicit override, relabeled "Actually ½/2× tempo".
  • Green feel chips in the marker lane; feel joins the backend persistence vocabulary (closed-ratio validation, same absent/empty/garbage contract as feat(editor): authored marks I — hold/fermata bars, meter groupings, provenance (P2-5) #276).

DAW divergence (documented)

DAWs have no "feel" concept — a half-time section is either a real tempo change or nothing. Modeling feel as a first-class marker distinct from tempo is a practice-tool choice: the grid stays steady for scoring/detection while the intended pulse is recorded and taught.

Testing

tests/feel_marker.test.mjs (6 cases, fails on main): the closed ratio vocabulary, timeline stepping, no-beat-moves + exact round-trip (array identity pinned), felt click accents vs straight, Map Health grey→green on a half-time fixture, and the Scan default (feel mark placed, grid byte-identical, one undo restores). Backend feel round-trip added to test_tempo_marks.py. Full suites green: 161 files / 0 fail, pytest 262, lint at baseline.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q

Summary by CodeRabbit

  • New Features

    • Added half-time, double-time, and straight-time feel markers to the Tempo Map.
    • Right-click barlines to set or clear a feel without changing the grid or tempo.
    • Metronome accents and Map Health now reflect the selected feel.
    • Scan confirmations use feel markers by default, with a grid-rescue option for true tempo corrections.
    • Added clearer labels and visual markers for feel and octave corrections.
  • Bug Fixes

    • Feel markers now persist correctly and support undo/redo.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d9a5c533-35d8-4c75-a99e-ed99ddc832a6

📥 Commits

Reviewing files that changed from the base of the PR and between a642625 and 6e1e489.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • routes.py
  • screen.html
  • src/audio.js
  • src/main.js
  • src/map-health.js
  • src/ruler.js
  • src/tempo-marks.js
  • src/tempo-zones.js
  • src/tempo.js
  • tests/feel_marker.test.mjs
  • tests/test_tempo_marks.py

📝 Walkthrough

Walkthrough

Adds a new FEEL tempo-mark type for half-time, straight, and double-time interpretation without changing the grid. FEEL marks are editable through Tempo Map and Scan controls, affect metronome accents and Map Health scoring, and render as authored ruler markers.

Changes

FEEL tempo-map workflow

Layer / File(s) Summary
FEEL mark model and persistence
routes.py, src/tempo-marks.js, tests/feel_marker.test.mjs, tests/test_tempo_marks.py
Defines valid FEEL ratios, sanitizes and persists marks, derives carried-forward feel ranges, and supports undoable toggle/upsert editing.
Tempo Map and Scan controls
src/tempo.js, src/tempo-zones.js, src/main.js, screen.html, tests/feel_marker.test.mjs, CHANGELOG.md
Adds FEEL context-menu actions, Scan correction wiring, Tempo Zone controls, derived FEEL marker chips, and changelog coverage.
Felt playback and Map Health
src/audio.js, src/map-health.js, src/ruler.js, tests/feel_marker.test.mjs
Uses live FEEL ranges for half-time metronome accents and skips non-felt beats during Map Health coverage and drift scoring.
FEEL marker presentation and integration
src/ruler.js, tests/feel_marker.test.mjs
Applies dedicated FEEL chip styling and validates Scan resolution, runtime behavior, and test-run failure reporting.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Editor
  participant TempoMarks
  participant Metronome
  participant MapHealth
  Editor->>TempoMarks: set or toggle FEEL mark
  TempoMarks->>Metronome: expose live feel ranges
  TempoMarks->>MapHealth: expose live feel ranges
  Metronome->>Editor: generate felt accent clicks
  MapHealth->>Editor: classify feel-aware coverage
Loading

Possibly related PRs

Suggested reviewers: byrongamatos

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/editor-feel-marker

Comment @coderabbitai help to get the list of available commands.

@byrongamatos
byrongamatos changed the base branch from feat/editor-grouping-aware to main July 15, 2026 20:28
The cross-pedagogy convergence all four instrument seats named: a
half-time chorus / double-time bridge is a pulse-tier change over a
CONSTANT tempo, never a 2x tempo change.

- tempo-marks.js: 'feel' kind (ratio in the closed {0.5, 1, 2}
  vocabulary; applies from its measure until the next feel mark, the
  time_signatures rule), _feelRangesPure/_feelAtPure timeline pures,
  editorSetFeelFromBar verb (toggle semantics; TempoMarkCmd — no beat
  ever moves).
- Metronome: half-time accents every OTHER beat (the pulse a drummer
  references); plain-data feelRanges param keeps the sliced env clean.
- Map Health: under half-time feel only FELT beats are expected — a
  genuinely sparser section reads green coverage of its felt pulse,
  not 'missing onsets' grey.
- Scan's 2:1 resolution: the confirm bar's DEFAULT is now the feel
  marker (teal 'Half-time feel' button, grid untouched); the #269 grid
  octave-rescue becomes the explicit override ('Actually 2x tempo').
- Chips: green feel chips in the marker lane; context-menu feel trio
  with active-checkmarks.
- routes.py: 'feel' joins the persistence vocabulary (closed-ratio
  validation; same absent/empty/garbage contract).

tests/feel_marker.test.mjs (6 cases, fails on main): vocabulary
validation, timeline stepping, no-beat-moves + exact round-trip, felt
click accents, Map Health grey-to-green, and the Scan default (feel
mark placed, grid byte-identical). Backend feel round-trip in pytest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q
@byrongamatos
byrongamatos force-pushed the feat/editor-feel-marker branch from 19656c4 to 6e1e489 Compare July 15, 2026 20:32
@byrongamatos
byrongamatos merged commit 1783a47 into main Jul 15, 2026
3 of 4 checks passed
@byrongamatos
byrongamatos deleted the feat/editor-feel-marker branch July 15, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants