       (condp = tab
         :osc [osc-panel]
         :filter [filter-panel]
+        :env [env-panel]
         [:h2 "Select a panel"])]))

  [:div.filter-panel
    [:h2 "Filter"]])

(defn main-panel []
  (let [tab @(rf/subscribe [::panel])]
    [:main.main-panel


(rf/reg-event-fx ::control
  [rf/debug]
  (fn [fx [_ cc value from-midi?]]
    (let [fx- (assoc-in fx [:db ::control cc] value)]
      (if from-midi?
        fx-
        ;; If the event doesn't originate from midi, send it
        (assoc fx- ::midi/midi
          (if (vector? cc)
            ;; NRPN
            [[0xB0 0x63 (first cc)]
             [0xB0 0x62 (second cc)]
             [0xB0 0x06 value]]
            ;; Regular CC
            [[0xB0 cc value]]))))))

(rf/reg-sub ::control
  (fn [db [_ cc]]
