 (defn rand-direction [] (rand-nth [1 -1]))
 
 (s/fdef rand-direction
-        :args (s/cat)
-        :ret #{-1 1})
+  :args (s/cat)
+  :ret #{-1 1})
 
 (defn vary-pitch [{:keys [::pitch ::variation ::direction]}]
   (let [direction (or direction [-1 1])
         a         (descriptor->value pitch)
         b         (+ a (* (descriptor->value variation)
-                          (descriptor->value direction)))]
+                         (descriptor->value direction)))]
     [a b]))
 
 (s/fdef vary-pitch
-        :args (s/cat :data (s/keys :req [::pitch ::variation]))
-        :ret (s/tuple ::audio/semitone ::audio/semitone))
+  :args (s/cat :data (s/keys :req [::pitch ::variation]))
+  :ret (s/tuple ::audio/semitone ::audio/semitone))
 
 (om/defui ^:once PitchDetection
   static uc/InitialAppState

   ::class PitchDetection
   ::props {::variation [12 ".." 24]}
   ::hints (fn [props]
     ["Pitch is the sensation of a note being higher or lower"
      "Does the second note sound higher or lower than the first?"
      (str "The second note is " (answer-label props))])})

(defmethod slug->exercise "pitch-2" [name]
  {::name  name

  (-> (into {} options) (get correct-answer)))

(s/fdef progress-bar
  :args (s/cat :props (s/keys :opt [::progress-total ::progress-value]))
  :ret ::react-component)

(defn note->node [note]
  {::audio/node-gen (->> note audio/semitone->note (get @audio/*sound-library*))})
