       t0: 0
       t1: 12
       z_index: 1
-      path:
-        0: {x: 0, y: 50}
-        1: {x: 400, y: 50}
-      draw: (s) ->
+      draw: (ctx, s) ->
         s *= 12
         pitch = Math.floor(s)
         bend = s - pitch
         positions = finger_positions_on_chord(chord, pitch)
-        with_graphics_context (ctx) ->
-          draw_chord_diagram ctx, positions, dy: bend * ChordDiagramStyle.fret_height
+        draw_chord_diagram ctx, positions, dy: bend * ChordDiagramStyle.fret_height
 
         pitch = (pitch + 1) % 12
         bend -= 1
         positions = finger_positions_on_chord(chord, pitch)
-        with_graphics_context (ctx) ->
-          draw_chord_diagram ctx, positions, dy: bend * ChordDiagramStyle.fret_height
+        draw_chord_diagram ctx, positions, dy: bend * ChordDiagramStyle.fret_height
+
+      , (sprite) ->
+        sprite.at 0, x: 0, y: 50
+        sprite.at 1, x: 400, y: 50
 
     animation.make_sprite
       draw: ->

  cb
    make_sprite: (options, cb=null) ->
      [options, cb] = [{}, options] if _.isFunction(options) and not cb
      sprite = options
      sprites.push sprite
      cb sprite if cb
      return sprite

        fingering = best_fingering_for(chord, pitch)
        pos = sprite_position_at master_diagram, t0
        [col, row] = [i % 4 , Math.floor(i / 4)]

        animation.make_sprite
          t0: t0
          draw: (ctx, dt) ->
            draw_title "#{chord_name} Major", font: '12pt Times', fillStyle: 'black', y: -3
            draw_chord_diagram ctx, fingering.positions, barres: fingering.barres

        , (sprite) ->
          sprite.at 0, pos
          sprite.at 1, x: 50 + col * 130, y: pos.y + 100 + row * 115

module.exports = chord_shape_flipbook
