;;;
;;; (load "c:\\program files\\acl62\\music61.cl")
;;;
(load "c:\\program files\\acl62\\music60.cl")

;;;
;;;(get-a-UST-at-random-from-pair '("CM7" ion))--->(so si re)
;;;
;;;(get-chord-with-tension-from-pair '("CM7" ion))--->(do mi so si re la -so)
;;;
;;;(get-a-lhv-at-random-from-pair '("CM7" ion))--->(re mi so)
;;;
;;;(get-a-pt-at-random '("CM7" ion))--->(re mi +fa la si)
;;;
;;;
;;;
;;;(get-forth-interval-at-random '("CM7" ion))
;;;(si do so re la mi)
;;;(get-forth-interval-at-random '("Dm7" dor))
;;;(si mi la re so do fa +la)
;;;(get-forth-interval-at-random '("G7" all))
;;;(so fa +la +re +so +do si mi la re)
;;;
;;;
;;;(get-forth-interval-at-random-and-cut '("CM7" ion))--->(la mi si do)
;;;(get-forth-interval-at-random-and-cut-2 '("CM7" ion))--->(la)
;;;(get-forth-interval-at-random-and-cut-2 '("CM7" ion))--->(do so re)
;;;
;;;
;;;(chord-tone '("CM7" ion))--->(do mi so si)
;;;
;;;
;;;
;;;(print (get-elements-in-a-list-at-random '(do re mi fa so la si)))
;;;(fa si do do fa so re la fa mi mi)
;;;
;;;(print (get-elements-in-a-list-at-random '(do mi so si)))
;;;(si mi mi do so si mi do mi so si mi mi mi si mi mi mi mi do)
;;;
;;;(print (get-elements-in-a-list-at-random-2 '(do re mi fa so la si)))
;;;(si la re so fa so do do)
;;;
;;;(print (get-elements-in-a-list-at-random-2 '(do mi so si)))
;;;(mi si so so so mi so si mi so)
;;;
;;;
;;;
;;;
;;;
;;;(print (connect-lists '(do re mi fa so la si)))
;;;(si do re mi fa so la si do re mi fa so la si do re mi re do si la so fa mi re do si do re mi)
;;;
;;;(print (connect-lists '(do mi so si)))
;;;(mi so mi do mi so mi do si so mi do si so mi)
;;;
;;;(print (connect-lists-2 '(do re mi fa so la si)))
;;;(re mi fa mi re do si la so la so fa mi re do re mi fa mi re)
;;;
;;;(print (connect-lists-2 '(do mi so si)))
;;;(do si so mi do si so mi do mi so)
;;;
;;;
;;;
(defun make-two-part-1-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-2-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-3-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-1-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-2-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-3-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-1-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-2-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-3-UST (pair)
  (let* ((l1 (get-a-UST-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-3 l2)))
    (put-rythm-to-each-part l3)))


;;;
;;;(make-two-1-UST '(("CM7" ion) ("A7" hmp5) ("Dm7" dor) ("G7" alt) ("CM7" ion)))
;;;((("CM7" ion)
;;; ((part1 (so si mi so) **4beat (4 4 4.5 8) **3beat (8.5 16 8pause 8 4))
;;; (part2 (mi) **4beat (1) **3beat (2.5))))
;;; (("A7" hmp5) ((part1 (+fa) **4beat (1) **3beat (2.5)) (part2 (+la +la) **4beat (2.5 4) **3beat (4 2))))
;;; (("Dm7" dor)
;;; ((part1 (la do fa la) **4beat (4 4 4.5 8) **3beat (8pause 8 "3(8pause 8 8)" 8pause 8))
;;; (part2 (do la fa la) **4beat (4 8 8 2) **3beat (4 8pause 8 8.5 16))))
;;; (("G7" alt)
;;; ((part1 (so mi so) **4beat (4 4 2) **3beat (2 8 8)) (part2 (si mi) **4beat (2.5 4) **3beat (4 2))))
;;; (("CM7" ion)
;;; ((part1 (si mi) **4beat (2.5 4) **3beat (4 2)) (part2 (mi so si) **4beat (8 8 2.5) **3beat (4 4.5 8)))))
;;;
(defun make-two-1-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-1-UST l)) w))))


(defun make-two-2-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-2-UST l)) w))))


(defun make-two-3-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-3-UST l)) w))))


(defun make-three-1-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-1-UST l)) w))))


(defun make-three-2-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-2-UST l)) w))))

(defun make-three-3-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-3-UST l)) w))))


(defun make-four-1-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-1-UST l)) w))))


(defun make-four-2-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-2-UST l)) w))))


(defun make-four-3-UST (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-3-UST l)) w))))


;;;
;;;
;;;
(defun make-two-part-1-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-2-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-3-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-1-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-2-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-3-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-1-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-2-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-3-lhv (pair)
  (let* ((l1 (get-a-lhv-at-random-from-pair pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-3 l2)))
    (put-rythm-to-each-part l3)))


;;;
;;;(make-two-1-lhv '(("CM7" ion) ("A7" hmp5) ("Dm7" dor) ("G7" alt) ("CM7" ion)))
;;;((("CM7" ion)
;;; ((part1 (si) **4beat (1) **3beat (2.5)) (part2 (mi so mi mi) **4beat (4 4 4.5 8) **3beat (4 8 8 4))))
;;; (("A7" hmp5)
;;; ((part1 (so +fa si) **4beat (2 4 4) **3beat (8 8 2))
;;; (part2 (si si so) **4beat (8 8 2.5) **3beat (4 4.5 8))))
;;; (("Dm7" dor)
;;; ((part1 (fa fa mi) **4beat (4 2 4) **3beat (8 8 2)) (part2 (mi la fa) **4beat (2 4.5 8) **3beat (8 8 2))))
;;; (("G7" alt) ((part1 (la) **4beat (1) **3beat (2.5)) (part2 (fa) **4beat (1) **3beat (2.5))))
;;; (("CM7" ion)
;;; ((part1 (re so so re) **4beat (4 4 4 4) **3beat ("3(8pause 8 8)" "3(8pause 8pause 8)" 8pause 8))
;;; (part2 (la so) **4beat (4 2.5) **3beat (4 2)))))
;;;
(defun make-two-1-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-1-lhv l)) w))))


(defun make-two-2-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-2-lhv l)) w))))


(defun make-two-3-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-3-lhv l)) w))))


(defun make-three-1-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-1-lhv l)) w))))


(defun make-three-2-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-2-lhv l)) w))))

(defun make-three-3-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-3-lhv l)) w))))


(defun make-four-1-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-1-lhv l)) w))))


(defun make-four-2-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-2-lhv l)) w))))


(defun make-four-3-lhv (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-3-lhv l)) w))))


;;;
;;;
;;;
(defun make-two-part-1-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-2-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-3-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-1-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-2-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-3-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-1-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-2-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-3-pt (pair)
  (let* ((l1 (get-a-pt-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-3 l2)))
    (put-rythm-to-each-part l3)))


;;;
;;;(make-two-1-pt '(("CM7" ion) ("A7" hmp5) ("Dm7" dor) ("G7" alt) ("CM7" ion)))
;;;((("CM7" ion)
;;; ((part1 (la so mi re) **4beat (2 8 8 4) **3beat (8.5 16 4 8pause 8))
;;; (part2 (do) **4beat (1) **3beat (2.5))))
;;; (("A7" hmp5)
;;; ((part1 (re mi mi) **4beat (4 4 2) **3beat (4 4.5 8))
;;; (part2 (si so re si) **4beat (4.5 8 4 4) **3beat (8pause 8 "3(8pause 8 8)" 8pause 8))))
;;; (("Dm7" dor)
;;; ((part1 (do so fa ) **4beat (2 4 4) **3beat (8 8 2))
;;; (part2 (la la do) **4beat (4.5 8 2) **3beat (4.5 8 4))))
;;; (("G7" alt) ((part1 (re la) **4beat (2.5 4) **3beat (2 4)) (part2 (fa) **4beat (1) **3beat (2.5))))
;;; (("CM7" ion)
;;; ((part1 (si la re) **4beat (4 4 2) **3beat (8 8 2)) (part2 (re mi so) **4beat (2 4 4) **3beat (4 4 4)))))
;;;
;;;
(defun make-two-1-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-1-pt l)) w))))


(defun make-two-2-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-2-pt l)) w))))


(defun make-two-3-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-3-pt l)) w))))


(defun make-three-1-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-1-pt l)) w))))


(defun make-three-2-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-2-pt l)) w))))

(defun make-three-3-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-3-pt l)) w))))


(defun make-four-1-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-1-pt l)) w))))


(defun make-four-2-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-2-pt l)) w))))


(defun make-four-3-pt (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-3-pt l)) w))))


;;;
;;;
;;;
(defun make-two-part-1-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-2-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-3-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-1-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-2-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-3-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-1-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-2-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-3-4th (pair)
  (let* ((l1 (get-forth-interval-at-random pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-3 l2)))
    (put-rythm-to-each-part l3)))


;;;
;;;(make-two-1-4th '(("CM7" ion) ("A7" hmp5) ("Dm7" dor) ("G7" alt) ("CM7" ion)))
;;;((("CM7" ion)
;;; ((part1 (mi la re) **4beat (2 4 4) **3beat (4 4.5 8))
;;; (part2 (si so re la) **4beat (8 8 2 4) **3beat (8pause 8 "3(8pause 8pause 8)" 8 8))))
;;; (("A7" hmp5) ((part1 (+re si) **4beat (2 2) **3beat (4 2)) (part2 (+fa) **4beat (1) **3beat (2.5))))
;;; (("Dm7" dor) ((part1 (+la) **4beat (1) **3beat (2.5)) (part2 (fa +la) **4beat (4 2.5) **3beat (4 2))))
;;; (("G7" alt)
;;; ((part1 (mi la fa) **4beat (4 4 2) **3beat (4 4 4))
;;; (part2 (re so +la) **4beat (8 8 2.5) **3beat (8 8 2))))
;;; (("CM7" ion)
;;; ((part1 (si do so so) **4beat (4 4 4.5 8) **3beat ("3(8pause 8 8)" 4 4))
;;; (part2 (re si si so) **4beat (4 4.5 4 8) **3beat (4 "3(8pause 8 8)" 4)))))
;;;
;;;
(defun make-two-1-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-1-4th l)) w))))


(defun make-two-2-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-2-4th l)) w))))


(defun make-two-3-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-3-4th l)) w))))


(defun make-three-1-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-1-4th l)) w))))


(defun make-three-2-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-2-4th l)) w))))

(defun make-three-3-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-3-4th l)) w))))


(defun make-four-1-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-1-4th l)) w))))


(defun make-four-2-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-2-4th l)) w))))


(defun make-four-3-4th (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-3-4th l)) w))))


;;;
;;;
;;;
(defun make-two-part-1-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-2-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-two-part-3-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-two-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-1-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-2-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-three-part-3-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-three-parts-3 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-1-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-1 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-2-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-2 l2)))
    (put-rythm-to-each-part l3)))


(defun make-four-part-3-chord (pair)
  (let* ((l1 (chord-tone pair))
      (l2 (remove (car (avoid-note pair)) (connect-lists-for-c-point l1)))
      (l3 (divide-a-list-into-four-parts-3 l2)))
    (put-rythm-to-each-part l3)))



;;;
;;;(make-two-1-chord '(("CM7" ion) ("A7" hmp5) ("Dm7" dor) ("G7" alt) ("CM7" ion)))
;;;((("CM7" ion)
;;; ((part1 (so mi) **4beat (4 2.5) **3beat (4 2))
;;; (part2 (si so mi do) **4beat (2 4 8 8) **3beat (4 4 8.5 16))))
;;; (("A7" hmp5)
;;; ((part1 (so la so) **4beat (8 8 2.5) **3beat (4 4.5 8)) (part2 (la mi) **4beat (2.5 4) **3beat (4 2))))
;;; (("Dm7" dor) ((part1 (fa la) **4beat (2.5 4) **3beat (2 4)) (part2 (re) **4beat (1) **3beat (2.5))))
;;; (("G7" alt)
;;; ((part1 (so si re) **4beat (8 8 2.5) **3beat (8 8 2))
;;; (part2 (fa so si) **4beat (2 4.5 8) **3beat (4 4 4))))
;;; (("CM7" ion)
;;; ((part1 (do si so si) **4beat (2 8 8 4) **3beat (8.5 16 4 4))
;;; (part2 (si do mi) **4beat (2 4.5 8) **3beat (4.5 8 4)))))
;;;
(defun make-two-1-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-1-chord l)) w))))


(defun make-two-2-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-2-chord l)) w))))


(defun make-two-3-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-two-part-3-chord l)) w))))


(defun make-three-1-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-1-chord l)) w))))


(defun make-three-2-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-2-chord l)) w))))

(defun make-three-3-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-three-part-3-chord l)) w))))


(defun make-four-1-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-1-chord l)) w))))


(defun make-four-2-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-2-chord l)) w))))


(defun make-four-3-chord (pairs)
  (do ((lst pairs (cdr lst))
     (w))
     ((null lst) (reverse w))
   (let ((l (car lst)))
    (push (list l (make-four-part-3-chord l)) w))))