 ;; - drum and bass sounds
 ;;
 ;;* create a library of sequence modifiers and harmonizers
+
+;;; ideas:
+
+;;; represent all notes with midi numbers
+;;; represent sequences of notes (i.e. scales) with vectors/lists
+;;; represent sequences of durations with vectors/lists
+;;; [1 3 5 7]
+;;; represent chords with sets
+;;; #{1 3 5}
+;;
+;;[1 3 5 #{1 4 5} 7]
+;;[1 1 2     6    3]
+
+
+;; chromatic notes -> 0-11
+;; degrees -> i -> vii
+
+;; chord - concrete: (60 64 67)
+;; chord - concrete - chromatic notes: (4 7 12)
+
+
+;; chord - abstract - chromatic notes: (0 4 7)
+;; chord - abstract - chromatic notes: (0 4 7)
+;; chord - abstract - degrees: (i iii v)

            (list base)
            (take (* 8 12) (cycle intervals)))))))

(defn from-scale [lower upper ] nil)

(defn octaves [scale])

(defn chosen-from [notes]
  (let [num-notes (count notes)]

  [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
