       [:li [toggle {:id :arp-7/step :label "Step 7"}]]
       [:li [toggle {:id :arp-8/step :label "Step 8"}]]]])
 
+(defn patch-inspector-panel []
+  (let [patch @(rf/subscribe [::patch])]
+    [:div.patch-inspector-panel
+      [:h2 "Patch inspector"]
+      [:button {:on-click #(rf/dispatch [::midi/patch])} "Fetch patch"]
+      [:div {:style {:height "400px" :overflow-y "scroll"}}
+        [:table
+          [:thead
+            [:tr [:th "Offset"] [:th "Value"]]]
+          [:tbody
+            (for [[offset value] (map vector (range (count patch)) patch)]
+              ^{:key offset}
+              [:tr [:td offset] [:td (str "0b" (.toString value 2))]])]]]]))
+
 (defn main-panel []
   (let [tab @(rf/subscribe [::panel])]
     [:main.main-panel

(ns mininova-web-ui.ui
  (:require [reagent.core :as reagent]
            [re-frame.core :as rf]
            [mininova-web-ui.midi :as midi]
            [mininova-web-ui.params :as params]))

(def patch-request-message
  [0xF0 0x00 0x20 0x29 0x03 0x01 0x7F 0x40 0x00 0x00 0x00 0x00 0x00 0xF7])

(def patch-response-sentinel
  [0xF0 0x00 0x20 0x29 0x03 0x01 0x7F 0x00 0x00 0x09 0x04])

(def default-panel :osc)

;; FIXME: Get ridi of `re-frame: no :fx handler registered for :event` error
(rf/reg-fx :event (fn [_ _]))

        :env [env-panel]
        :lfo [lfo-panel]
        :arp [arp-panel]
        :patch-inspector [patch-inspector-panel]
        [:h2 "Select a panel"])]))
