view implementations/geerdes/classes.lisp @ 136:fd85f52d9f9d

Class revolution * PITCH-DESIGNATOR -> PITCH (PITCH removed) * MOMENT-DESIGNATOR -> MOMENT , MOMENT -> STANDARD-MOMENT * PERIOD-DESIGNATOR -> PERIOD , PERIOD -> STANDARD-PERIOD * ANCHORED-PERIOD-DESIGNATOR -> ANCHORED-PERIOD , ANCHORED-PERIOD -> STANDARD-ANCHORED-PERIOD * FLOATING-PERIOD removed * TIME-SIGNATURE-DESIGNATOR -> TIME-SIGNATURE & TIME-SIGNATURE-PERIOD * TIME-SIGNATURE -> STANDARD-TIME-SIGNATURE & STANDARD-TIME-SIGNATURE-PERIOD * KEY-SIGNATURE-DESIGNATOR -> KEY-SIGNATURE (& ...-PERIOD) * KEY-SIGNATURE -> STANDARD-KEY-SIGNATURE (& ...-PERIOD) * TEMPO now abstract (& TEMPO-PERIOD) * STANDARD-TEMPO AND STANDARD-TEMPO-PERIOD * COMPOSITION, CONSTITUENT & TIME-ORDERED-CONSTITUENT all have STANDARD- forms make-x methods and specialisers changes appropriately darcs-hash:20070831142943-f76cc-7be0d08963de06d87b36e4922076287d565c7ee2.gz
author David Lewis <d.lewis@gold.ac.uk>
date Fri, 31 Aug 2007 15:29:43 +0100
parents 5e362d998f29
children 4a0e15e2829a
line wrap: on
line source
(cl:in-package #:amuse-geerdes)

(defclass property-list-mixin ()
  ((properties :initarg :properties
	       :accessor properties
	       :initform 'nil)))

(defclass geerdes-object (property-list-mixin) ())

(defclass geerdes-identifier (identifier geerdes-object) ())
(defclass geerdes-identifier-cat-id (geerdes-identifier)
  ((cat-id :initarg :cat-id
	   :initform 'nil)))
(defclass geerdes-identifier-file-id (geerdes-identifier)
  ((file-id :initarg :file-id
	    :initform 'nil)))

(defclass geerdes-composition (midi-composition geerdes-object)
  ((db-entry :initarg :db-entry
	     :initform nil
	     :accessor %db-entry)
   (bar-numbers :initform nil
		:accessor %bar-numbers)
   (monody :initform nil
	   :accessor %monody)
   (caches :initform nil
	   :accessor %caches)
   (midi-constituents :initarg :constituents
		      :accessor %midi-constituents)
   (midi-events :initarg :midi-events
		:accessor %midi-events)
   (midi-timebase :initarg :midi-timebase
		  :accessor %midi-timebase)
   (identifier :initarg :id
	       :accessor %fast-identifier)
   (db-cat-id :initarg :cat-id
	      :accessor %db-cat-id)
   (db-file-id :initarg :file-id
	       :accessor %db-file-id))
  (:documentation "MIDI composition with extra slots for Geerdes
  database entries and ids. Because this implementation is for a
  particular need, caching of information is also handled within
  the object, so Geerdes compositions are faster for bar lookups,
  monody-finding and so on. They also make use of interval trees
  for time calculations, which make them faster for window-based
  queries (but slower to import as a result)."))

(defclass geerdes-monody (monody geerdes-composition)
  ;; FIXME: necessary slots? Do we even use them?
  ((inter-onset-intervals :initarg :i-o-i
			  :initform nil
			  :accessor %i-o-i)
   (inter-onset-interval-mode :initarg :ioi-mode
			      :initform 0
			      :accessor %ioi-mode)))

(defclass geerdes-pitched-event (midi-pitched-event geerdes-object)
  ((id :initarg :id
       :accessor %geerdes-pitched-event-id))
  (:documentation "Only adds a database id to midi-pitched-event"))

(defclass geerdes-percussive-event (midi-percussive-event geerdes-object)
  ((id :initarg :id
       :accessor %geerdes-percussive-event-id))
  (:documentation "Only adds a database id to midi-percussive-event"))