                       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]]

                            (when (and (= (:message-type state) ShortMessage/NOTE_ON) (not (= (:tie state) :begin)))
                              (.add track (MidiEvent. (ShortMessage.
                                                       ShortMessage/NOTE_OFF
                                                       (:ch state)
                                                       key
                                                       (:release state))
                                                      (max 
