 (let [canvas-id "canvas"
       c-instrument (chan)
       c-orientation-change (util/listen js/window :orientation-change)
-      c-input (create-input-channel canvas-id)]
+      c-touch (create-input-channel canvas-id)]
 
   (go
    (let [draw-ctx (util/get-ctx canvas-id)]

  [scale]
  {:piano-keys (into (sorted-map) (map (fn [freq] [freq {}])
                                       scale))
   :notes [] :w 0 :h 0})

(defn add-synths-to-instrument
  [instrument]
  (reduce (fn [a x] (assoc-in a [:piano-keys x :synth] (create-note-synth x)))
          instrument
          (-> instrument :piano-keys keys)))

(defn audio-time []
  (.-currentTime js/audioCtx))

    (or (and f-instrument (f-instrument instrument event))
        instrument)))

(defn fire-touch-data-on-instrument
  [instrument data]
  (if (-> instrument :sound-ready)
    (reduce fire-event-on-instrument
            instrument
            (touch-data->touches data))
    (recur (add-synths-to-instrument instrument) data)))

(defn update-size [instrument canvas-id]
  (let [{w :w h :h :as window-size} (util/get-window-size)]
    (do (util/set-canvas-size! canvas-id window-size)
