         (= (type length) clojure.lang.Ratio)
         (merge state {:key (if (< length 0) nil (:key state))
                       :length (Math/abs (* 4.0 length ppq))
+                      :repeat-length 0
                       :notes (rest notes)})
         (symbol? length)
         (if-let [m (re-matches #"(-|)((?:[xwhqistjlmno]\.*)+)" (name length))]

                                                   (- 2.0 (/ 1.0 (reduce * (repeat (count (get % 2)) 2))))
                                                   ppq)
                                               (re-seq #"\G([xwhqistjlmno])(\.*)" (get m 2))))
                          :notes (rest notes)}))
          (if-let [m (re-matches #"([-=])[-=]*" (name length))]
            (merge state {:length (* (:length state) (count (name length)))
                          :key (if (= "=" (get m 1)) (:key state) nil)
                          :notes (rest notes)})
            state))

                      :param :octave
                      :cc-value 0
                      :tempo 120
                      :length (.getResolution (.getSequence sequencer))
                      :repeat-length 0}
                     (or state {}))]
    (loop [notes notes state state]
      (if (not (empty? notes))
