;;;
;;; The name of this program is music49.cl
;;;
(load "c:\\program files\\acl62\\music48.cl")
(defun get-UST-2 (chordname)
(let ((lst (get-UST chordname)))
(do ((l lst (cdr l))
(w))
((null l) (remove-duplicate (squash w)))
(push (cdr (second (car l))) w))))
(defun translate-doremi (note)
(prog ()
(cond ((equal note "ド") (return 'do))
((equal note "#ド") (return '+do))
((equal note "♭レ") (return '+do))
((equal note "レ") (return 're))
((equal note "#レ") (return '+re))
((equal note "♭ミ") (return '+re))
((equal note "ミ") (return 'mi))
((equal note "ファ") (return 'fa))
((equal note "#ファ") (return '+fa))
((equal note "♭ソ") (return '+fa))
((equal note "ソ") (return 'so))
((equal note "#ソ") (return '+so))
((equal note "♭ラ") (return '+so))
((equal note "ラ") (return 'la))
((equal note "#ラ") (return '+la))
((equal note "♭シ") (return '+la))
((equal note "シ") (return 'si)))))
(defun translate-doremi-in-a-chord (chordname)
(mapcar #'(lambda (x) (translate-doremi x)) (get-chord-tone chordname)))
(defun note-in-a-chord? (note chordname)
(member note (translate-doremi-in-a-chord chordname)))
;;;
;;; (note-in-UST? 're "CM7")
;;;
(defun note-in-UST? (note chordname)
(let ((lst (get-UST-2 chordname)))
(do ((l lst (cdr l))
(w))
((null l) (reverse w))
(cond ((note-in-a-chord? note (car l))
(push (car l) w))))))