diff --git a/index.html b/index.html index a3f47c7..6da0bcc 100644 --- a/index.html +++ b/index.html @@ -56,9 +56,9 @@ function autoCorrelate(buf, sr) { } const CHORDS = { - Em:{ dots:[{s:1,f:2,n:"2"},{s:2,f:2,n:"3"}], open:[3,4,5], muted:[], label:"x x 0 2 2 0" }, - Am:{ dots:[{s:4,f:2,n:"1"},{s:3,f:2,n:"2"},{s:2,f:2,n:"3"}], open:[4,5], muted:[0], label:"x 0 2 2 1 0" }, - G: { dots:[{s:0,f:3,n:"2"},{s:5,f:3,n:"4"},{s:1,f:2,n:"1"},{s:4,f:2,n:"3"}], open:[2,3], muted:[], label:"3 2 0 0 3 3" }, + Em:{ dots:[{s:2,f:2,n:"2"},{s:3,f:2,n:"3"}], open:[0,1,4,5], muted:[], label:"0 0 2 2 0 0" }, + Am:{ dots:[{s:2,f:2,n:"2"},{s:3,f:2,n:"3"},{s:4,f:2,n:"1"}], open:[1,5], muted:[0], label:"x 0 2 2 1 0" }, + G: { dots:[{s:0,f:3,n:"2"},{s:1,f:2,n:"1"},{s:4,f:3,n:"3"},{s:5,f:3,n:"4"}], open:[2,3], muted:[], label:"3 2 0 0 3 3" }, C: { dots:[{s:1,f:3,n:"3"},{s:2,f:2,n:"2"},{s:4,f:1,n:"1"}], open:[3,5], muted:[0], label:"x 3 2 0 1 0" }, D: { dots:[{s:3,f:2,n:"1"},{s:4,f:3,n:"3"},{s:5,f:2,n:"2"}], open:[2], muted:[0,1], label:"x x 0 2 3 2" }, }; @@ -897,73 +897,130 @@ function LessonBody({ id, detected, onTarget, listening, onStartMic }) { Sit with the guitar waist on your right leg. Back straight, neck angled slightly up. Thumb behind the neck, fingers curling over the fretboard.

Your strumming hand hovers over the soundhole. For now use your thumb, sweeping downward across the strings.

+

Finger numbering

+

Throughout this app, the gold circles on chord diagrams show you which finger to use. Here is how they are numbered:

+
+ + {/* Palm base */} + + + {/* Thumb - angled left */} + + + {/* Index finger */} + + {/* Middle finger - tallest */} + + {/* Ring finger */} + + {/* Pinky */} + + + {/* Knuckle lines */} + + + + + + + + + + {/* Gold circles on fingertips with numbers */} + {/* Index = 1 */} + + + 1 + + {/* Middle = 2 */} + + + 2 + + {/* Ring = 3 */} + + + 3 + + {/* Pinky = 4 */} + + + 4 + + {/* Labels below fingers */} + Index + Middle + Ring + Pinky + + {/* Thumb label */} + Thumb + (not numbered) + +
+ When a chord diagram shows a 1 on a string, press that string with your index finger. 2 = middle, 3 = ring, 4 = pinky. +

Strings thick to thin: E A D G B e - remember with "Elephants And Donkeys Grow Big Ears."

); if (id === 1) { - const NUM_FRETS=5, NS=6, W=320, H=200; - const TOP=44, BOT=H-24, LEFT=44, RIGHT=W-12; + // Wider left margin: label col at 14, marker col at 34, nut at 64 + const NUM_FRETS=5, NS=6, W=340, H=210; + const TOP=44, BOT=H-24, LEFT=64, RIGHT=W-10; const strGap=(BOT-TOP)/(NS-1); const fretGap=(RIGHT-LEFT)/NUM_FRETS; const LABELS=["E","A","D","G","B","e"]; - // Two example notes: open E (str0 fret0), G chord shape highlight (str5 fret3) - // Single notes to demo: 1=open E2(str0,fr0), 2=open e(str5,fr0), 3=G chord(str0,fr3 + str5,fr3) - const demoNotes=[ - {str:0,fret:0,label:"1",note:"E2",desc:"Open Low E"}, - {str:5,fret:0,label:"2",note:"e4",desc:"Open High e"}, - {str:0,fret:3,label:"3",note:"G",desc:"Fret 3"}, - {str:5,fret:3,label:"4",note:"G",desc:"Fret 3"}, - {str:1,fret:2,label:"5",note:"B",desc:"Fret 2"}, + const markers=[ + {s:0,type:"open"},{s:1,type:"muted"},{s:2,type:"muted"}, + {s:3,type:"muted"},{s:4,type:"open"},{s:5,type:"open"} ]; return (

Each line is a string on your guitar. Numbers tell you which fret to press. 0 means open - no fingers needed.

-
+
Example - a G chord
+ {/* Nut */} + {/* Fret lines */} {Array.from({length:NUM_FRETS+1},(_,f)=>( ))} + {/* Strings */} {Array.from({length:NS},(_,s)=>( ))} + {/* String name labels - col 1 */} {LABELS.map((n,s)=>( - {n} + {n} ))} - {Array.from({length:NUM_FRETS},(_,f)=>( - {f+1} - ))} - {/* Per-string markers left of nut: O=open, X=muted, nothing=fretted */} - {[ - {s:0, type:"open"}, - {s:1, type:"muted"}, - {s:2, type:"muted"}, - {s:3, type:"muted"}, - {s:4, type:"open"}, - {s:5, type:"open"}, - ].map(({s,type})=>{ - const cy = TOP+s*strGap; - const cx = LEFT-16; + {/* Open/muted markers - col 2 */} + {markers.map(({s,type})=>{ + const cy=TOP+s*strGap, cx=38; if(type==="open") return ( - + 0 ); return ( - - + + ); })} + {/* Fret numbers */} + {Array.from({length:NUM_FRETS},(_,f)=>( + {f+1} + ))} {/* Fretted dots */} {[{s:0,f:3,n:"3"},{s:1,f:2,n:"2"},{s:4,f:2,n:"1"},{s:5,f:3,n:"4"}].map(({s,f,n},i)=>{ const cx=LEFT+(f-0.5)*fretGap, cy=TOP+s*strGap; @@ -978,9 +1035,9 @@ function LessonBody({ id, detected, onTarget, listening, onStartMic }) { })}
- 0 = open string (no fingers). A number = press that fret. X = don't play that string. Green O = open, play it. + 0 = open string (no fingers). A number = press that fret. X = don't play that string.

- The top string (E) is the thickest - the one closest to you when you hold the guitar. The bottom (e) is the thinnest. + The top string (E) is the thickest - closest to you when holding the guitar. The bottom (e) is the thinnest.

);