view implementations/mtp/classes.lisp @ 143:b753a56c373b

base/: add standard-monody darcs-hash:20070911103904-c0ce4-972b12d9521d0c75143ef9d81fdb7f33dbc3e8e4.gz
author Marcus Pearce <m.pearce@gold.ac.uk>
date Tue, 11 Sep 2007 11:39:04 +0100
parents fd85f52d9f9d
children 4a0e15e2829a
line wrap: on
line source
(cl:in-package #:amuse-mtp) 

;;; Top-level class 

(defclass mtp-object (amuse:amuse-object) ())

;;; Segmenters 

(defclass mtp-after-segmenter (ground-truth-segmenter after-segmenter mtp-object)
  ())

(defclass mtp-before-segmenter (ground-truth-segmenter before-segmenter 
                                                       mtp-object)
  ())

;;; Identifiers 

(defclass mtp-dataset-identifier (identifier mtp-object)
  ((dataset-id :initarg :dataset-id :accessor dataset-id)))
   
(defclass mtp-composition-identifier (identifier mtp-object)
  ((dataset-id :initarg :dataset-id :accessor dataset-id)
   (composition-id :initarg :composition-id :accessor composition-id)))

;;; Music objects 

(defclass mtp-music-object (mtp-object) ())

(defclass mtp-dataset (amuse::list-slot-sequence mtp-music-object) 
  ((dataset-id :initarg :dataset-id :accessor dataset-id)
   (description :initarg :description :accessor description)
   (timebase :initarg :timebase :accessor dataset-timebase)
   (midc :initarg :midc :accessor dataset-midc)))

(defclass mtp-composition (amuse:standard-composition mtp-music-object)
  ((dataset-id :initarg :dataset-id :accessor dataset-id)
   (composition-id :initarg :composition-id :accessor composition-id)
   (description :initarg :description :accessor description)))

(defclass mtp-monody (amuse:standard-monody mtp-composition) 
  ())

(defclass mtp-event (amuse:standard-pitched-event mtp-music-object)
  ((dataset-id :initarg :dataset-id :accessor dataset-id)
   (composition-id :initarg :composition-id :accessor composition-id)
   (event-id :initarg :event-id :accessor event-id)
   ;;(onset :initarg :onset :accessor %mtp-onset)  onset / (amuse:timepoint ...)
   ;;(dur :initarg :dur :accessor %mtp-accidental) interval / (amuse:duration  ...)
   (deltast :initarg :deltast :accessor %mtp-deltast)
   (cpitch :initarg :cpitch :accessor %mtp-cpitch)
   (mpitch :initarg :mpitch :accessor %mtp-mpitch)
   (accidental :initarg :accidental :accessor %mtp-accidental)
   (keysig :initarg :keysig :accessor %mtp-keysig)
   (mode :initarg :mode :accessor %mtp-mode)
   (barlength :initarg :barlength :accessor %mtp-barlength)
   (pulses :initarg :pulses :accessor %mtp-pulses)
   (phrase :initarg :phrase :accessor %mtp-phrase)
   (tempo :initarg :tempo :accessor %mtp-tempo)
   (dyn :initarg :dyn :accessor %mtp-dyn)
   (voice :initarg :voice :accessor %mtp-voice)))