                              (vals (ns-publics 'overtone.instrument))))]
     (load-synthdef synth)))
 
+(defn- inst-block-until-ready*
+  [inst]
+  (when *block-node-until-ready?*
+    (doseq [sub-node [(:fx-group inst)
+                      (:group inst)
+                      (:instance-group inst)
+                      (:mixer inst)]]
+      (node-block-until-ready sub-node))))
+
+(defn- inst-status*
+  [inst]
+  (let [sub-nodes [(:fx-group inst)
+                   (:group inst)
+                   (:instance-group inst)
+                   (:mixer inst)]]
+    (cond
+     (some #(= :loading @(:status %)) sub-nodes) :loading
+     (some #(= :destroyed @(:status %)) sub-nodes) :destroyed
+     (some #(= :paused @(:status %)) sub-nodes) :paused
+     (every? #(= :live @(:status %)) sub-nodes) :live
+     :else (throw (Exception. "Unknown instrument sub-node state: "
+                              (with-out-str (doseq [n sub-nodes] (pr n))))))))
+
 (extend Inst
   ISynthNode
   {:node-free  node-free*


(defmethod inst-fx! :stereo
  [inst fx]
  (let [fx-group (:fx-group inst)
        bus-l    (to-sc-id (:bus inst))
        bus-r    (inc bus-l)

  {:kill* (fn [this] (group-deep-clear (:instance-group this)))}

  ISynthNodeStatus
  {:node-status            inst-status*
   :node-block-until-ready inst-block-until-ready*})
