;;;
;;; (load "c:\\program files\\acl62\\music70.cl")
;;;
(load "c:\\program files\\acl62\\music69.cl")

(load "c:\\program files\\acl62\\work1.cl")


;;;
;;;(auto-comp-one-original *w3*)     (get-a-phrase-one-2-aux pair)     music62.cl
;;;(auto-comp-two-original *w3*)     (get-a-phrase-two-2-aux pair)     music62.cl
;;;(auto-comp-one-div2 *w3*)       (get-a-phrase-one-2-aux-div2 pair)  music69.cl
;;;(auto-comp-two-div2 *w3*)       (get-a-phrase-two-2-aux-div2 pair)  music69.cl
;;;(auto-comp-one-div3 *w3*)       (get-a-phrase-one-2-aux-div3 pair)  music69.cl
;;;(auto-comp-two-div3 *w3*)       (get-a-phrase-two-2-aux-div3 pair)  music69.cl
;;;(auto-comp-one-div4 *w3*)       (get-a-phrase-one-2-aux-div4 pair)  music69.cl
;;;(auto-comp-two-div4 *w3*)       (get-a-phrase-two-2-aux-div4 pair)  music69.cl
;;;(auto-comp-one-pt *w3*)        (get-a-phrase-one-2-aux-pt pair)    music63.cl
;;;(auto-comp-two-pt *w3*)        (get-a-phrase-two-2-aux-pt pair)    music63.cl
;;;(auto-comp-one-4th *w3*)       (get-a-phrase-one-2-aux-4th pair)   music64.cl
;;;(auto-comp-two-4th *w3*)       (get-a-phrase-two-2-aux-4th pair)   music64.cl
;;;(auto-comp-one-UST *w3*)      (get-a-phrase-one-2-aux-UST pair)   music65.cl
;;;(auto-comp-two-UST *w3*)      (get-a-phrase-two-2-aux-UST pair)   music65.cl
;;;(auto-comp-one-chord *w3*)     (get-a-phrase-one-2-aux-chord pair)   music67.cl
;;;(auto-comp-two-chord *w3*)     (get-a-phrase-two-2-aux-chord pair)   music67.cl
;;;(auto-comp-one-lhv *w3*)       (get-a-phrase-one-2-aux-lhv pair)    music66.cl
;;;(auto-comp-two-lhv *w3*)       (get-a-phrase-two-2-aux-lhv pair)    music66.cl
;;;(auto-comp-one-3-7 *w3*)      (get-a-phrase-one-2-aux-3-7 pair)    music68.cl
;;;(auto-comp-two-3-7 *w3*)      (get-a-phrase-two-2-aux-3-7 pair)   music68.cl
;;;(auto-comp-one-7 *w3*)        (get-a-phrase-one-2-aux-7 pair)     music68.cl
;;;(auto-comp-two-7 *w3*)        (get-a-phrase-two-2-aux-7 pair)     music68.cl
;;;(auto-comp2-second *w3*)       (make-a-phrase-1-2-aux pair)       music19.cl
;;;(auto-comp2-third *w3*)         (make-a-phrase-1-2-aux-third pair)   music19.cl
;;;(auto-comp3-2 *w3)           (make-a-phrase-2-2-aux pair)       music20.cl
;;;(auto-comp3-3 *3*)           (make-a-phrase-2-2-forth-aux pair)   music20.cl
;;;(make-ballad *w3*)            (make-a-phrase-for-ballad pair)       music22.cl
;;;(make-ballad-2 *3*)           (make-a-phrase-for-ballad-second pair)  music22.cl
;;;(make-song *w3*)            (make-a-phrase-for-song-1 pair)      music23.cl
;;;(make-song-2 *w*)           (make-a-phrase-for-song-2 pair)      music23.cl
;;;(auto-comp-one-chromatic *w3*)  (get-a-phrase-one-2-aux-chromatic pair) music71.cl
;;;(auto-comp-two-chromatic *w3*) (get-a-phrase-two-2-aux-chromatic pair) music71.cl
;;;
;;;
;;;
;;;(make-waltz *w3)             (make-a-phrase-for-waltz pair)        music21.cl
;;;(make-waltz-2 *w3*)          (make-a-phrase-for-waltz-second pair)   music21.cl
;;;
;;;
;;;
;;;(auto-comp-for-left-hand *w3*)(show-lhvs-at-random-for-autocomp-aux-2 pair) music55.cl
;;;
;;;
;;;
;;;(auto-comp-tow-part-one *w3*) (put-rythm-to-two-parts-one pair) music60.cl
;;;(auto-comp-two-part-two *w3*) (put-rythm-to-two-parts-two pair) music60.cl
;;;(auto-comp-three-part-one *w3*) (put-rythm-to-three-parts-one pair) music60.cl
;;;(auto-comp-three-part-two *w3*) (put-rythm-to-three-parts-two pair) music60.cl
;;;(auto-comp-four-part-one *w3*) (put-rythm-to-four-parts-one pair) music60.cl
;;;(auto-comp-four-part-two *w3*) (put-rythm-to-four-parts-two pair) music60.cl
;;;
;;;
;;;
;;;
;;;cg-user(3): (get-a-phrase-one-2-aux '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) so fa mi re) (("G7" alt) +re fa so +so)) ***4beat*** (8 16 16 8 16 16 4 4) ***3beat***
;;; (16 16 8 4 16 16 16 16))

;;;cg-user(4): (get-a-phrase-two-2-aux '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa mi) (("G7" alt) +do)) ***4beat*** (2.5 8 8) ***3beat*** (4 4.5 8))

;;;cg-user(5): (get-a-phrase-one-2-aux-div2 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) mi fa so re do) (("G7" alt) +la +so fa +re)) ***4beat*** (8 16 16 4 16 16 16 16 4)
;;; ***3beat*** (16 16 8 8 16 16 8 16 16))

;;;cg-user(6): (get-a-phrase-two-2-aux-div2 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) mi fa so) (("G7" alt) +do fa)) ***4beat*** (4 8 8 4 4) ***3beat***
;;; ("3(8pause 8pause 8)" 8pause 8 "3(8 8 8)"))

;;;cg-user(7): (get-a-phrase-one-2-aux-div3 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) mi so mi mi) (("G7" alt) +re fa)) ***4beat*** (4 4 "3(8 8 8)" 4) ***3beat***
;;; ("3(8pause 8pause 8)" 16 16 16 16 "3(8pause 8pause 8)"))

;;;cg-user(8): (get-a-phrase-two-2-aux-div3 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa la) (("G7" alt) so)) ***4beat*** (8 8 2.5) ***3beat*** (2 8 8))

;;;cg-user(9): (get-a-phrase-one-2-aux-div4 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) la mi) (("G7" alt) so fa +so +la +re)) ***4beat***
;;; ("3(8pause 8 8)" 8.5 16 "3(8pause 8pause 8)" 8 8) ***3beat*** (16 16 8 16 16 8 4))

;;;cg-user(10): (get-a-phrase-two-2-aux-div4 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa so fa) (("G7" alt) so fa +so +re)) ***4beat*** ("3(8pause 8 8)" 4 4 8 16 16) ***3beat***
;;; (4 16 16 8 8 16 16))

;;;cg-user(11): (get-a-phrase-one-2-aux-pt '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) la so) (("G7" alt) -re -si -la fa)) ***4beat*** (4 8pause 8 8pause 8 8 16 16) ***3beat***
;;; (4 8 8 8 16 16))

;;;cg-user(12): (get-a-phrase-two-2-aux-pt '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) so) (("G7" alt) fa)) ***4beat*** (4 2.5) ***3beat*** (4 2))

;;;cg-user(13): (get-a-phrase-one-2-aux-4th '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) la mi +la fa) (("G7" alt) re so)) ***4beat*** (4 8.5 16 4 8 8) ***3beat***
;;; ("3(8pause 8pause 8)" 16 16 16 16 "3(8pause 8pause 8)"))

;;;cg-user(14): (get-a-phrase-two-2-aux-4th '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) so re so do) (("G7" alt) +do +so)) ***4beat*** (4 4 4 16pause 16 16 16) ***3beat***
;;; (4 "3(8pause 8 8)" 8 16 16))

;;;cg-user(15): (get-a-phrase-one-2-aux-UST '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) la fa do) (("G7" alt) mi si)) ***4beat*** (4 8pause 8 4 "3(8pause 8 8)") ***3beat***
;;; (8pause 8 4 "3(8 8 8)"))

;;;cg-user(16): (get-a-phrase-two-2-aux-UST '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) +do la mi +do) (("G7" alt) -si -mi -si)) ***4beat*** (4 8 8 "3(8 8 8)" 4) ***3beat***
;;; (16 16 8 16 16 8 8pause 8))

;;;cg-user(17): (get-a-phrase-one-2-aux-chord '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa re do) (("G7" alt) re fa so si)) ***4beat*** (8 8 8.5 16 8.5 16 8pause 8) ***3beat***
;;; (4 16 16 8 "3(8 8 8)"))

;;;cg-user(18): (get-a-phrase-two-2-aux-chord '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) do) (("G7" alt) so si re)) ***4beat*** (4 4.5 4 8) ***3beat*** (4 4 "3(8pause 8 8)"))

;;;cg-user(19): (get-a-phrase-one-2-aux-lhv '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) la) (("G7" alt) mi si)) ***4beat*** (8 8 2.5) ***3beat*** (2 8 8))

;;;cg-user(20): (get-a-phrase-two-2-aux-lhv '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) re do) (("G7" alt) la si la)) ***4beat*** (4 8.5 16 4 4) ***3beat***
;;; ("3(8pause 8pause 8)" 8 8 8 8))

;;;cg-user(21): (get-a-phrase-one-2-aux-3-7 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) mi mi so mi mi so) (("G7" alt) +do +do +re +do)) ***4beat*** (8 16 16 8.5 16 8 16 16 8 8)
;;; ***3beat*** (16 16 16 16 16 16 8 8 16 16))

;;;cg-user(22): (get-a-phrase-two-2-aux-3-7 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) mi mi so so) (("G7" alt) +so)) ***4beat*** (4 4 8 8 4) ***3beat*** (8pause 8 4 16 16 8))

;;;cg-user(23): (get-a-phrase-one-2-aux-7 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) so) (("G7" alt) +re +la +do +do)) ***4beat*** (8pause 8 "3(8pause 8 8)" 4 4) ***3beat***
;;; (4 8.5 16 "3(8pause 8 8)"))

;;;cg-user(24): (get-a-phrase-two-2-aux-7 '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) so do do so) (("G7" alt) +la fa)) ***4beat***
;;; (16pause 16 16 16 "3(8pause 8pause 8)" 8pause 8 4) ***3beat*** (8pause 8 16 16 8 8.5 16))

;;;cg-user(25): (make-a-phrase-1-2-aux '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa do) (("G7" alt) fa si)) ***3beat*** (4 8.5 16 "3(8pause 8pause 8)") ***4beat***
;;; (4 4.5 4 8))

;;;cg-user(26): (make-a-phrase-1-2-aux-third '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) do so fa) (("G7" alt) +do si)) ***3beat*** ("3(8 8 8)" "3(8pause 8pause 8)" 8pause 8)
;;; ***4beat*** (4 4 4 "3(8pause 8 8)"))

;;;cg-user(27): (make-a-phrase-2-2-aux '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa fa so fa) (("G7" alt) si)) ***3beat*** (4 16 16 8 "3(8pause 8pause 8)") ***4beat***
;;; ("3(8pause 8pause 8)" 8.5 16 4 4))

;;;cg-user(28): (make-a-phrase-2-2-forth-aux '("Dm7" dor "G7" alt))
;;;(((("Dm7" dor) fa) (("G7" alt) +so +la si)) ***3beat*** ("3(8pause 8pause 8)" 4 8 8) ***4beat*** (4 8 8 2))

;;;cg-user(31): (make-a-phrase-for-song-1 '("Dm7" dor "G7" alt))
;;;(***waltz*** ((("Dm7" dor) do fa do ("G7" alt) +do fa) (3beat (8pause 8 "3(8 8 8)" 4))) ***ballad***
;;; ((("Dm7" dor) fa ("G7" alt) fa +do fa) (4beat (2 4 8 8))))

;;;cg-user(32): (make-a-phrase-for-song-2 '("Dm7" dor "G7" alt))
;;;(***waltz*** ((("Dm7" dor) do ("G7" alt) +so +la) (3beat (4.5 8 4))) ***ballad***
;;; ((("Dm7" dor) mi fa ("G7" alt) +re fa) (4beat (4 8 8 2))))

;;;cg-user(42): (make-phrase-for-ballad-and-waltz '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) do fa ("G7" alt) +re re +la) (4beat (4 8.5 16 8pause 8 8pause 8))) ***ex2***
;;; ((("Dm7" dor) fa do ("G7" alt) +la si) (4beat (2 4 8 8))) ***ex1***
;;; ((("Dm7" dor) fa ("G7" alt) fa) (3beat (4 2))) ***ex2*** ((("Dm7" dor) mi ("G7" alt) fa) (3beat (4 2))))

;;;cg-user(43): (make-phrase-for-ballad-and-waltz-2 '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) do ("G7" alt) +la +so) (4beat (2 4.5 8))) ***ex2***
;;; ((("Dm7" dor) do ("G7" alt) +so) (4beat (4 2.5))) ***ex1***
;;; ((("Dm7" dor) do fa ("G7" alt) si) (3beat (8 8 2))) ***ex2***
;;; ((("Dm7" dor) so fa ("G7" alt) +la) (3beat (2 8 8))))



;;;cg-user(29): (make-a-phrase-for-ballad '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) so fa mi ("G7" alt) +so so si +so) (4beat ("3(8pause 8pause 8)" 16 16 16 16 4 4)))
;;; ***ex2*** ((("Dm7" dor) mi ("G7" alt) +la) (4beat (2 2))))

;;;cg-user(30): (make-a-phrase-for-ballad-second '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) fa ("G7" alt) fa) (4beat (2.5 4))) ***ex2***
;;; ((("Dm7" dor) so ("G7" alt) +re) (4beat (2.5 4))))

;;;cg-user(33): (make-a-phrase-for-waltz '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) so fa ("G7" alt) +re) (3beat (4.5 8 4))) ***ex2***
;;; ((("Dm7" dor) so fa ("G7" alt) +la) (3beat (8 8 2))))

;;;cg-user(34): (make-a-phrase-for-waltz-second '("Dm7" dor "G7" alt))
;;;(***ex1*** ((("Dm7" dor) do ("G7" alt) +so) (3beat (4 2))) ***ex2***
;;; ((("Dm7" dor) fa ("G7" alt) +do) (3beat (4 2)))



;;;cg-user(35): (put-rythm-to-two-parts-one '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (re mi)) (part2 (do re re do))) ((G7 alt) (part1 (si +la +so fa)) (part2 (so fa))))
;;; part1 **4beat** (8pause 8 4 4 3(8 8 8)) **3beat** (8pause 8 4 16 16 16 16) part2 **4beat**
;;; (4 4 8.5 16 3(8pause 8 8)) **3beat** (3(8pause 8pause 8) 16 16 16 16 3(8pause 8pause 8)))
;;;nil
;;;cg-user(36): (put-rythm-to-two-parts-two '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (fa)) (part2 (fa re do))) ((G7 alt) (part1 (+re +do si so)) (part2 (+la)))) part1
;;; **4beat** (4 3(8pause 8pause 8) 4 8 8) **3beat** (4 8 8 8.5 16) part2 **4beat** (8 8 2 4) **3beat**
;;; (4 4 8.5 16))
;;;nil
;;;cg-user(37): (put-rythm-to-three-parts-one '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (re)) (part2 (do fa mi )) (part3 (fa so mi fa)))
;;; ((G7 alt) (part1 (so +la si +do +re so)) (part2 (+do +la +so so fa +la)) (part3 (fa))))
;;; part1 **4beat** (4 8.5 16 8pause 8 3(8 8 8)) **3beat** (4 8 8 16 16 16 16) part2 **4beat**
;;; (3(8 8 8) 8.5 16 3(8 8 8) 3(8pause 8pause 8)) **3beat** (3(8 8 8) 8 16 16 8 16 16) part3 **4beat**
;;; (4 8.5 16 4 4) **3beat** (8 8 8 8 8pause 8))
;;;nil
;;;cg-user(38): (put-rythm-to-three-parts-two '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (so mi la so)) (part2 (la mi)) (part3 (do)))
;;; ((G7 alt) (part1 (+do fa +la si)) (part2 (+la si)) (part3 (+re fa so +so))))
;;; part1 **4beat** (3(8 8 8) 3(8pause 8 8) 4 8 8) **3beat** (16 16 16 16 3(8pause 8pause 8) 16 16 8) part2
;;; **4beat** (4 4 4.5 8) **3beat** (8.5 16 3(8pause 8pause 8) 4) part3 **4beat** (8.5 16 4 4 4) **3beat**
;;; (8 8 8pause 8 3(8pause 8 8)))
;;;nil
;;;cg-user(39): (put-rythm-to-four-parts-one '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (re la fa mi so)) (part2 (re do mi so)) (part3 (la re mi fa so la))
;;; (part4 (do mi re fa mi re)))
;;; ((G7 alt) (part1 (so +la +la so +la +do)) (part2 (+so so +so so)) (part3 (+so +so si fa +la +la))
;;; (part4 (fa +re fa si +do))))
;;; part1 **4beat** (16pause 16 16 16 16pause 16 16 16 16pause 16 16 16 8 8) **3beat**
;;; (16 16 16 16 16 16 16 16 8 16 16) part2 **4beat** (8pause 8 8.5 16 8 16 16 3(8pause 8 8)) **3beat**
;;; (16 16 16 16 8.5 16 3(8pause 8 8)) part3 **4beat** (16 16 16 16 3(8 8 8) 4 16 16 16 16) **3beat**
;;; (16 16 16 16 16 16 16 16 16 16 16 16) part4 **4beat** (8 8 3(8 8 8) 16 16 16 16 8 8) **3beat**
;;; (3(8pause 8 8) 4 16 16 16 16 16 16 16 16))
;;;nil
;;;cg-user(40): (put-rythm-to-four-parts-two '("Dm7" dor "G7" alt))
;;;
;;;((((Dm7 dor) (part1 (mi)) (part2 (fa re do)) (part3 (la so mi)) (part4 (mi la)))
;;; ((G7 alt) (part1 (+do)) (part2 (si +so +do)) (part3 (so)) (part4 (+re))))
;;; part1 **4beat** (4 2.5) **3beat** (2 4) part2 **4beat** (8 8 4 4 8 8) **3beat** (8.5 16 8 16 16 4) part3
;;; **4beat** (4 8 8 2) **3beat** (8pause 8 8.5 16 4) part4 **4beat** (2 4 4) **3beat** (4 4 2))
;;;nil
;;;
;;;
;;;
;;;(defun get-a-phrase-at-random-aux (pair)
;;;   (case (random 4)
;;;     (0 (get-elements-of-melody-at-random pair))
;;;     (1 (make-a-phrase-with-UST-at-random pair))
;;;     (2 (make-a-phrase-with-scale-from-tension pair))
;;;     (3 (make-a-phrase-with-scale-from-elm pair))))
;;;


(defun make-phrase-for-ballad-and-waltz (pair)
  (append (make-a-phrase-for-ballad pair) (make-a-phrase-for-waltz pair)))

(defun make-phrase-for-ballad-and-waltz-2 (pair)
  (append (make-a-phrase-for-ballad-second pair) (make-a-phrase-for-waltz-second pair)))


(defun choose-a-phrase-one (pair)
  (case (random 16)
    (0 (list 'scale-1 (get-a-phrase-one-2-aux pair)))
    (1 (list 'scale-2 (get-a-phrase-one-2-aux-div2 pair)))
    (2 (list 'scale-3 (get-a-phrase-one-2-aux-div3 pair)))
    (3 (list 'scale-4 (get-a-phrase-one-2-aux-div4 pair)))
    (4 (list 'pt (get-a-phrase-one-2-aux-pt pair)))
    (5 (list '4th (get-a-phrase-one-2-aux-4th pair)))
    (6 (list 'UST (get-a-phrase-one-2-aux-UST pair)))
    (7 (list 'chord (get-a-phrase-one-2-aux-chord pair)))
    (8 (list 'lhv (get-a-phrase-one-2-aux-lhv pair)))
    (9 (list '37th (get-a-phrase-one-2-aux-3-7 pair)))
    (10 (list '7th (get-a-phrase-one-2-aux-7 pair)))
    (11 (list 'comp2 (make-a-phrase-1-2-aux pair)))
    (12 (list 'comp3 (make-a-phrase-2-2-aux pair)))
    (13 (list 'song (make-a-phrase-for-song-1 pair)))
    (14 (list 'ballad-waltz (make-phrase-for-ballad-and-waltz pair)))
    (15 (list 'chromatic (get-a-phrase-one-2-aux-chromatic pair)))))

(defun choose-a-phrase-two (pair)
  (case (random 16)
    (0 (list 'scale-1 (get-a-phrase-two-2-aux pair)))
    (1 (list 'scale-2 (get-a-phrase-two-2-aux-div2 pair)))
    (2 (list 'scale-3 (get-a-phrase-two-2-aux-div3 pair)))
    (3 (list 'scale-4 (get-a-phrase-two-2-aux-div4 pair)))
    (4 (list 'pt (get-a-phrase-two-2-aux-pt pair)))
    (5 (list '4th (get-a-phrase-two-2-aux-4th pair)))
    (6 (list 'UST (get-a-phrase-two-2-aux-UST pair)))
    (7 (list 'chord (get-a-phrase-two-2-aux-chord pair)))
    (8 (list 'lhv (get-a-phrase-two-2-aux-lhv pair)))
    (9 (list '37th (get-a-phrase-two-2-aux-3-7 pair)))
    (10 (list '7th (get-a-phrase-two-2-aux-7 pair)))
    (11 (list 'comp2 (make-a-phrase-1-2-aux-third pair)))
    (12 (list 'comp3 (make-a-phrase-2-2-forth-aux pair)))
    (13 (list 'song (make-a-phrase-for-song-2 pair)))
    (14 (list 'ballad-waltz (make-phrase-for-ballad-and-waltz-2 pair)))
    (15 (list 'chromatic (get-a-phrase-one-2-aux-chromatic pair)))))

;;;
;;;cg-user(49): (choose-phrases-one '(("CM7" ion "A7" hmp5) ("Dm7" dor "G7" alt) ("CM7" ion)))
;;;
;;;(lhv
;;; ((((CM7 ion) mi re) ((A7 hmp5) +fa so +la so +fa +fa)) ***4beat*** (8 16 16 8pause 8 16pause 16 16 16 4)
;;; ***3beat*** (16 16 16 16 4 3(8 8 8))))
;;;(ballad-waltz
;;; (***ex1*** (((Dm7 dor) mi fa (G7 alt) +do) (4beat (4.5 8 2))) ***ex2***
;;; (((Dm7 dor) do fa (G7 alt) +re) (4beat (2 4 4))) ***ex1*** (((Dm7 dor) so (G7 alt) +la) (3beat (2 4)))
;;; ***ex2*** (((Dm7 dor) mi re (G7 alt) si) (3beat (4.5 8 4)))))
;;;(scale-1
;;; ((((CM7 ion) mi re do si la)) ***4beat*** (8.5 16 4 4 3(8pause 8pause 8)) ***3beat***
;;; (16 16 8 8pause 8 3(8pause 8pause 8))))
;;;nil
;;;cg-user(50): (choose-phrases-two '(("CM7" ion "A7" hmp5) ("Dm7" dor "G7" alt) ("CM7" ion)))
;;;
;;;(scale-4
;;; ((((CM7 ion) do si re) ((A7 hmp5) do do)) ***4beat*** (4 4 8 8 4) ***3beat***
;;; (16 16 8 3(8pause 8pause 8) 4)))
;;;(lhv
;;; ((((Dm7 dor) fa la do la fa la) ((G7 alt) +re fa +so si +so)) ***4beat***
;;; (8 16 16 16pause 16 16 16 3(8 8 8) 3(8pause 8 8)) ***3beat*** (16 16 16 16 16 16 16 16 3(8 8 8))))
;;;(comp3 ((((CM7 ion) mi re mi)) ***3beat*** (2 8 8) ***4beat*** (8 8 2.5)))
;;;nil
;;;

(defun choose-phrases-one (l)
  (do ((lst l (cdr lst))
     (w))
     ((null lst))
   (let ((ll (choose-a-phrase-one (car lst))))
    (format t "~%~a" ll)
    (push ll w))))

(defun choose-phrases-two (l)
  (do ((lst l (cdr lst))
     (w))
     ((null lst))
   (let ((ll (choose-a-phrase-two (car lst))))
    (format t "~%~a" ll)
    (push ll w))))


;;;
;;;
;;;
(defun auto-comp-mix-one (wn)
  (tagbody
    (my-randomize)
    (format t "~%********** ~a ************" (second (first wn)))
    (format t "~%The original key is ~a." (first (first wn)))
    (format t "~%Enter a key.")
    loop1
    (setf l1 (read-sentence))
    (if (not (key-p (car l1)))
      (go loop1))
    (if (equal (car l1) (first (first wn)))
      (setf l2 (cdr wn))
     (setf l2 (modulate-key1-to-key2 (cdr wn) (first (first wn)) (car l1))))
    (format t "~%********* The key is ~a. **********" (car l1))
    ;(print l2)
    (choose-phrases-one l2)))


(defun auto-comp-mix-two (wn)
  (tagbody
    (my-randomize)
    (format t "~%********** ~a ************" (second (first wn)))
    (format t "~%The original key is ~a." (first (first wn)))
    (format t "~%Enter a key.")
    loop1
    (setf l1 (read-sentence))
    (if (not (key-p (car l1)))
      (go loop1))
    (if (equal (car l1) (first (first wn)))
      (setf l2 (cdr wn))
     (setf l2 (modulate-key1-to-key2 (cdr wn) (first (first wn)) (car l1))))
    (format t "~%********* The key is ~a. **********" (car l1))
    (choose-phrases-two l2)))




;;;cg-user(53): (auto-comp-mix-one *w3*)
;;;
;;; Enter an integer!
;;;783
;;;
;;;********** Dindi ************
;;;The original key is F.
;;;Enter a key.C
;;;
;;;********* The key is C. **********
;;;(scale-2
;;; ((((CM7 ion) si do re mi do si)) ***4beat*** (4 4 4 16pause 16 16 16) ***3beat***
;;; (16 16 16 16 8pause 8 8pause 8)))
;;;(comp3 ((((-BM7 lyd) la)) ***3beat*** (2.5) ***4beat*** (1)))
;;;(song
;;; (***waltz*** (((CM7 ion) mi si mi) (3beat (8 8 2))) ***ballad***
;;; (((CM7 ion) la mi mi mi si mi re) (4beat (4 4 8 8 3(8 8 8))))))
;;;(chord
;;; ((((Gm7 dor) so fa re) ((C7 alt) so mi do)) ***4beat*** (4 8 16 16 4 8pause 8) ***3beat***
;;; (4 3(8pause 8 8) 16 16 8)))
;;;(chord
;;; ((((FM7 lyd) fa mi do la fa mi fa la)) ***4beat*** (8.5 16 16 16 16 16 4 4) ***3beat***
;;; (4 16 16 8 16 16 16 16)))
;;;(scale-4
;;; ((((-B7 lyd-7) do so do re re fa)) ***4beat*** (4 4 4 8 16 16) ***3beat***
;;; (4 16 16 16 16 3(8pause 8pause 8))))
;;;(scale-4 ((((CM7 ion) si do re mi)) ***4beat*** (4 8 8 2) ***3beat*** (4 3(8pause 8 8) 4)))
;;;(lhv ((((-BM7 lyd) re)) ***4beat*** (1) ***3beat*** (2.5)))
;;;(scale-3
;;; ((((CM7 ion) si re mi la do mi re mi)) ***4beat*** (3(8pause 8pause 8) 8 16 16 8pause 8 16pause 16 16 16)
;;; ***3beat*** (8.5 16 16 16 16 16 8.5 16)))
;;;(song
;;; (***waltz*** (((-BM7 lyd) do do) (3beat (4 2))) ***ballad***
;;; (((-BM7 lyd) do so mi do re do mi) (4beat (4 3(8 8 8) 8pause 8 8.5 16)))))
;;;(37th ((((CM7 ion) si mi)) ***4beat*** (2 2) ***3beat*** (4 2)))
;;;(scale-3 ((((Gm7 dor) +la) ((C7 alt) -si)) ***4beat*** (2 2) ***3beat*** (2 4)))
;;;(scale-1
;;; ((((FM7 lyd) do si la so fa mi)) ***4beat*** (4 8pause 8 4 3(8 8 8)) ***3beat***
;;; (16 16 16 16 4 3(8pause 8pause 8))))
;;;(37th
;;; ((((-B7 lyd-7) re do re re so)) ***4beat*** (3(8pause 8pause 8) 8pause 8 8 8 4) ***3beat*** (8 16 16 4 4)))
;;;(scale-2 ((((CM7 ion) so mi do mi)) ***4beat*** (4 4 4.5 8) ***3beat*** (3(8pause 8 8) 4 4)))
;;;(pt ((((-Gm7-5 loc) +fa) ((B7 hmp5) mi +fa la si)) ***4beat*** (8 8 4 4 4) ***3beat*** (4 4 16 16 8)))
;;;(lhv ((((Em7 all) so)) ***4beat*** (1) ***3beat*** (2.5)))
;;;(comp3 ((((B7 hmp5) la so +fa)) ***3beat*** (8 8 2) ***4beat*** (4 2 4)))
;;;(scale-4
;;; ((((Em7 all) so mi) ((B7 hmp5) do si so si re)) ***4beat*** (3(8pause 8 8) 16pause 16 16 16 4 8pause 8)
;;; ***3beat*** (16 16 8 8 16 16 4)))
;;;(song
;;; (***waltz*** (((Em7 all) la (A7 alt) +re do +re) (3beat (3(8pause 8pause 8) 3(8pause 8pause 8) 8 8)))
;;; ***ballad*** (((Em7 all) re re la +fa (A7 alt) +la fa fa) (4beat (8 8 8 8 4 8 8)))))
;;;(comp3
;;; ((((Dm7 all) mi +re re mi fa so +fa fa do)) ***3beat*** (4 16 16 16 16 16 16 16 16) ***4beat***
;;; (4 16 16 16 16 3(8pause 8 8) 3(8pause 8 8))))
;;;(37th ((((A7 hmp5) +la)) ***4beat*** (1) ***3beat*** (2.5)))
;;;(scale-4
;;; ((((Dm7 all) mi +la +la) ((A7 hmp5) re)) ***4beat*** (4 8 8 2) ***3beat*** (4 8 8 3(8pause 8pause 8))))
;;;(comp3
;;; ((((Dm7 all) mi re) ((G7 alt) si fa +la +so so)) ***3beat*** (3(8 8 8) 8 8 8 8) ***4beat***
;;; (4 4 16 16 16 16 4)))
;;;(UST ((((CM7 ion) re +fa si +fa re)) ***4beat*** (4 4 4 3(8pause 8 8)) ***3beat*** (4 4 16 16 8)))
;;;(scale-3 ((((-BM7 lyd) mi re)) ***4beat*** (2 2) ***3beat*** (2 4)))
;;;(4th ((((CM7 ion) so do si mi)) ***4beat*** (8 8 2 4) ***3beat*** (3(8pause 8pause 8) 8pause 8 8.5 16)))
;;;(4th
;;; ((((Gm7 dor) +la) ((C7 alt) mi la re so do)) ***4beat*** (4 3(8pause 8 8) 3(8pause 8pause 8) 3(8pause 8 8))
;;; ***3beat*** (16 16 16 16 8pause 8 8pause 8)))
;;;(7th ((((FM7 lyd) si re re)) ***4beat*** (8 8 2.5) ***3beat*** (4 4 4)))
;;;(comp2
;;; ((((-B7 lyd-7) do re +so mi fa mi re)) ***3beat*** (4 16 16 16 16 8 8) ***4beat***
;;; (3(8pause 8 8) 4 3(8 8 8) 4)))
;;;(song (***waltz*** (((CM7 ion) la) (3beat (2.5))) ***ballad*** (((CM7 ion) la mi la) (4beat (2.5 8 8)))))
;;;(37th ((((-BM7 lyd) re re so)) ***4beat*** (2 4.5 8) ***3beat*** (4 4.5 8)))
;;;(ballad-waltz
;;; (***ex1*** (((CM7 ion) la si) (4beat (2.5 4))) ***ex2*** (((CM7 ion) la so) (4beat (2.5 4))) ***ex1***
;;; (((CM7 ion) la) (3beat (2.5))) ***ex2*** (((CM7 ion) si si) (3beat (4 2)))))
;;;(4th ((((-BM7 lyd) mi la re)) ***4beat*** (4.5 8 2) ***3beat*** (4.5 8 4)))
;;;(comp2
;;; ((((CM7 ion) mi si la si si)) ***3beat*** (8pause 8 16 16 8 4) ***4beat***
;;; (8 8 4 8pause 8 3(8pause 8pause 8))))
;;;(scale-3
;;; ((((-BM7 lyd) mi -si do mi fa so fa)) ***4beat*** (3(8pause 8 8) 8.5 16 8 8 4) ***3beat***
;;; (3(8pause 8 8) 8 16 16 8 8)))
;;;(UST ((((CM7 ion) si mi)) ***4beat*** (2.5 4) ***3beat*** (4 2)))
;;;(scale-2 ((((CM7 ion) so re)) ***4beat*** (2.5 4) ***3beat*** (4 2)))
;;;(pt ((((-BM7 lyd) -si)) ***4beat*** (1) ***3beat*** (2.5)))
;;;(song (***waltz*** (((-BM7 lyd) re so re) (3beat (2 8 8))) ***ballad*** (((-BM7 lyd) la) (4beat (1)))))
;;;(ballad-waltz
;;; (***ex1*** (((AM7 ion) +so +fa mi) (4beat (4 4 2))) ***ex2*** (((AM7 ion) si +do) (4beat (4 2.5)))
;;; ***ex1*** (((AM7 ion) si) (3beat (2.5))) ***ex2*** (((AM7 ion) +so si) (3beat (4 2)))))
;;;(comp2
;;; ((((AM7 ion) +fa mi +fa +so +so +fa mi +do)) ***3beat*** (16 16 16 16 4 8 16 16) ***4beat***
;;; (16pause 16 16 16 3(8pause 8pause 8) 4 16pause 16 16 16)))
;;;(4th ((((AM7 ion) mi la +re)) ***4beat*** (2.5 8 8) ***3beat*** (4 4.5 8)))
;;;(UST ((((AM7 ion) +do +fa la +fa +do)) ***4beat*** (8.5 16 4 4 4) ***3beat*** (4 4 3(8 8 8))))
;;;nil
;;;cg-user(54): (auto-comp-mix-two *w3*)
;;;
;;; Enter an integer!
;;;5001
;;;
;;;********** Dindi ************
;;;The original key is F.
;;;Enter a key.C
;;;
;;;********* The key is C. **********
;;;(comp2
;;; ((((CM7 ion) mi la si mi mi mi si)) ***3beat*** (16 16 16 16 8.5 16 4) ***4beat*** (4 16 16 16 16 4 4)))
;;;(pt ((((-BM7 lyd) so la)) ***4beat*** (2 2) ***3beat*** (4 2)))
;;;(UST ((((CM7 ion) re +fa la)) ***4beat*** (8 8 2.5) ***3beat*** (4 4.5 8)))
;;;(scale-3
;;; ((((Gm7 dor) so la +la do so) ((C7 alt) do -si)) ***4beat*** (3(8pause 8 8) 4 8.5 16 8 8) ***3beat***
;;; (3(8 8 8) 16 16 8 4)))
;;;(pt ((((FM7 lyd) re mi re si la +fa)) ***4beat*** (4 4 16pause 16 16 16 4) ***3beat*** (4 16 16 16 16 4)))
;;;(scale-1 ((((-B7 lyd-7) -si do re mi)) ***4beat*** (8 8 2 4) ***3beat*** (4 8 8 4)))
;;;(scale-1 ((((CM7 ion) si)) ***4beat*** (1) ***3beat*** (2.5)))
;;;(lhv
;;; ((((-BM7 lyd) re fa so do re do so)) ***4beat*** (8.5 16 3(8pause 8 8) 4 3(8pause 8 8)) ***3beat***
;;; (16 16 8 3(8 8 8) 8pause 8)))
;;;(UST ((((CM7 ion) mi do mi do)) ***4beat*** (4 8 8 2) ***3beat*** (4 4 8.5 16)))
;;;(37th ((((-BM7 lyd) so re)) ***4beat*** (4 2.5) ***3beat*** (2 4)))
;;;(ballad-waltz
;;; (***ex1*** (((CM7 ion) mi mi) (4beat (2.5 4))) ***ex2*** (((CM7 ion) si mi) (4beat (4 2.5))) ***ex1***
;;; (((CM7 ion) re mi) (3beat (4 2))) ***ex2*** (((CM7 ion) re) (3beat (2.5)))))
;;;(lhv
;;; ((((Gm7 dor) +la fa +la la fa +la) ((C7 alt) +la +do)) ***4beat*** (16 16 16 16 8pause 8 4 3(8pause 8 8))
;;; ***3beat*** (3(8pause 8 8) 16 16 16 16 3(8pause 8 8))))
;;;(4th ((((FM7 lyd) la mi si mi)) ***4beat*** (2 8 8 4) ***3beat*** (4 8 8 4)))
;;;(song
;;; (***waltz*** (((-B7 lyd-7) do +so) (3beat (4 2))) ***ballad***
;;; (((-B7 lyd-7) mi mi re mi re so do +so) (4beat (8pause 8 16pause 16 16 16 8pause 8 16pause 16 16 16)))))
;;;(scale-2
;;; ((((CM7 ion) re re do la do re do si)) ***4beat*** (8 16 16 4 4 8 16 16) ***3beat***
;;; (8 16 16 16 16 8 8.5 16)))
;;;(4th
;;; ((((-Gm7-5 loc) do si mi la) ((B7 hmp5) fa do so re)) ***4beat*** (4 16pause 16 16 16 3(8pause 8 8) 8.5 16)
;;; ***3beat*** (16 16 16 16 8pause 8 3(8 8 8))))
;;;(UST ((((Em7 all) re +fa re la re +fa re +fa)) ***4beat*** (3(8pause 8 8) 16pause 16 16 16 3(8pause 8 8) 4)
;;; ***3beat*** (4 16 16 8 16 16 16 16)))
;;;(ballad-waltz
;;; (***ex1*** (((B7 hmp5) do si) (4beat (4 2.5))) ***ex2*** (((B7 hmp5) +re) (4beat (1))) ***ex1***
;;; (((B7 hmp5) so la) (3beat (4 2))) ***ex2*** (((B7 hmp5) +re +re) (3beat (2 4)))))
;;;(4th
;;; ((((Em7 all) +do +fa) ((B7 hmp5) so do fa)) ***4beat***
;;; (3(8pause 8pause 8) 3(8pause 8pause 8) 8 8 8pause 8) ***3beat*** (4 8pause 8 3(8 8 8))))
;;;(7th
;;; ((((Em7 all) +fa +fa re +fa la +fa) ((A7 alt) fa fa fa do do)) ***4beat***
;;; (3(8 8 8) 3(8pause 8 8) 8.5 16 16 16 16 16) ***3beat*** (16 16 16 16 8 16 16 16 16 16 16)))
;;;(comp3
;;; ((((Dm7 all) mi re so la do)) ***3beat*** (16 16 8 4 4) ***4beat***
;;; (3(8pause 8 8) 8pause 8 8pause 8 8pause 8)))
;;;(pt
;;; ((((A7 hmp5) si la +fa mi si la +fa)) ***4beat*** (4 3(8 8 8) 3(8pause 8pause 8) 8.5 16) ***3beat***
;;; (16 16 16 16 3(8pause 8 8) 4)))
;;;(scale-4 ((((Dm7 all) fa so) ((A7 hmp5) la)) ***4beat*** (4 2 4) ***3beat*** (4.5 8 4)))
;;;(pt
;;; ((((Dm7 all) la) ((G7 alt) si re mi so la si)) ***4beat*** (3(8pause 8 8) 3(8 8 8) 4 8pause 8) ***3beat***
;;; (3(8pause 8 8) 16 16 8 3(8pause 8 8))))
;;;(comp3
;;; ((((CM7 ion) mi la si mi si)) ***3beat*** (4 16 16 8 3(8pause 8pause 8)) ***4beat***
;;; (3(8pause 8pause 8) 3(8pause 8pause 8) 8.5 16 8pause 8)))
;;;(comp2 ((((-BM7 lyd) re mi re la)) ***3beat*** (4 4 8 8) ***4beat*** (4 8 8 2)))
;;;(pt
;;; ((((CM7 ion) si la +fa mi +do)) ***4beat*** (8pause 8 3(8pause 8pause 8) 3(8pause 8pause 8) 3(8pause 8 8))
;;; ***3beat*** (8 8 3(8pause 8 8) 4)))
;;;(scale-1
;;; ((((Gm7 dor) re do +la) ((C7 alt) -mi mi -so)) ***4beat*** (4 3(8pause 8pause 8) 8pause 8 3(8 8 8))
;;; ***3beat*** (8 16 16 8.5 16 4)))
;;;(lhv
;;; ((((FM7 lyd) la do re so la)) ***4beat*** (4 4 4 3(8pause 8 8)) ***3beat***
;;; (3(8pause 8 8) 3(8pause 8pause 8) 8.5 16)))
;;;(ballad-waltz
;;; (***ex1*** (((-B7 lyd-7) re mi) (4beat (2.5 4))) ***ex2*** (((-B7 lyd-7) re +so mi) (4beat (8 8 2.5)))
;;; ***ex1*** (((-B7 lyd-7) so fa) (3beat (4 2))) ***ex2*** (((-B7 lyd-7) mi re) (3beat (4 2)))))
;;;(4th ((((CM7 ion) la re)) ***4beat*** (2.5 4) ***3beat*** (2 4)))
;;;(scale-2
;;; ((((-BM7 lyd) so fa mi la -si re)) ***4beat*** (16pause 16 16 16 4 4 4) ***3beat***
;;; (16 16 16 16 4 8pause 8)))
;;;(comp2
;;; ((((CM7 ion) la so mi la so)) ***3beat*** (3(8pause 8 8) 4 8 8) ***4beat***
;;; (4 3(8pause 8 8) 3(8pause 8pause 8) 3(8pause 8pause 8))))
;;;(37th ((((-BM7 lyd) mi re do do)) ***4beat*** (4 4 4 4) ***3beat*** (8pause 8 8 8 3(8pause 8pause 8))))
;;;(comp3 ((((CM7 ion) si la so mi)) ***3beat*** (4 3(8pause 8pause 8) 3(8pause 8 8)) ***4beat*** (4 2 8 8)))
;;;(scale-4
;;; ((((-BM7 lyd) do -si do re fa mi re so)) ***4beat*** (16 16 16 16 4 3(8pause 8pause 8) 8 8) ***3beat***
;;; (3(8pause 8 8) 16 16 16 16 8.5 16)))
;;;(ballad-waltz
;;; (***ex1*** (((CM7 ion) mi re mi) (4beat (4 2 4))) ***ex2*** (((CM7 ion) mi mi) (4beat (2.5 4))) ***ex1***
;;; (((CM7 ion) mi si) (3beat (4 2))) ***ex2*** (((CM7 ion) si) (3beat (2.5)))))
;;;(comp3
;;; ((((CM7 ion) re +do do la +so so)) ***3beat*** (8pause 8 16 16 8 8 8) ***4beat*** (16pause 16 16 16 4 4 4)))
;;;(chord
;;; ((((-BM7 lyd) re fa re -si la -si re)) ***4beat*** (3(8pause 8 8) 4 4 3(8 8 8)) ***3beat***
;;; (8 16 16 8pause 8 16 16 8)))
;;;(ballad-waltz
;;; (***ex1*** (((-BM7 lyd) re la) (4beat (2.5 4))) ***ex2*** (((-BM7 lyd) do) (4beat (1))) ***ex1***
;;; (((-BM7 lyd) mi fa) (3beat (2 4))) ***ex2*** (((-BM7 lyd) do re) (3beat (2 4)))))
;;;(37th ((((AM7 ion) +so si +fa)) ***4beat*** (2.5 8 8) ***3beat*** (4 4.5 8)))
;;;(comp2
;;; ((((AM7 ion) +fa mi +so +so +do si +do)) ***3beat*** (3(8 8 8) 4 16 16 8) ***4beat***
;;; (4 4 16pause 16 16 16 3(8pause 8 8))))
;;;(comp3
;;; ((((AM7 ion) si +la la +so +so +do)) ***3beat*** (8pause 8 4 16 16 16 16) ***4beat***
;;; (3(8 8 8) 4 4 8pause 8)))
;;;(ballad-waltz
;;; (***ex1*** (((AM7 ion) +so +so) (4beat (2 2))) ***ex2*** (((AM7 ion) +fa +so) (4beat (2 2))) ***ex1***
;;; (((AM7 ion) +so si +do) (3beat (4 4.5 8))) ***ex2*** (((AM7 ion) +do) (3beat (2.5)))))
;;;nil
;;;