Merge pull request #313 from outis1one/codex/fix-drum-rhythm-game-audio-issues

drum-rhythm-game: inject runtime fixes for WebAudio, pad fallback, and song metadata
This commit is contained in:
Outis
2026-08-11 21:59:36 -04:00
committed by GitHub
+55 -2
View File
@@ -249,8 +249,11 @@ install_drum-rhythm-game() {
const NOTE_TO_MIDI = { C: 0, D: 2, E: 4, F: 5, G: 7, A: 9, B: 11 };
// Sourced tune corrections. Do not add songs here from memory: every
// melody/rhythm entry must point at a reproducible score/ABC source.
// The first properly sourced passes cover Christmas songs from Milwaukee
// Irish Fest School of Music and Sing Along songs from abcnotation.com.
// The properly sourced passes now cover Christmas songs from Milwaukee
// Irish Fest School of Music, plus Sing Along, Classical, and Nursery
// Rhymes songs from abcnotation.com. Classical entries are public-domain
// compositions, and nursery-rhyme entries are traditional/public-domain
// melodies; source URLs are retained for reproducible transcription.
const CATEGORY_TUNES = {
'jingle bells': {
title: 'Jingle Bells', bpm: 112,
@@ -303,6 +306,56 @@ install_drum-rhythm-game() {
sourceAbc: '"F"FFFC|"Bb"DD"F"C2|"G7"AA"C7"GG|"F"F2 z C|"F"FFFC|"Bb"DD"F"C2|"G7"AA"C7"GG|"F"F2 z2|]',
melody: 'F4 F4 F4 C4 D4 D4 C4 A4 A4 G4 G4 F4 R C4 F4 F4 F4 C4 D4 D4 C4 A4 A4 G4 G4 F4 R',
beats: '1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 2 2'
},
'ode to joy': {
title: 'Ode to Joy', bpm: 112,
publicDomainComposition: true,
composer: 'Ludwig van Beethoven',
source: 'abcnotation.com tune page from the John Chambers mirror: https://abcnotation.com/tunePage?a=trillian.mit.edu%2F~jc%2Fmusic%2Fabc%2Fmirror%2Fmindspring.com%2F~thornton.rose%2FOdeToJoy%2F0001',
sourceAbc: 'F F G A | A G F E | D D E F | F>E E2 | F F G A | A G F E | D D E F | E>D D2 |: E E F D | E F/2G/2 F D | E F/2G/2 F E | D E A,2 | F F G A | A G F E | D D E F | E>D D2 :|',
// Source metadata: C:L. Van Beethoven, M:4/4, L:1/4, K:D. F notes are raised for K:D.
melody: 'F#4 F#4 G4 A4 A4 G4 F#4 E4 D4 D4 E4 F#4 F#4 E4 E4 F#4 F#4 G4 A4 A4 G4 F#4 E4 D4 D4 E4 F#4 E4 D4 D4 E4 E4 F#4 D4 E4 F#4 G4 F#4 D4 E4 F#4 G4 F#4 E4 D4 E4 A3 F#4 F#4 G4 A4 A4 G4 F#4 E4 D4 D4 E4 F#4 E4 D4 D4',
beats: '1 1 1 1 1 1 1 1 1 1 1 1 1.5 0.5 2 1 1 1 1 1 1 1 1 1 1 1 1 1.5 0.5 2 1 1 1 1 1 0.5 0.5 1 1 1 0.5 0.5 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1.5 0.5 2'
},
'minuet in g major': {
title: 'Minuet in G Major', bpm: 108,
publicDomainComposition: true,
composer: 'Christian Petzold',
source: 'abcnotation.com tune page for BWV Anhang 114: https://abcnotation.com/tunePage?a=spuds.thursdaycontra.com%2FTuneSwaps%2FSPUDS_TS20_Old%2F0012',
sourceAbc: 'd G/A/ B/c/ | d G G | e c/d/e/f/ | g G G |',
// Source metadata: C:Christian Petzold (1677-1733), formerly attributed to J. S. Bach; L:1/4, M:3/4, K:G.
melody: 'D5 G4 A4 B4 C5 D5 G4 G4 E5 C5 D5 E5 F#5 G5 G4 G4',
beats: '1 0.5 0.5 0.5 0.5 1 1 1 1 0.5 0.5 0.5 0.5 1 1 1'
},
'baa baa black sheep': {
title: 'Baa Baa Black Sheep', bpm: 112,
publicDomainComposition: true,
composer: 'Traditional',
source: 'abcnotation.com tune page from John Chambers music books collection: https://abcnotation.com/tunePage?a=trillian.mit.edu%2F~jc%2Fmusic%2Fbook%2FTomAnderson%2FHaandMeDoonDaFiddle%2F0002',
sourceAbc: 'A2A2 e2e2 | fgaf e4 | d2d2 c2c2 | B2B2 A4 | e2ee d2d2 | c2cc B4 | e2ee d2d2 | c2cc B4 | A2A2 e2e2 | fgaf e4 | d2d2 c2c2 | B2B2 A4 |]',
// Source metadata: M:C, L:1/8, K:A. C/F/G are raised for K:A.
melody: 'A4 A4 E5 E5 F#5 G#5 A5 F#5 E5 D5 D5 C#5 C#5 B4 B4 A4 E5 E5 E5 D5 D5 C#5 C#5 C#5 B4 E5 E5 E5 D5 D5 C#5 C#5 C#5 B4 A4 A4 E5 E5 F#5 G#5 A5 F#5 E5 D5 D5 C#5 C#5 B4 B4 A4',
beats: '2 2 2 2 1 1 1 1 4 2 2 2 2 2 2 4 2 1 1 2 2 2 1 1 4 2 1 1 2 2 2 1 1 4 2 2 2 2 1 1 1 1 4 2 2 2 2 2 2 4'
},
'three blind mice': {
title: 'The Three Blind Mice', bpm: 104,
publicDomainComposition: true,
composer: 'Traditional',
source: 'abcnotation.com tune page from the John Chambers Everyday Song Book mirror: https://abcnotation.com/tunePage?a=trillian.mit.edu%2F~jc%2Fmusic%2Fbook%2FEverydaySongBook%2FEverydaySongBook1%2F0224',
sourceAbc: 'G3 F3 | E3 z2z | G3 F3 | E3 z2z | B3 A2 A | G3 z2z | B3 A2 A | G3 z2B | e2 e d c d | e2 B B2 B | e e e d c d | e2 B B2 B | e e e d c d | e B B B2 A | G3 F3 | E3 z2z |]',
// Source metadata: O:Old Round, M:6/8, L:1/8, K:Eb. E/A/B are flattened for K:Eb.
melody: 'G4 F4 Eb4 R G4 F4 Eb4 R Bb4 Ab4 Ab4 G4 R Bb4 Ab4 Ab4 G4 R Bb4 Eb5 Eb5 Eb5 D5 C5 D5 Eb5 Bb4 Bb4 Bb4 Eb5 Eb5 Eb5 D5 C5 D5 Eb5 Bb4 Bb4 Bb4 Eb5 Eb5 Eb5 D5 C5 D5 Eb5 Bb4 Bb4 Bb4 Ab4 G4 F4 Eb4 R',
beats: '3 3 3 3 3 3 3 3 3 2 1 3 3 3 2 1 3 2 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 3 3 3 3 3'
},
'pop goes the weasel': {
title: 'Pop Goes the Weasel', bpm: 120,
publicDomainComposition: true,
composer: 'Traditional',
source: 'abcnotation.com tune page from the John Chambers mirror of PopGoesTheWeasel: https://abcnotation.com/tunePage?a=trillian.mit.edu%2F~jc%2Fmusic%2Fabc%2Fmirror%2Fsbigraf.tamu.edu%2FPopGoesTheWeasel%2F0000',
sourceAbc: 'G2G A2A | BdB G2z | G2G A2c | B3 G2z | G2G A2A | BdB G2z | e3 A2c | B3 G2z :|',
// Source metadata: B:Ryan's Mammoth Collection (1882), L:1/8, M:6/8, K:G.
melody: 'G4 G4 A4 A4 B4 D5 B4 G4 R G4 G4 A4 C5 B4 G4 R G4 G4 A4 A4 B4 D5 B4 G4 R E5 A4 C5 B4 G4 R',
beats: '2 1 2 1 1 1 1 2 1 2 1 2 1 3 2 1 2 1 2 1 1 1 1 2 1 3 2 1 3 2 1'
}
};