   nil)
 
 (defn- run-handler-with-known-arity [[f arity] & args]
-  "Expects a tuple of fn with arity and applies fn to the first  arity number of args. If arity
-   is -1 it assumes that the fn is a var and so calculates arity on the fly allowing for the
-   potential rebinding of the fn with a different arity."
+  "Expects a tuple of fn with arity and applies fn to the first  arity number of
+  args. If arity is -1 it assumes that the fn is a var and so calculates arity
+  on the fly allowing for the potential rebinding of the fn with a different
+  arity."
   (let [arity (if (= arity -1) (arg-count @f) arity)]
     (try
       (apply f (take arity args))


(defn event
  "Fire an event of type event-type with any number of additional properties.
  NOTE: an event requires key/value pairs, and everything gets wrapped into an
  event map.  It will not work if you just pass values.


     true)))

(defn on-event
  "Runs handler whenever events of event-type are fired asynchronously. This
  asynchronous behaviour can be overridden if required - see sync-event for
  more information. Events may be triggered with the fns event and sync-event.

  Takes an event-type (name of the event), a handler fn and a key (to refer
  back to this handler in the future). The handler can optionally accept a
  single event argument, which is a map containing the :event-type property
  and any other properties specified when it was fired.

  (on-event \"/tr\" handler ::status-check )
  (on-event :midi-note-down (fn [event]
