   fingerings = (f for f in fingerings when f == bass_root or f.string < bass_root.string)
   # Select the lowest fret per string
   # TODO only if each note is represented
-  for string in strings
+  for string in StringNumbers
     fret = (f.fret for f in fingerings when f.string == string).sort()[0]
     fingerings = (f for f in fingerings when f.string != string or f.fret == fret)
   return fingerings

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

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

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

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