 # chord_page Chords[0], best_fingering: true
 # intervals_book by_root: true
 # intervals_book by_root: false
-chord_book best_fingering: 0, pages: 0
+chord_book best_fingering: 1, pages: 1#, only: 'G#'
 # chord_fingerings_page Chords[0], 44 + 3

# Fretboard
#

StringNumbers = [1..6]
StringCount = StringNumbers.length

FretNumbers = [0..4]  # includes nut
FretCount = FretNumbers.length - 1  # doesn't include nut

# FIXME these are backwards from the string numbers
StringIntervals = [5, 5, 5, 4, 5]

OpenStringNoteNumbers = do (numbers=[]) ->
  numbers.push 44
  for interval, i in StringIntervals
    numbers.push numbers[i] + interval
  numbers.reverse()

pitch_number_for_position = ({string, fret}) ->
  OpenStringNoteNumbers[string - 1] + fret

finger_positions_each = (fn) ->
  for string in StringNumbers

      continue if fretted_strings[string_number]
      ctx.font = "#{closed_string_fontsize}pt Helvetica"
      ctx.fillStyle = 'black'
      ctx.fillText "x", h_gutter + string_number * string_spacing - 1, v_gutter + above_fretboard - 2.5

draw_intervals_from = (root_position, semitones, color) ->
  root_note_number = pitch_number_for_position(root_position)
