                                         (:position state)
                                         (+ (:position state) (or (:repeat-length state) (:length state))))})))
               notes (:notes state)]
-          (recur notes (merge state {:repeat-length nil})))
+          (recur notes (merge state {:repeat-length nil
+                                     :note-octave nil})))
         state))))
 
 (defn play [& [notes sequencer state]]

                      :time-signature [4 4]
                      :transpose 0
                      :octave 4
                      :param :octave
                      :cc-value 0
                      :tempo 120

                                    (MidiEvent. (ShortMessage.
                                                 (:key-type state)
                                                 (:channel state)
                                                 key
                                                 value)
                                                (:position state))))
                            (when (and (= (:key-type state) ShortMessage/NOTE_ON) (not (= (:tie state) :begin)))
