     for fingering in fingerings
       fretted_strings[fingering.string] = true
       draw_fingering fingering, fingering
-    for string_number in strings
+    for string_number in StringNumbers
       continue if fretted_strings[string_number]
       ctx.font = '4pt Helvetica'
       ctx.fillStyle = 'black'

  StringNoteNumbers[string - 1] + fret

finger_positions_each = (fn) ->
  for string in strings
    for fret in frets
      fn string: string, fret: fret

intervals_from = (fingering, semitones) ->

  h_gutter = 5
  v_gutter = 5
  note_radius = 1
  padded_fretboard_width = 2 * h_gutter + (StringCount - 1) * string_spacing
  padded_fretboard_height = 2 * v_gutter + fret_height * FretCount + fret_overhang

draw_strings = ->
  for n, i in StringNumbers
    y = i * string_spacing + h_gutter
    ctx.beginPath()
    ctx.moveTo h_gutter, y
    ctx.lineTo h_gutter + FretCount * fret_width + fret_overhang, y
    ctx.lineWidth = 1
    ctx.stroke()

draw_frets = ->
  for fret_number in FretNumbers
    x = fret_number * fret_width + h_gutter
    ctx.beginPath()
    ctx.moveTo x, h_gutter
    ctx.lineTo x, h_gutter + (StringCount - 1) * string_spacing
    ctx.lineWidth = 3 if fret_number == 0
    ctx.stroke()
    ctx.lineWidth = 1
