anchor.diff:  Note that Scala refers to these as \"scales\" but in cl-patterns they are known as tunings."
     (with-open-file (stream file :direction :input :if-does-not-exist :error)
       (let* ((lines (loop :for line = (read-line stream nil 'eof)
  -                     :if (eql line 'eof)
  -                     :do (loop-finish)
  -                     :unless (char= #\! (elt line 0))
  -                     :collect (string-left-trim '(#\space) line)))
  +                        :if (eql line 'eof)
  +                          :do (loop-finish)
  +                        :unless (char= #\! (elt line 0))
  +                          :collect (string-left-trim '(#\space) line)))
              (name (car lines))
              (count (parse-integer (cadr lines)))
              (pitches (append (list 0)
  -                            (mapcar (lambda (line) (let ((line (subseq line
  -                                                                       (position-if (lambda (char) (char/= #\space char)) line)
  -                                                                       (position-if (lambda (char) (char= #\space char)) line))))
  -                                                     (if (position #\. line :test #'char=) ;; if it has a . it's a cents value
  -                                                         (/ (read-from-string line) 100) ;; cents
  -                                                         (ratio-midi (read-from-string line)))))
  +                            (mapcar (lambda (line)
  +                                      (let ((line (subseq line
  +                                                          (position-if (lambda (char) (char/= #\space char)) line)
  +                                                          (position #\space line :test #'char=))))
  +                                        (if (position #\. line :test #'char=) ;; if it has a . it's a cents value
  +                                            (/ (read-from-string line) 100) ;; cents
  +                                            (ratio-midi (read-from-string line)))))
                                       (cddr lines))))
              (octave-ratio (car (last pitches)))
              (pitches (butlast pitches))
  
positive.code: (defgeneric chord (object)
    (:documentation "Get a chord by name."))
  
  (defmethod chord ((object list))
    ;; FIX: allow for stuff like '(:c :major) etc
    )
  
  (defmethod chord ((object symbol))
    (let ((chord (gethash object *chords*)))
      (when chord
        (if (symbolp chord)
            (chord chord)
            chord))))
  
  (defmethod chord ((object string))
    (chord (friendly-symbol object)))
  
  (defmethod chord ((object chord))
    object)
  
  (defmethod chord-name ((this symbol))
    (when this
      (chord-name (chord this))))
  
  (defmethod chord-scale ((this symbol))
    (when this
      (chord-scale (chord this))))
  
  (defmethod chord-indexes ((this symbol))
    (when this
      (chord-indexes (chord this))))
  
  (defmethod describe-object ((chord chord) stream)
    (with-slots (name scale) chord
  
negative.code:                                :octave-ratio octave-ratio)))
      (setf (gethash key *tunings*) tuning)
      (dolist (alias (remove-duplicates (append (generate-aliases key) aliases)))
        (if-let ((existing (gethash alias *tunings*)))
          (if (symbolp existing)
              (progn
                (warn "Replacing existing alias \"~s\" (for ~s) with an alias for ~s..." alias existing tuning)
                (setf (gethash alias *tunings*) key))
              (unless (eq existing tuning)
                (warn "Ignoring alias ~s that points to ~s (while trying to add it as an alias for ~s)." alias existing tuning)))
          (setf (gethash alias *tunings*) key)))))
  
  (defun all-tunings ()
    "Get a list of all defined tunings."
  