          {:notes (vec-rest notes)})
         state))))
 
-(defn make-sequencer [& [sequence]]
-  (let [sequence (or sequence (Sequence. Sequence/PPQ 256))
+(def ^:dynamic *seq* (Sequence. Sequence/PPQ 256))
+(def ^:dynamic *synth* (MidiSystem/getSynthesizer))
+
+(defn make-sequencer [& [sequence synth]]
+  (let [sequence (or sequence *seq*)
+        synth (or synth *synth*)
         sequencer (MidiSystem/getSequencer)]
     (.addMetaEventListener sequencer
                            (reify MetaEventListener
                              (meta [meta]
-                               (.setTempoInMPQ sequencer (float (.getInt (.put (ByteBuffer/allocate 4) (.getData meta) 1 3)))))))
+                               (when (= (.getType meta) 0x51)
+                                 (.setTempoInMPQ sequencer (float (.getInt (.put (ByteBuffer/allocate 4) (.getData meta) 1 3))))))))
     (.setSequence sequencer sequence)
     (.createTrack (.getSequence sequencer))
     (.open sequencer)
+    (.open synth)
+    (.setReceiver (.getTransmitter sequencer) (.getReceiver synth))
     sequencer))
 
-(def ^:dynamic *seq* (Sequence. Sequence/PPQ 256))
-(def ^:dynamic *sequencer* (make-sequencer *seq*))
+(def ^:dynamic *sequencer* (make-sequencer *seq* *synth*))
 
 (defn compose [notes & [sequencer state]]
   (let [sequencer (or sequencer *sequencer*)

                          :else
                          (throw (Exception. (format "Could not parse key: %s" key))))
                        (merge state {:position
                                      (if (vector? (:notes state))
                                        (:position state)
                                        (+ (:position state) (or (:repeat-length state) (:length state))))})))
              notes (:notes state)]

      state)))

(defn parse-length [notes state]
  (if (or (empty? notes)
          (not (or (ratio? (first notes))
                   (symbol? (first notes)))))
    state
    (let [length (first notes)
          ppq (.getResolution (.getSequence (:sequencer state)))]
      (cond
        (ratio? length)
        (merge state {:key (if (< length 0) nil (:key state))
                      :length (Math/abs (* 4.0 length ppq))
                      :repeat-length nil
