   (* freq (java.lang.Math/pow 2 (/ n-cents 1200))))
 
 ;; MIDI
-(def midi-range (range 128))
-(def middle-C 60)
+(def MIDI-RANGE (range 128))
+(def MIDDLE-C 60)
 
 ;; Manipulating pitch using midi note numbers
 

            (conj result (get phrase (first notes))))
     result)))

; Making MIDI note numbers nicer to look at...
(def NOTE {:C  0  :c  0
           :C# 1  :c# 1  :Db 1  :db 1
           :D  2  :d  2

  [base-freq interval]
  (* base-freq (math/expt 2 (/ interval 12))))

(defn interval-freq
  "Returns the frequency of the given interval using the specified mode and tuning (defaulting to ionian and equal-tempered respectively)."
  ([base-freq n] (interval-freq base-freq n :ionian :equal-tempered))
  ([base-freq n mode tuning]
     (case tuning
           :equal-tempered (nth-equal-tempered-freq base-freq (nth-interval n mode)))))

(defn- weighted-bins
  "Creates N bins where N is the smallest power of two greater than the number
