                       value (cond
                               (= \> (get (get m 2) 0)) (mod (+ old-value (or value 0) (- (count (get m 2)) 1)) max-value)
                               (= \< (get (get m 2) 0)) (mod (- old-value (or value 0) (- (count (get m 2)) 1)) max-value)
+                              (and (= "" (get m 2)) (= "" (get m 3))) old-value
                               :else value)]
                   (merge state
                          (cond


;; TODO:
;;   MPE support
;;   :time-signature

(ns semitone.core
  (:require [clojure.pprint :refer [pprint]]

                              (.add track 
                                    (MidiEvent. (ShortMessage.
                                                 (:message-type state)
                                                 (:ch state)
                                                 key
                                                 value)
                                                (+ (:position state)
