anchor.diff:             (setf *scales* (plist-set *scales* x key)))
            aliases)))
   
  -(defgeneric scale (item))
  +(defun all-scales ()
  +  "Get a list of all defined scales."
  +  (loop :for i :in (keys *scales*)
  +     :unless (symbolp (getf *scales* i))
  +     :collect (scale i)))
  +
  +(defgeneric scale (item)
  +  (:documentation "Get a scale struct by name."))
   
   (defmethod scale ((item symbol))
     (let ((scale (getf *scales* item)))
  
positive.code: 
  (defmethod tuning ((item tuning))
    item)
  
  (map nil ;; tunings
       (lambda (sd)
  
negative.code: (in-package :cl-patterns)
  
  ;;; general functionality
  
  (defstruct scale name degrees tuning)
  
  (defparameter *scales* (list)
    "Plist of all defined scales.")
  
  (defun define-scale (name degrees &optional (tuning :et12) aliases)
    "Define a scale and add it to the *scales* list."
  