Mercurial > hg > amuse
view utils/harmony/classes.lisp @ 33:d1010755f507
Large upload of local changes. Many additions, such as harmony and piece-level objects
darcs-hash:20070413100909-f76cc-a8aa8dfc07f438dc0c1a7c45cee7ace2ecc1e6a5.gz
author | David Lewis <d.lewis@gold.ac.uk> |
---|---|
date | Fri, 13 Apr 2007 11:09:09 +0100 |
parents | |
children |
line wrap: on
line source
(in-package #:amuse-harmony) ;; This file contains classes for use in the harmony module. There are ;; two sets of classes here: those used in the chord-labelling itself, ;; and those used for label-evaluation and comparison with ground ;; truth. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; CHORD LABELLING ;; ;; Chord objects are the fundamental object for identifying and naming ;; chord types they also give info about pitch classes and ;; distribution. (defclass chord () ((label :accessor chord-label :initarg :label) (main-notes :accessor main-notes :initarg :notes) (bass-likelihoods :accessor bass-likelihoods :initarg :bass-likelihoods) (min-distribution :accessor min-distribution :initarg :min-distribution) (distribution :accessor distribution :initarg :distribution) (normalised-distribution :initarg :normalised-distribution :initform nil))) ;; A chordset is a gathering of chords for experiment. There are slots ;; for priors, but I'm not using them at the moment (see below for ;; current, not very good, method). (defclass chordset () ((chords :accessor chords :initarg :chords :initform nil) (priors :accessor priors :initarg :priors :initform nil))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; EVALUATION ;; (defclass labelled-chord-period (anchored-period) ((root-pitch-class :writer %labelled-chord-root :reader labelled-chord-root :initarg :root) (chord-type :writer %labelled-chord-type :reader labelled-chord-type :initarg :chord-type) (bass :writer %labelled-chord-bass :reader labelled-chord-bass :initarg :bass)))