Code: Select all
(defmethod! expand-t-setclass (pcset &optional (n 12))
:icon *PC_ICON*
:doc "
Given any member of a t-setclass, lists every member of that t-setclass.
The optional parameter N can be used to set the number of equal steps per
octave to something other than the default of 12.
Will tolerate integers out of the mod-N range in PCSET."
:initvals '((1 3 4) 12)
:indoc '("pcset or list of them"
"modulus of the pc space")
(if (listp (first pcset))
(expand-t-setclasses pcset)
(let ((t-prime (t-primeform pcset n)))
(loop with result = nil
repeat n
for x-pcset = pcset then (xpose x-pcset 1 n)
unless (member x-pcset result) collect x-pcset into result
finally return result))))
(defmethod! expand-t-setclasses (pcset &optional (n 12))
(loop for item in pcset collect (expand-t-setclass item n)))
;-----
ERROR: Duplicate Binding in LOOP: (result)