Commit Graph
18 Commits
Author SHA1 Message Date
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
Claude e048312a8d Add Spirituals, World genres, genre hiding, math reset confirmation
Spirituals (8 songs, traditional African American):
- Swing Low Sweet Chariot, Go Down Moses, Wade in the Water,
  Kumbaya, Michael Row the Boat Ashore, He's Got the Whole World,
  Nobody Knows the Trouble I've Seen, Battle Hymn of the Republic
Uses choir synth for authentic spiritual sound.

World (8 songs from various cultures):
- Hava Nagila (Jewish/Israeli, 1918)
- La Cucaracha (Mexican Traditional)
- Frère Jacques (French, 1780s)
- Cielito Lindo (Mexican, 1882)
- Waltzing Matilda (Australian, 1895)
- 'O Sole Mio (Italian, 1898)
- Take Me Out to the Ball Game (American, 1908)
- She'll Be Coming Round the Mountain (American, 1890s)

Genre hiding:
- Right-click any genre tab to hide it
- Hidden genres stored in localStorage
- "Show All (N hidden)" button appears to restore
- Hidden genre list cleared on Reset All Data

Math confirmation for Reset All Data:
- Random addition problem (e.g., "What is 17 + 9?")
- Must answer correctly to proceed with data wipe
- Prevents accidental taps from destroying scores

Total: 16 genres, 91 synth pieces, 68 min of content

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:50:24 +00:00
Claude b4a28fac82 Add 9 shanties/folk songs, remove note thinning, add settings persistence
New Singalong songs (20 total now):
- Leave Her Johnny, Blow the Man Down, Randy Dandy Oh,
  South Australia, Roll the Old Chariot Along, Haul Away Joe
  (sea shanties from TikTok 2021 trend, all traditional PD)
- Spanish Ladies (Royal Navy, 1790s — also in Jaws)
- The Skye Boat Song (Scottish, 1884 — Outlander theme)
- Bella Ciao (Italian partisan folk — Money Heist viral)

Removed note thinning (MIN_GAP filter):
- Speed slider at 50% now handles difficulty for fast passages
- All original notes restored (Flight of Bumblebee back to 206)

Settings persistence:
- Speed and volume saved to localStorage, restored on page load
- Reset button returns both to 100%
- Reset All Data button clears scores, settings, and gamepad
  mapping with confirmation prompt

localStorage keys used:
- drgame5: leaderboard scores
- drgameSettings: speed + volume
- drgameGpMap: gamepad button mapping

Total: 75 synth pieces, 195 playable pieces

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:44:35 +00:00
Claude 8804ada821 Add Wellerman (NZ sea shanty, 1860s) to Singalong genre
The TikTok viral sea shanty — traditional folk song, public domain.
63 seconds, 193 melody notes. Includes both verse ("There once was
a ship that put to sea") and chorus ("Soon may the Wellerman come")
sections across 4 building passes.

Singalong genre now has 11 songs.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:36:32 +00:00
Claude e144512450 Add pause, remap, speed/volume, reorder genres, full README
UI improvements:
- Start button now sticky at bottom of viewport — always visible
  without scrolling, with Remap Pads button alongside
- Pause/Resume: press Escape or pause button in HUD. Suspends
  AudioContext to freeze all scheduled audio perfectly.
- Back to Menu button on pause overlay

Gamepad remap:
- Remap Pads button walks through each pad (Red, Yellow, Blue,
  Green, Kick) and captures the button press from any USB drum kit
- Mapping saved to localStorage, survives page reload
- Default mapping still Wii Rock Band

Speed & Volume sliders:
- Speed: 50%-150%, affects BPM for drum patterns and note/bg
  timing for classical pieces. Slow down for practice.
- Volume: 0%-150% master volume, affects both drums and synth
- Both on menu Settings card

Genre tab reorder:
- Synth genres now appear first: Singalong, Christmas, Folk,
  Classical, Video Games, Chiptune Originals
- Drum pattern genres after: Rock, Metal, Jazz, etc.
- Default genre changed from Rock to Singalong

README: Complete song list for all 65 synth pieces + 120 drum
patterns, USB drum kit compatibility table, feature list.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:32:17 +00:00
Claude e85e17a499 Add Christmas and Singalong genres (65 synth pieces, 48 min total)
Christmas (10 carols, all public domain):
- Jingle Bells (1857), Silent Night (1818), Deck the Halls (1862)
- We Wish You a Merry Christmas (1500s), O Christmas Tree (1824)
- The First Noel (1823), Joy to the World (1719)
- Away in a Manger (1885), 12 Days of Christmas (1780)
- Hark the Herald Angels Sing (1840)
Uses choir synth for festive choral sound on later passes.

Singalong (10 campfire/pub/shanty songs, all public domain):
- Drunken Sailor (sea shanty), Molly Malone (Irish, 1880s)
- Whiskey in the Jar (Irish trad.), The Parting Glass (Irish/Scots)
- Amazing Grace (1779), Auld Lang Syne (1788)
- When the Saints Go Marching In (spiritual)
- Oh My Darling Clementine (1884), Scarborough Fair (medieval)
- My Bonnie Lies Over the Ocean (Scottish, 1881)

Total: 14 genres, 65 synth pieces, 48 minutes of content
Still a single index.html file with no dependencies.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:22:45 +00:00
Claude a63b7b3842 Add 3 new genres: Video Games, Chiptune Originals, Folk (45 pieces total)
Video Games (5 pieces):
- Korobeiniki / Tetris Theme (Russian folk, 1861) — public domain
- Turkish March (Mozart) — used in countless retro games
- Hungarian Rhapsody No. 2 (Liszt) — classic boss/cartoon music
- Can-Can (Offenbach) — bonus stage energy
- Kalinka (Russian folk) — Tetris B-side vibes

Chiptune Originals (6 pieces, composed by Claude.ai):
- Pixel Quest — bouncy platformer theme
- Starfield — space shooter pulse
- Dragon's Keep — RPG overworld adventure
- Turbo Dash — fast racing theme
- Dungeon Crawl — dark adventure in D minor
- Victory Fanfare — boss defeated celebration
All use square wave (brass) oscillator for authentic 8-bit character
with pulse bass and arpeggiated accompaniment building per pass.

Folk (8 pieces, all public domain):
- Oh! Susanna, Camptown Races (Stephen Foster, 1848-50)
- Greensleeves (English Traditional, 1580)
- Red River Valley, Home on the Range (American, 1870s)
- Yankee Doodle (American, 1770s)
- Turkey in the Straw (American, 1820s)
- Danny Boy (Irish Traditional, 1910s)

Architecture: Replaced hardcoded "Classical" checks with generic
SYNTH_GENRES lookup object. Adding new synth genres now requires
only defining the piece array and adding one entry to SYNTH_GENRES.

Genre tabs now show: Rock, Metal, Jazz, Hip Hop, Funk, Latin,
Electronic, Country, Classical, Video Games, Chiptune Originals, Folk

Total: 12 genres, 45 synth pieces, 31 minutes, 5604 melody notes

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 13:15:34 +00:00
Claude 18bcb192ab Fix classical playability: louder orchestra, no stacked notes
Three fixes for classical mode:

1. Louder background orchestra: bg volume boosted 1.5x in
   beginClassical so the full orchestra is clearly audible
   during gameplay, not drowned out by hit sounds

2. No more impossible stacked notes: buildClassicalNotes now
   enforces a 0.12s minimum gap between consecutive hittable
   notes. This removes physically impossible simultaneous hits
   while keeping 94-100% of notes in most pieces. Flight of the
   Bumblebee goes from 206 to 140 notes (still 4 notes/sec).

3. Balanced hit volumes: drum hits during classical mode reduced
   from gain 8 to gain 3 so they don't overpower the orchestra.
   Orchestra hit sounds boosted (strings 0.7, brass 0.4). Miss
   feedback reduced to gain 2.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 12:56:28 +00:00
Outis 5280f94882 Add Classical genre tab with 26 synthesized orchestral pieces
Implements a full Classical mode with Web Audio synthesizer engine supporting strings, brass, woodwind, bass, timpani, and choir instruments. 26 playable pieces from Beethoven's 5th to Flight of the Bumblebee with 19 minutes of total content and 3,173 hittable melody notes. Includes drums/orchestra hit sound toggle.
2026-03-30 08:40:43 -04:00
Claude d533dfc0f5 Fix classical mode: 3x volume boost, Linux audio resume, longer pieces
Audio fixes:
- Multiply all synth volumes by 3x in playSynth() — previous gains
  (0.25-0.65) were 10-30x quieter than drum sounds (gain 1.5-4)
- Add explicit ac.resume() in beginClassical(), startGame(), and
  preview to fix Linux/Chrome AudioContext suspension
- Add 0.15s scheduling offset so AudioContext fully resumes before
  first oscillator fires

Piece duration increases:
- Beethoven's 5th: 28s → 54s (113 melody notes). Added soft string
  echo, extended scalar passages, sustained choir chords, 5 final
  chords, and a fff motif restatement
- Hall of the Mountain King: 18s → 38s (117 melody notes). Expanded
  from 5 to 8 acceleration passes (0.55s → 0.095s per note), added
  repeated finale chords and final sustained chord
- O Fortuna: 22s → 43s (78 melody notes). Added second chant phrase,
  quiet string interlude, second ascending passage, extended 12-note
  climactic reprise, and double finale chords

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 02:30:55 +00:00
Claude 6765c4aea8 Add Classical genre tab with synthesized orchestra and 3 pieces
Implements the Classical mode with a Web Audio synthesizer engine
supporting strings (sawtooth+lowpass), brass (square+lowpass),
woodwind (triangle), bass (sine), timpani (sine sweep), and choir
(detuned sines). Adds three playable pieces:

- Beethoven's 5th (Opening): The iconic G-G-G-Eb motif with full
  orchestral backing, scalar passages, and power chords (~28s)
- Hall of the Mountain King (Grieg): 5-pass accelerating theme that
  starts slow with woodwinds and builds to a frantic brass finale
- O Fortuna (Orff): Dramatic choral piece with choir synth, ascending
  and descending passages, and climactic D-minor finale

Background synth plays automatically while melody notes scroll as
hittable targets. Scoring, pad toggles, preview, and multiplayer
all work with classical pieces.

https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE
2026-03-30 02:15:10 +00:00
Outis e6d4b02864 Rename drum-rhythm-game-5.html to index.html 2026-03-29 21:56:15 -04:00