Skip to content

Add Code a Beat text input to Play the System - #6

Merged
clevernyyyy merged 1 commit into
mainfrom
feat/code-a-beat
Oct 19, 2026
Merged

clevernyyyy merged 1 commit into
mainfrom
feat/code-a-beat

Conversation

@clevernyyyy

Copy link
Copy Markdown
Contributor

Summary

  • New collapsible ⌨ Code a Beat panel in the Home page "Play the System" studio. Visitors write a loop as text and run it as tracks:
    bpm 120
    drums: [kick . hihat . snare . hihat .]*2
    bass:  E2 . E2 . G2 . A2 .
    piano: E4+G4+B4 . . . . . . . D4+F#4+A4 . . . . . . .
    
    Each step is an 8th note; . rests, + chords, […]*N / tok*N repeats, // or # comments. Shorter tracks loop to fill the longest. Run with the button or Ctrl/⌘+Enter; errors name the line. Reset restores the starter code and stops playback.
  • Input is capped (repeats, steps per line, loop length) so a typo can't hang the page.
  • Fix: piano keyboard shortcuts no longer fire while typing in inputs/textareas.

Testing

  • tsc -b --noEmit and vite build pass.
  • Headless browser: starter code builds 3 tracks and plays; bad note/drum/instrument/bracket/bpm/empty inputs show line-specific errors; typing in the textarea doesn't press piano keys; Reset stops playback; layout checked at desktop and phone widths.

🤖 Generated with Claude Code

Let visitors write loops as text (one "instrument: steps" line per
track, 8th-note steps, chords, repeats, bpm) and run them as tracks.
Ignore piano keyboard shortcuts while typing in form fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clevernyyyy
clevernyyyy merged commit bd967e7 into main Oct 19, 2026
1 check passed
@clevernyyyy
clevernyyyy deleted the feat/code-a-beat branch October 19, 2026 03:51
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.

1 participant