                             :prog (mod (Integer. (get m 1)) 128)
                             :notes (vec-rest notes)})
               ;; channel pressure, pitch bend, note on/off / key pressure by key number
-              (if-let [m (re-matches #"(\*|\^|\*k|k|-k)(>+|<+|)(-?(?:[0-9]+|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)(?:[eE]-?[0-9]+)?|)(-|)" note)]
+              (if-let [m (re-matches #"(\*|\^|\*k|k|_k)(>+|<+|)(-?(?:[0-9]+|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)(?:[eE]-?[0-9]+)?|)(_|)" note)]
                 (let [param ({"*" :channel-pressure "^" :pitch-bend "*k" :key-pressure "k" :key} (get m 1))
                       [min-value max-value double-min double-max]
                       (get {:channel-pressure [0 128 0.0 1.0]


(ns semitone.core
  (:require [clojure.pprint :refer [pprint]]
            [clojure.lang.Numbers :refer [toRatio]]
            [clojure.stacktrace :refer [print-stack-trace]]
            [incanter.interpolation :refer [interpolate-parametric]])
  (:import [javax.sound.midi

                           (or (= "k" (get m 1)) (= "-k" (get m 1)))
                           {:message-type ShortMessage/NOTE_ON
                            :tie (cond
                                   (= "_k" (get m 1)) :end
                                   (= "_" (get m 5)) :begin
                                   :else nil)
                            param value
                            :param param}
