 
     (when duration
       (let [duration-ms (parse-duration duration)]
-        (c/set-timeout! clock #(stop-osc osc-impl) duration)))))
+        (c/set-timeout! clock #(stop-osc osc-impl) duration-ms)))))
 
 (defn play-note 
   "Uses a one-off oscillator to play a note.

   :half          2
   :whole         1})

(defn parse-duration [duration]
  (cond
    (number? duration)     duration
    (keyword? duration)    "TODO"
    (sequential? duration) (apply + (map parse-duration duration))))

(defn- play-note*

  (reduce (fn [timeout {:keys [pitch duration volume] :as note-model}]
            (when pitch
              (c/set-timeout! clock #(play-fn osc-model note-model) timeout))
            (let [duration-ms (parse-duration (or duration 0))] 
              (+ timeout duration-ms)))
          0
          notes))

