         end (+ start (* note-length (count pitches)))
         notes (map vector (range start end note-length) pitches)]
     (play# notes)))
+
+;(demo# (range 60 73))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Scale                                        ;;

;            ))

(def melody 
  (let [call
          {:length (repeats [[2 1/4] [1 1/2] [14 1/4] [1 3/2]])
           :pitch (runs [[0 -1 3 0] [4] [1 8]])}
        response
          {:length (repeats [[10 1/4] [1 1/2] [2 1/4] [1 9/4]])
           :pitch (runs [[7 -1 0] [0 -3]])}
        development
          {:length (repeats [[1 3/4] [12 1/4] [1 1/2] [1 1] [1 1/2] [12 1/4] [1 3]])
           :pitch (runs [[4] [4] [2 -3] [-1 -2] [0] [3 5] [1] [1] [1 2] [-1 1 -1] [5 0]])}
        line
          (merge-with concat call response development)]
    (map vector (sums (:length line)) (:pitch line))))

(def bassline
  (let [triples (partial mapcat (partial repeat 3))]

       (concat (triples (runs [[0 -3] [-5 -3]])) (run [12 0])))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Canone alla quarta - Johann Sebastian Bach   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn bpm [per-minute] #(-> % (/ per-minute) (* 60) (* 1000)))

(def t 0)
(def p 1)
