                                                        (:channel state)
                                                        (:key state)
                                                        (:release state))
-                                                      (+ (:position state) (:length state) (:displacement state))))))
+                                                      (+ (:position state)
+                                                         (or (:repeat-length state) (:length state))
+                                                         (:displacement state))))))
                           :else nil)
                         state))]
                 (merge state {:position (if (vector? notes)
                                           (:position state)
-                                          (+ (:position state) (:length state)))}))
+                                          (+ (:position state)
+                                             (or (:repeat-length state) (:length state))))}))
               notes (:notes state)]
           (recur notes state))
         state))))

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

                      :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))
