                              {:notes (vec-rest notes)})
                       (map? (first notes))
                       (parse-state notes state)
-                      (keyword? (first notes))
+                      (and (keyword? (first notes))
+                           (not (empty? (vec-rest notes))))
                       (parse-state (cons {(first notes) (first (vec-rest notes))} (vec-rest (vec-rest notes))) state)
                       :else
                       (let [notes (:notes state)
-                            state (parse-param (:notes state) state)
                             state (parse-length (:notes state) state)
                             state (if (nil? (:repeat-length state)) (parse-note (:notes state) state) state)
+                            state (parse-param (:notes state) state)
+                            key (cond
+                                  (or (= (:key-type state) ShortMessage/NOTE_ON)
+                                      (= (:key-type state) ShortMessage/POLY_PRESSURE))
+                                  (mod (+ (:key state)
+                                          (:transpose state)
+                                          (* (+ 1 (or (:note-octave state) (:octave state))) 12)) 128)
+                                  (= (:key-type state) ShortMessage/PITCH_BEND)
+                                  (bit-and (:pitch-bend state) 2r1111111)
+                                  :else (:key state))
                             value (get {ShortMessage/NOTE_ON (:attack state)
                                         ShortMessage/CHANNEL_PRESSURE (:channel-pressure state)
                                         ShortMessage/CONTROL_CHANGE (:cc-change state)
-                                        ShortMessage/PITCH_BEND (:pitch-bend state)
+                                        ShortMessage/PITCH_BEND (min 128 (bit-shift-right (:pitch-bend state) 7))
                                         ShortMessage/POLY_PRESSURE (:key-pressure state)}
                                        (:key-type state) 0)
                             track (aget (.getTracks (.getSequence (:sequencer state))) (:track state))]
                         (when (= (count notes) (count (:notes state)))
-                          (throw (Exception. (format "Could not parse note: %s" (str (first notes))))))
+                          (throw (Exception. (format "Could not parse note: %s"
+                                                     (if (symbol? (first notes))
+                                                       (name (first notes))
+                                                       (str (first notes)))))))
                         (cond
                           (and (not (nil? (:key state))) (= (type (:key state)) MidiMessage))
                           (.add track (MidiEvent. (:key state) (:position state)))

                                    (MidiEvent. (ShortMessage.
                                                 (:key-type state)
                                                 (:channel state)
                                                 (+ (:key state)
                                                    (if (or (= (:key-type state) ShortMessage/NOTE_ON)
                                                            (= (:key-type state) ShortMessage/POLY_PRESSURE))
                                                      (:transpose state) 0))
                                                 value)
                                                (:position state))))
                            (when (and (= (:key-type state) ShortMessage/NOTE_ON) (not (= (:tie state) :begin)))

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