         ctx.fillStyle = 'rgb(10,20,30)'
         ctx.fillText chord_name, h_gutter, -3
 
-        fingering = []
-        for semitones, degree_index in chord.pitch_classes
-          for {string, fret} in intervals_from(root_fingering, semitones)
-            fingering.push {string, fret, degree_index}
+        fingering = do (positions=[]) ->
+          for semitones, degree_index in chord.pitch_classes
+            for {string, fret} in intervals_from(root_fingering, semitones)
+              positions.push {string, fret, degree_index}
+          {positions}
         fingering = best_fingering_for(chord, pitch) if best_fingering
 
-        position.color = degree_colors[position.degree_index] for position in fingering
-        draw_fingerboard fingering, draw_barres: best_fingering
+        position.color = degree_colors[position.degree_index] for position in fingering.positions
+        draw_fingerboard fingering.positions, barres: fingering.barres
 
 chord_book = (options) ->
   page_count = options.pages

  grid cols: 10, rows: 10
  , cell_width: padded_fretboard_width + 10
  , cell_height: padded_fretboard_height + 5
  , (cell) ->
    for positions in fingerings
      cell -> draw_fingerboard positions, draw_barres: true

draw_pitch_diagram = (pitch_classes, degree_colors) ->
  r = 10

    return p.match(/x$/)

  finger_count = (fingering) ->
    fingering.barres ||= find_barres(fingering.positions)
    n = (pos for pos in fingering.positions when pos.fret).length
    n -= barre.subsumption_count for barre in fingering.barres
    n

  few_fingers = (fingering) ->
    return finger_count(fingering) <= 4
