           (<! (timeout (* 1000 delay)))
           (>! ch data)
           (recur (rest coll))))
-      (print "finished sending data")
       (close! ch))
     ch))
 

                         (do
                           (dispatch [:update-state apply-changes v])
                           (recur))
                         (dispatch [:finished]))
          stop-playback-chan nil))) ; do nothing, break the loop
    (go
      (<! stop-playback-chan)
      (print (str "finished in " (elapsed-time-since start))))
    (assoc state :stop stop-fn)))

(defn stop-playback [state]
  (print "stopping")
  (let [t ((:stop state))]
    (-> state
        (dissoc :stop)

  (map (fn [[delay changes]] [(/ delay speed) changes]) frames))

(defn start-playback [state dispatch]
  (let [start (js/Date.)
        play-from (:play-from state)
        speed (:speed state)
