Commit Graph
61 Commits
Author SHA1 Message Date
Claude 078b9c4586 Make play-from marker draggable left and right in editor timeline
Previously clicking the header set the marker but you couldn't drag it.
Now click-and-drag in the header moves the marker freely in both
directions. Auto-scrolls when dragging near canvas edges so you can
drag the marker past the visible area back toward the beginning.

https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX
2026-04-02 17:07:56 +00:00
Claude ad09a41542 Add Start button and Home/End keys to editor for navigation
After auto-scroll during preview, users couldn't easily navigate back
to the beginning to reposition the play-from marker. Added:
- "⏮ Start" button that resets scroll and play-from marker to beginning
- Home key shortcut to do the same
- End key shortcut to jump to end of piece

https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX
2026-04-02 16:38:16 +00:00
Claude d8eaf4fd37 Fix pitch input being overwritten while user is typing
edUpdateNotePanel() resets pitchInput.value on every call, but it runs
on every edDraw() — including from requestAnimationFrame during preview,
mouse events, and a 30ms setTimeout(edResize) loop. This caused any
typed characters to be immediately overwritten.

Now skip overwriting INPUT/SELECT values when that element has focus,
so the user can freely type a new pitch like "A4" without it snapping
back to the old value.

https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX
2026-04-02 16:25:18 +00:00
Claude 8fca8cacd7 Fix game input handlers intercepting keystrokes in editor input fields
Two additional window-level keydown handlers were also capturing keys when
the pitch input (or any input/select/textarea) was focused:

1. The key remap handler (capture phase) was eating all keydown events
2. The game lane input handler was calling preventDefault() on keys like
   f, g, h, j, d, k, l, space — which are needed for typing pitch names

Both now skip when activeElement is an INPUT, TEXTAREA, or SELECT.

https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX
2026-04-02 16:20:04 +00:00
Claude 07b6b9a868 Fix pitch input: stop editor keydown handler from intercepting input fields
The edKeyDown handler was catching Backspace, Delete, arrow keys, and other
keys globally, even when the user was typing in the pitch input field. This
made it impossible to edit the pitch value (e.g. changing D4 to A4) because
Backspace would delete the selected note instead of editing the text.

Added a check to skip the handler when focus is on INPUT, TEXTAREA, or SELECT.

https://claude.ai/code/session_01TLvDyKzUQekd9hzFuEJ5YX
2026-04-02 16:10:58 +00:00
Claude 548476cb85 Add note properties panel and human-readable pitch/timing to editor
When a note is selected, a properties panel now appears with:
- Pitch input (type note names like C4, D#5, Bb3)
- Duration dropdown (whole, half, quarter, eighth, etc.)
- Lane selector dropdown

Code view now shows pitch names and duration names as comments
next to each note for easy reading. Export includes pitch/duration
names. Import and Apply Code accept note name strings in the f field.

https://claude.ai/code/session_018SvBLznyTuvoZAYCw9WwAA
2026-04-02 15:45:28 +00:00
Claude 4df86398f7 Fix editor: select vs add, pitch editing, reset preserving freq, code panel
Major interaction fix:
- Single click now SELECTS nearest note in same lane (not adds)
- Double-click on empty space adds a new note
- Hit detection has larger padding (+6px each side) for easier clicking
- Nearby-note search fallback: clicks within half-beat snap to closest note

Pitch editing:
- Shift+Up/Down = change pitch by one semitone
- Ctrl+Shift+Up/Down = change pitch by one octave
- Status bar shows current pitch (e.g. A4) and available shortcuts

Bug fixes:
- Reset now preserves frequency (f) field — pitch info no longer lost
- Code panel has max-height:45vh with overflow scroll, textarea resizable
- Canvas has min-height:200px so it never gets fully squished
- Help text updated to reflect new click=select, dbl-click=add behavior

https://claude.ai/code/session_01AqTWV8hPy2XcGP5KY2Q8zv
2026-04-02 15:16:04 +00:00
Claude cc7c940df1 Fix Drunken Sailor pitches, add pitch display, fix play-from-position, resizable code panel
- Restored original pitches (D4, F4, A4) for Drunken Sailor M1-2 and
  (C4, E4, G4) for M3-4 while keeping corrected q-ee-q-ee rhythm
- New "Pitch" toggle button shows note names (A4, C#5, etc.) below
  each note on the editor canvas using frequency-to-note-name lookup
- Code labels now also show pitch name when available
- Play-from-position redesigned: single click in header sets a yellow
  marker, double-click starts playback from that position. Preview
  button also starts from marker. Esc clears marker.
- Header area enlarged to 32px for easier clicking
- Code panel textarea now resizable (drag to expand/shrink), removed
  fixed max-height, canvas auto-resizes via ResizeObserver
- Status bar shows note value name (quarter, eighth, etc.) for selection

https://claude.ai/code/session_01AqTWV8hPy2XcGP5KY2Q8zv
2026-04-02 14:55:53 +00:00
Claude 34f65f4ead Add editor rhythm notation, time signatures, play-from-position, fix Drunken Sailor
Editor improvements:
- Musical notation symbols (♩♪𝅗𝅥𝅝) displayed on notes with duration
- Number keys 1-5 set note values (whole/half/quarter/eighth/sixteenth), 6-8 for dotted
- Time signature selector (4/4, 3/4, 6/8, 9/8, etc.) with measure-aware grid lines
- Double-click header to start playback from any position
- Singalong/non-Classical pieces no longer play background orchestra in editor preview
  (only Classical genre gets conductor mode with bg track)
- Status bar shows note value name when selected

Drunken Sailor fix:
- Corrected rhythm to quarter-eighth-eighth pattern per sheet music
- Melody notes now store duration and frequency for proper editor display

Singalong pieces now tagged with isSingalong flag and store duration on melody notes.

https://claude.ai/code/session_01AqTWV8hPy2XcGP5KY2Q8zv
2026-04-02 14:31:07 +00:00
Claude 4fdb38134f Rewrite Drunken Sailor melody to match actual sheet music
Replace the incorrect Drunken Sailor melody with an accurate
transcription from the traditional sheet music:
- Verse: repeating A4 eighth notes descending to D-F-A, then G4
  pattern with C-E-G, building to B-C-D
- Chorus: "Way hey and up she rises" with dotted rhythms
- 3 passes with building instrumentation (woodwind → strings → brass)
- Proper Am/G chord backing from pass 2 onward
- Correct rhythmic values (eighths, quarters, dotted quarters, halves)

https://claude.ai/code/session_015qMeX3wFA1dcCaFp9p4vai
2026-04-02 13:41:09 +00:00
Claude 0afa690736 Show note code labels directly on canvas when Code is toggled
- Clicking Code button now toggles on-canvas labels above each note
  showing {t, l, d} values so you can see the code right at the note
- Labels appear for ALL notes when Code mode is active (button turns blue)
- Selected note always shows its label regardless of Code mode
- Code panel still opens/closes alongside the labels for bulk editing
- Labels positioned above notes, flipping below if near lane top

https://claude.ai/code/session_015qMeX3wFA1dcCaFp9p4vai
2026-04-02 13:32:31 +00:00
Claude ef87125be0 Add preview playhead with note highlighting, fix editor layout
- Playhead: yellow vertical line tracks current position during preview
  with auto-scroll to keep it visible
- Note highlight: notes flash white with colored glow when the playhead
  passes over them, so you can see which note is playing
- Fix editor layout: canvas was squished because ED_LANE_H calculation
  didn't account for ED_HEAD header height, and screen overflow
  prevented flex stretching
- Pattern mode playhead cycles through 0-4 beat range correctly

https://claude.ai/code/session_015qMeX3wFA1dcCaFp9p4vai
2026-04-02 13:14:00 +00:00
Claude 657761c119 Add editor features: START marker, measure numbers, note duration, range select & copy/paste
- START marker: green dashed vertical line at t=0 matching the END marker style
- Measure numbers: numbered (M1, M2, ...) in a header row at top of editor
- Note duration: notes support a `d` (duration) property, rendered as variable-width bars
  with a draggable right edge to resize; D key to add/increase, Shift+D to remove
- Range select: Shift+drag on timeline to select a region (purple highlight)
- Copy/paste: Ctrl+C copies notes in selection (or single selected note),
  Ctrl+V pastes at end of piece or at selection boundary
- Ctrl+A selects all notes, Escape clears selection, Delete removes range
- All save/load/export/import/code-view paths preserve the duration property
- Updated help text and status bar to document new controls

https://claude.ai/code/session_015qMeX3wFA1dcCaFp9p4vai
2026-04-02 12:53:08 +00:00
Claude cffd91e71a Fix melody editor not rendering notes and add math gate to editor/hiding
- Fix edPxPerSec() → edPxPerUnit() crash in edDraw() that prevented
  canvas notes/lanes from rendering (only toolbar was visible)
- Add math gate prompt (simple addition) to openEditor(), hideSong(),
  and hideGenre() for parental control consistency
- Refactor confirmReset() to use shared mathGate() function

https://claude.ai/code/session_01GSG2ymeVdsTegpaKVhQVFF
2026-04-02 11:55:22 +00:00
Claude 6f3e4c8aa0 Fix editor canvas not rendering: layout and resize fixes
- Canvas uses flex:1 and align-self:stretch to fill remaining space
- edResize uses getBoundingClientRect for reliable width measurement
- Use double requestAnimationFrame instead of setTimeout for layout settling
- Minimum canvas height of 200px as fallback

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 17:05:11 +00:00
Claude bc3565e263 Add portable edit transfer: bake edits into HTML, download/load JSON
Three ways to move edits between machines:
- "Bake into HTML" downloads index.html with edits embedded in the file
- "Edits File" downloads all edits as a JSON file
- "Load Edits" imports edits from a JSON file into localStorage
Baked edits act as fallback — localStorage overrides them on the new machine.

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 16:56:53 +00:00
Claude 95d80ff19c Merge origin/main into feature branch
Resolves conflicts:
- Keep both Remap Keys button and Edit Melody button
- Keep conductor-style Bumblebee (our enhanced version)
- Keep localStorage melody edit check in buildClassicalNotes

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 16:51:38 +00:00
Claude f4b8d0bae8 Extend melody editor to all genres with code view and import
- Editor now works for regular rhythm patterns (rock, jazz, etc.) not just classical
- Added code view toggle showing JS array notation for notes/patterns
- Added import panel for pasting JSON note data or loading .json files
- Preview mode handles both classical (synth orchestra) and regular (drum sounds)
- buildNotes() now checks localStorage for user-saved pattern edits
- Fixed edPreview() to play drum patterns with proper bar looping

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 16:27:49 +00:00
Claude 6e2538412a Add visual melody editor for classical pieces
New editor screen lets users fix incorrect melodies without editing code:
- Canvas-based timeline with 5 lane rows (Red/Yellow/Blue/Green/Kick)
- Click to add notes, click existing notes to select, drag to move
- Delete/Backspace to remove selected note
- Arrow keys to nudge timing and lane
- Beat grid snapping (1/4 beat resolution)
- BPM adjustment
- Zoom slider for timeline scale
- Preview with orchestral background + melody clicks
- Save to localStorage (auto-loaded when playing the piece)
- Copy JSON to clipboard for sharing corrections
- Reset button to restore original melody
- Edit button appears in menu only for classical pieces

Edits are loaded in buildClassicalNotes() so saved corrections
are used during gameplay automatically.

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 16:18:09 +00:00
Claude 6baec25e6b Rewrite Flight of the Bumblebee in conductor-style
Replaced 5-line tp() call with full conductor-style arrangement:
- chromRun() helper plays fast chromatic scales in background,
  only every 4th note is hittable (conducting the accent peaks)
- 7 sections: intro → first chromatic runs → development →
  E minor modulation → fff recapitulation → climax → coda
- Three speed tiers (0.09s, 0.065s, 0.055s per note) for
  increasing intensity across sections
- Continuous Am harmonic bed with strings/bass
- Duration expanded from ~35s to ~88s

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-04-01 16:13:05 +00:00
Claude 75057926c1 Fix Away in a Manger, O Holy Night, Kumbaya, Nobody Knows rhythms
Away in a Manger: 3/4 waltz now has beat-1 emphasis with half-notes
on sustained syllables ("manger", "bed"), proper waltz feel instead
of uniform quarter notes.

O Holy Night: Encodes the characteristic 12/8 compound feel with
dotted-quarter+eighth pairs (3,1) matching the lilting "O ho-ly night"
rhythm and half-note phrase endings.

Kumbaya: Slow meditative spiritual now uses dotted-quarter+eighth
(3,1) for the 3-syllable "Kum-ba-ya" pattern with half-note on "Lord",
matching the gentle rocking feel of the original.

Nobody Knows the Trouble I've Seen: Gospel dotted phrasing with
longer held notes on key phrases, replacing uniform quarter notes.

https://claude.ai/code/session_016yrXXcwbdXGoSXkNX8UcP2
2026-03-31 13:39:36 +00:00
Claude 0229242ff8 Fix Danny Boy, Red River Valley, Parting Glass rhythms
Danny Boy (Londonderry Air): Replace all-quarter encoding with proper
flowing Irish dotted rhythm. Phrases now use dotted-quarter+eighth
pairs (3,1) for melodic motion, half notes (4) on stressed syllables
like "Boy", and dotted-half (6) or whole (8) for held phrase-end
notes like "-ing", "side", "bide". Total duration increases from
~43s/pass to ~50s/pass reflecting the song's true character.

Red River Valley: Slow American ballad now has dotted-quarter+eighth
motion with half-note phrase endings instead of uniform quarter notes.

The Parting Glass: Irish 4/4 ballad now uses proper dotted feel with
stressed syllables held as half/dotted-half notes.

https://claude.ai/code/session_016yrXXcwbdXGoSXkNX8UcP2
2026-03-31 13:34:24 +00:00
Claude 8da43e74e4 Add dotted rhythms to iconic songs for musical accuracy
- Silent Night: proper 6/8 feel with dotted-quarter + eighth (3,1,2) pattern
- Deck the Halls: dotted pickup on "Deck the halls" and "Fa la la" phrases
- Amazing Grace: dotted quarter-eighth pairs in "A-MAZ-ing Grace" phrasing
- Auld Lang Syne: characteristic dotted Scots snap rhythm (3,1 pattern)

https://claude.ai/code/session_01MhCcEPfX3JqAk8zmvLXZ1g
2026-03-31 11:55:06 +00:00
Claude 826b81c007 Fix rhythm timing across all synth genre pieces
- Changed all 7 helper functions (folk, carol, pub, spirit, world, rhyme, rag)
  from hardcoded q values to BPM-based timing (q=30/bpm), making duration
  units represent eighth notes at the given BPM
- Scaled all ~93 duration arrays to work correctly with new timing system
- Fixed specific rhythm patterns for well-known songs:
  - Happy Birthday: correct 3/4 pickup rhythm (1,1,2,2,2,4 pattern)
  - Greensleeves/What Child Is This: proper 3/4 dotted rhythm (3,1,2 pattern)
  - Joy to the World: correct descending scale rhythm with dotted values
  - Home on the Range: proper waltz-style quarter/half note rhythm
  - She'll Be Coming Round the Mountain: correct 2/4 march rhythm
  - Jingle Bells: corrected verse/chorus rhythm
- Fixed Video Game pieces: Turkish March q=0.18→0.227, Can-Can q=0.16→0.197
  to match their listed BPM tempos
- Fixed duplicate Happy Birthday definition in "Classics from Prime" section

https://claude.ai/code/session_01MhCcEPfX3JqAk8zmvLXZ1g
2026-03-31 11:52:32 +00:00
Claude 2c67ca3b7c Fix wrong melodies across multiple synth genres
Classical:
- Hall of the Mountain King: transpose from A minor to correct B minor key
- Toccata & Fugue: extend from 39s to 74s with full toccata continuation
- Swan Lake: transpose to B minor, fix melody contour to use repeating ascending motif
- Hungarian Dance No. 5: rewrite themes in D minor with correct melody
- Dance of the Sugar Plum Fairy: replace Für Elise melody with actual Nutcracker celesta theme

Christmas:
- God Rest Ye Merry Gentlemen: fix F natural→F#(Gb4) and Bb→B for correct E minor key
- Angels We Have Heard on High: rewrite to correct F major melody with Gloria melisma

Singalong:
- Amazing Grace: fix G5 (too high) to E5, correct melody peak
- My Bonnie Lies Over the Ocean: fix G5 (too high) to E5, correct chorus range

https://claude.ai/code/session_01MhCcEPfX3JqAk8zmvLXZ1g
2026-03-31 11:22:41 +00:00
Claude fd14076173 Fix missing 'baa' variable in NURSERY_PIECES causing all genres to disappear
The NURSERY_PIECES IIFE referenced 'baa' (Baa Baa Black Sheep) in its return
array but the variable was never defined — it was lost during the Prime genre
merge. This ReferenceError crashed the script on load, preventing all genre
tabs and rhythm lists from rendering.

https://claude.ai/code/session_01MhCcEPfX3JqAk8zmvLXZ1g
2026-03-31 04:22:40 +00:00
Outis 50a9a6fd99 Merge branch 'main' into claude/fix-classical-pieces-abgA3 2026-03-31 00:16:32 -04:00
Claude 5b01002707 Remove Prime genre (merged into Nursery Rhymes), add missing genre icons
- Remove "Prime":PRIME_PIECES from SYNTH_GENRES (fixes ReferenceError crash)
- Add Nursery Rhymes 🧒 and Ragtime 🎹 icons to synthIcons map

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 04:12:28 +00:00
Outis 26433eda1a Merge pull request #20 from outis1one/claude/fix-classical-pieces-abgA3
Add gamepad auto-detection, keyboard remapping, and smart lane enabling
2026-03-31 00:01:30 -04:00
Claude af7b27dd41 Add gamepad auto-detection, keyboard remapping, and smart lane enabling
Gamepad auto-detection:
- First gamepad connect counts buttons and auto-enables matching lanes
- 5 buttons = standard Rock Band kit (lanes 0-4, default)
- 6+ buttons = auto-enables extra lanes (crash, ride, tom3)
- Shows button count in gamepad status: "🎮 Controller (9 buttons)"
- User can still manually toggle lanes on/off (overrides auto)
- Only runs once per session (doesn't re-detect on reconnect)

Keyboard remapping:
- New "⌨ Remap Keys" button in the sticky start bar
- Full-screen overlay walks through each lane: "Press key for RED"
- 300ms cooldown between steps to prevent double-triggers
- Escape cancels the remap flow
- Saved to localStorage ("drgameKeyMap") and restored on page load
- Reset All Data also resets keyboard mappings to defaults

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 04:00:12 +00:00
Outis 9d913a8587 Merge pull request #18 from outis1one/claude/fix-classical-pieces-abgA3
Add 8-lane support, kick notes now fall from top of screen
2026-03-30 23:51:55 -04:00
Claude 266444104c Add 8-lane support, kick notes now fall from top of screen
Lane system expanded to 8:
- Original 5: Red (F), Yellow (G), Blue (H), Green (J), Kick (Space)
- New 3: Crash (D), Ride (K), Tom 3 (L) — off by default
- New drum sounds: crash (long noise burst), ride (metallic ping),
  tom3 (deep 90Hz tom)

Kick lane visual overhaul:
- Kick notes now fall from the TOP of the screen at full speed,
  traveling through the pad lanes down to the kick hit zone
- Kick zone still centered at bottom with its own hit line
- Previously kick notes only appeared in the short bottom zone

Other changes:
- Remap system dynamically reads LANES array (supports any count)
- Gamepad default mapping extended for buttons 5-7
- laneFlash expanded to 8 lanes
- All existing songs/rhythms (lanes 0-4) work unchanged
- New lanes 5-7 are off by default, toggle on in Active Pads

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 03:50:16 +00:00
Claude 2aebd38cc2 Merge Prime genre into Nursery Rhymes (15 songs combined)
Moved 6 Prime songs (Twinkle Twinkle, Mary Had a Little Lamb, Happy
Birthday, Chopsticks, Lavender's Blue, Shortnin' Bread) into the
Nursery Rhymes genre using the rhyme() helper. Dropped Baa Baa Black
Sheep since it's the same melody as Twinkle Twinkle. Updated README
to reflect 18 genres, 124 synth pieces.

https://claude.ai/code/session_01FNZw4curZbJp38HFUaPXwR
2026-03-31 03:48:34 +00:00
Claude 1aab788c24 Add Nursery Rhymes & Ragtime genres, add Simple/Full note density toggle
New genres:
- Nursery Rhymes (10 songs): Baa Baa Black Sheep, London Bridge,
  Old MacDonald, Row Row Row Your Boat, Three Blind Mice,
  Itsy Bitsy Spider, Pop Goes the Weasel, Hot Cross Buns,
  Jack and Jill, Humpty Dumpty — all at slow tempos (65-85 BPM)
- Ragtime (8 songs): The Entertainer, Maple Leaf Rag,
  The Easy Winners, Elite Syncopations, Solace, Peacherine Rag,
  The Cascades, Pineapple Rag — all Scott Joplin (public domain)

Simple/Full mode:
- Toggle in Active Pads card switches between Full and Simple density
- Simple mode enforces 350ms minimum gap between notes, removing
  rapid passages while keeping the melody recognizable
- Works on both synth genres (classical/folk/etc) and rhythm patterns
- Lightweight: just a filter on the note array, no piece data changes

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 03:38:01 +00:00
Claude 9513a28309 Make Prime easier and expand Christmas to 20 carols
Prime genre changes:
- Reduced tempos: Twinkle 100→75, Mary 110→80, Birthday 100→75,
  Chopsticks 140→95, Lavender 110→80, Shortnin' 130→95
- Reduced passes from 3-4 to 3 across the board
- Added longer held notes in durations for more breathing room
- Simplified Chopsticks from 48 to 36 notes
- Trimmed Twinkle/Mary/Lavender note counts

Christmas genre expansion (10→20 carols):
- O Come All Ye Faithful, God Rest Ye Merry Gentlemen,
  What Child Is This, Angels We Have Heard on High,
  O Holy Night, Rudolph the Red-Nosed Reindeer,
  Frosty the Snowman, Winter Wonderland,
  Good King Wenceslas, We Three Kings

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 03:27:44 +00:00
Claude c5ac0971d1 Fix 6 melodies across Christmas, Folk, Spirituals, and World genres
- O Christmas Tree: fixed Eb4→Eb5 (wrong octave in running passage)
- Danny Boy: complete rewrite with soaring Londonderry Air melody up to E5
- Swing Low Sweet Chariot: fixed "Swing low" to descend (was ascending)
- Michael Row the Boat Ashore: fixed ascending C-E-F-G-A for "row the boat"
- Hava Nagila: replaced G naturals with Ab/G# for correct Freygish scale
- O Sole Mio: rewrite with characteristic soaring Bb refrain

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 03:22:14 +00:00
Claude 3bded9ad53 Fix 4 Singalong melodies for musical accuracy
- Amazing Grace: corrected to proper C major pentatonic melody (G-C-E-C-E-D)
- Auld Lang Syne: fixed second half to D5-D5-C5-A4, proper F major melody
- Scarborough Fair: changed Bb4 to B4 (D Dorian mode has B natural)
- My Bonnie: complete rewrite with characteristic leaping melody and chorus

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 03:13:11 +00:00
Claude b9f46feba9 Fix wrong notes in 7 classical pieces verified against actual scores
Hall of the Mountain King: Fix theme 2nd phrase to D-B-D-Db-A-Db
  (was using Eb where Db/C# belongs, wrong phrase structure)

Für Elise: Fix answer phrase G# note - C5 → Ab4 (G#4)
  (E-G#-B-A arpeggio, not E-C-B-A)

Toccata & Fugue in D Minor: Fix opening mordent A-G-A (whole step)
  (was A-Ab-A half step, standard editions use whole step)

Morning Mood: Complete melody rewrite to correct E major key
  (was in wrong key; real Grieg melody is G#-A-B-C#-B-A ascending)

Dance of the Sugar Plum Fairy: Fix celesta theme to E-D#-E-B-D-C-A
  (was repeating E-D#-E-B twice; real piece descends after trill)
  Fix answer phrase G4 → Ab4 (G#4)

The Blue Danube: Rewrite melody to match real waltz
  (ascending thirds C-E-G, G-B-D with oom-pah-pah bass pattern)

Canon in D: Fix violin melody to F#-E-D-C#-B-A-B-C# (var 1)
  then D-C#-B-A-G-F#-G-A (var 2) matching Pachelbel's actual score

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 02:53:23 +00:00
Claude 4e93a628e2 Rewrite 10 classical pieces from template to conductor-style
Replace generic tp() template implementations with musically accurate,
section-by-section conductor-style arrangements for:
- William Tell Overture (Gallop): trumpet fanfare + galloping theme
- Bolero: snare drum rhythm + crescendo through 7 instrument statements
- Barber of Seville Overture: pizzicato opening + Rossini crescendo
- Sabre Dance: frantic D-D-D-Eb ostinato + contrasting lyrical middle
- Sorcerer's Apprentice: creeping bassoon theme + magical march buildup
- Morning Mood: gentle flute sunrise melody building to full orchestra
- Flight of the Bumblebee: rapid chromatic scales up and down
- Habanera (Carmen): descending chromatic melody + habanera bass rhythm
- Spring (Four Seasons): joyful ritornello + birdsong trills
- Ode to Joy: theme builds from solo cello to full orchestra + choir

Each piece now has proper harmonic beds, section-by-section structure,
instrument layering that builds over time, and accurate melody notes.

https://claude.ai/code/session_016nhMjrAqwWXKKgBm6EQuX1
2026-03-31 02:30:30 +00:00
Claude 8c50398f20 Rewrite Ride of the Valkyries in conductor-style
Replaced 5-line tp() call with full conductor-style arrangement:
- Continuous Bb major harmonic bed across 8 sections
- tutti() helper for full orchestral hits
- gallop() helper for the iconic 9/8 compound rhythm
- 8 sections: intro tremolo → first horn call (p) → second statement (f)
  → Eb major development → fff recapitulation → climax → power chords → coda
- Famous ascending Bb-D-F arpeggio as hittable melody
- Running string arpeggios as background texture
- Duration expanded from ~35s to ~88s

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-03-31 01:28:33 +00:00
Claude 5dcd16c270 Rewrite O Fortuna in conductor-style matching Beethoven's 5th approach
Following the uploaded lead sheet, rewrote O Fortuna with:
- Continuous harmonic bed (sustained string chords throughout)
- tutti() and choir4() helpers for full orchestral/SATB choir hits
- Running string arpeggios as background texture (not hittable)
- 9 sections following the score structure with tempo changes
  (ff opening → pp verses → mp building → f marcato → ff climax → fff finale)
- Duration expanded from ~35s to ~95s
- Only main choral melody accents are hittable (conductor experience)

https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY
2026-03-31 01:14:09 +00:00
Claude 53a25caf7a Add Prime genre with 6 beginner songs from lead sheets
New "Prime" genre appears first in the genre tabs, designed for
beginners with easy, well-known melodies. All songs verified from
music-for-music-teachers.com lead sheet images and transposed to
C major for consistency.

Songs added:
- Twinkle Twinkle Little Star (from lead sheet in A major)
- Mary Had a Little Lamb (from lead sheet in C major)
- Happy Birthday (from lead sheet in D major)
- Chopsticks (from lead sheet in C major, alternating dyad notes)
- Lavender's Blue (from lead sheet in D major)
- Shortnin' Bread (from lead sheet in A major, chorus melody)

https://claude.ai/code/session_01ELEFwNKTnZvM39VK9wsYd4
2026-03-30 20:58:23 +00:00
Claude 24e9f0ec3a Fix melody note sequences for 6 songs verified against lead sheets
Songs corrected:
- Amazing Grace: fixed C5→E5 errors in multiple positions, fixed missing
  G5 repeat, corrected phrase structure (was 31 notes, now correct 28)
- Greensleeves: fixed G3→Ab3 (G#3) at position 17 in the descending
  phrase (B3,G#3 pattern should match the B3,G#3 at position 14-15)
- Deck the Halls: fixed B4→Bb4 at position 1 (key is F major, all B's
  should be Bb except accidentals)
- When the Saints Go Marching In: removed duplicate F4 at index 25
  (standard has F4 whole note then E4, not F4-F4-E4)
- Auld Lang Syne: removed extra G4 at position 9 that shifted all
  subsequent notes, fixed garbled second half of verse
- Scarborough Fair: rewrote melody to correct register (standard melody
  reaches D5/E5, game was stuck below C5), now matches lead sheet

Verified correct (no changes needed): Jingle Bells, Silent Night, Oh! Susanna

Songs not in the PDF (need different reference): Red River Valley,
Home on the Range, Yankee Doodle, Turkey in the Straw, Danny Boy,
Bella Ciao, Clementine, Molly Malone, Whiskey in the Jar, First Noel,
Hark the Herald, 12 Days of Christmas, Wellerman, Drunken Sailor,
Skye Boat Song, Away in a Manger, Joy to the World

Reference: music-for-music-teachers.com lead sheet images

https://claude.ai/code/session_01ELEFwNKTnZvM39VK9wsYd4
2026-03-30 20:28:44 +00:00
Claude 3a30ebe642 Fix Camptown Races melody from lead sheet image
Old version had the Doo-dah phrase completely wrong (D E F E D C)
and a truncated chorus. Now matches the D-major lead sheet:

Verse: G G E G A G E C | D D (Doo-dah!) | E E F E D C | C(held)
Chorus: C E G G | G E G A G E C | G A B A G E | D D C(held)

Reduced passes 5→3 since the theme is now a full verse+chorus.

https://claude.ai/code/session_01DXp3FLfbb8jFHvCJ29uWk1
2026-03-30 19:10:06 +00:00
Claude cdb8322dd0 Remove tempo slider from game screen
Tempo can't affect pre-scheduled audio mid-song; keep it in the
Settings card on the menu only. Volume slider remains in the game
controls bar as it affects live pad hits.

https://claude.ai/code/session_01DXp3FLfbb8jFHvCJ29uWk1
2026-03-30 18:31:45 +00:00
Claude a92e1eb99a Fix early game-end, add double-click to start, bigger HUD sliders
- endTurn now fires from draw loop once all notes are hit/missed and
  past gameEndTime, instead of a tight fixed timeout; fallback setTimeout
  extended to 5s so the music always finishes before scoring
- Double-click any rhythm button to immediately start the game with
  current settings (delegated to rgrid to survive the onclick rebuild)
- Replace tiny 50px HUD sliders with a dedicated game-controls bar
  below the HUD: wider sliders (140px), labelled Tempo / Volume with
  live % readouts; syncSliders keeps both the menu and HUD in sync

https://claude.ai/code/session_01DXp3FLfbb8jFHvCJ29uWk1
2026-03-30 18:28:31 +00:00
Claude fb448270e7 Beethoven's 5th: full continuous orchestra, 88s to natural break
Complete rewrite with new architecture:
- CONTINUOUS HARMONIC BED: sustained string/woodwind/bass chords
  playing throughout all 88 seconds, changing with the harmony
  progression (Cm→Ab→Gm→Cm→G→Cm). Not hittable — just ambiance.
- Running 8th-note string passages between melody sections
  (background texture filling the spaces)
- 877 background nodes (was 565) creating a full orchestral sound
- 102 hittable melody notes (was 113) — only the STRONG accents
  (motif hits, chord downbeats, scalar peaks)
- Duration extended from 54s to 88s (~1:27) ending at the natural
  break where the exposition concludes before development

The player is now one voice IN the orchestra, hitting the famous
da-da-da-DUM moments while the full ensemble plays around them.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 16:46:08 +00:00
Claude 43e8e74f61 Fuller Beethoven's 5th orchestra: harmony voices, woodwinds, horns
Replaced thin orch() helper (strings + brass + bass) with tutti()
that creates 5 simultaneous voices per note:
- 1st violins (melody), trumpets (doubling), 2nd violins (5th
  below), clarinets (3rd below), cellos/basses (octave below)

Added between sections:
- Horn pad (sustained Eb+G brass) on held notes
- Woodwind countermelody (clarinets in 3rds) on soft restatement
- Viola parallel motion on scalar passages
- Bass walking on downbeats during runs
- Full 3-note chord voicings on power chord section (was 2-note)
- Choir with harmony voices (Eb+G+C) on recapitulation
- Brass + strings + choir triple-layered on final chord

Background nodes: 438 → 565 (29% more orchestral depth)
Same 113 hittable melody notes, same 54s duration.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 16:14:19 +00:00
Claude 0baa5b1b79 Fix gamepad remap skipping pads, add HUD sliders, rewrite Wellerman
Remap fix:
- Bug: Wii drums fire multiple button indices on a single pad hit
  (e.g., hitting Red triggers buttons 0 AND 2 in same poll frame).
  The forEach loop called handleRemapButton for EACH, advancing
  past Yellow and Green in one hit.
- Fix: Only process first new button per poll frame during remap
  (remapHandled flag). Added 300ms cooldown between steps to
  prevent button bounce from advancing two steps.

HUD sliders:
- Speed and volume sliders now in the game HUD bar during gameplay
- Synced with menu sliders via shared syncSliders() function

Wellerman rewrite:
- Complete rewrite as custom IIFE instead of generic pub() helper
- Accurate verse melody: E-E-E-E-A-A-G-E (Am) matching the actual
  Nathan Evans/traditional version
- Proper chorus: A-C-C-C-D-E ("Soon may the Wellerman come")
- Driving stomp beat on every downbeat (timpani)
- 3 building rounds: woodwind → strings → brass+choir
- Chord backing and choir layer added in later rounds

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 16:05:22 +00:00
Claude 1bebfc91c8 Add per-song hiding with right-click
Right-click any song in the rhythm grid to hide it. Hidden songs
are stored per-genre in localStorage (drgameHiddenSongs). A
"Show N hidden" button appears in the grid to restore them.

Same pattern as genre hiding:
- Right-click to hide
- Persists across page reloads
- Cleared by Reset All Data (with math question)

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:53:13 +00:00