m@24: (cl:in-package #:amuse) m@24: m@24: ;; collections of more than one event m@24: d@33: (defclass constituent (anchored-period) ()) d@33: (defclass time-ordered-constituent (constituent list-slot-sequence) d@33: ;; this won't work if lisp implementation doesn't support extensible d@33: ;; sequences. d@33: ()) d@33: (defclass composition (time-ordered-constituent) ()) d@33: (defclass monody (time-ordered-constituent) ()) m@24: m@24: ;; types of information-specifiers m@24: m@24: (defclass moment-designator () ()) m@24: (defclass period-designator () ()) m@24: (defclass anchored-period-designator (moment-designator period-designator) ()) m@24: (defclass pitch-designator () ()) m@24: (defclass pitch-interval-designator () ()) m@24: m@24: ;; time-related classes m@24: m@24: (defclass moment (moment-designator) m@24: ((time :accessor %moment-time :initarg :time))) m@24: m@24: (defclass period (period-designator) m@24: ((interval :accessor %period-interval :initarg :interval))) m@24: m@24: (defclass floating-period (period) ()) m@24: (defclass anchored-period (period moment anchored-period-designator) ()) m@24: m@24: ;; pitch-related classes m@24: m@24: (defclass frequency () ()) m@24: m@24: (defclass pitch (pitch-designator) ()) m@24: (defclass chromatic-pitch (pitch) m@24: ((number :accessor %chromatic-pitch-number :initarg :number))) m@24: (defclass diatonic-pitch (pitch) m@24: ((name :accessor %diatonic-pitch-name :initarg :name) m@24: (accidental :accessor %diatonic-pitch-accidental :initarg :accidental) m@24: (octave :accessor %diatonic-pitch-octave :initarg :octave))) m@24: m@24: (defclass pitch-interval (pitch-interval-designator) m@24: ((span :accessor %pitch-interval-span :initarg :span))) m@24: m@24: ;; events m@24: m@24: (defclass event (anchored-period) ()) m@24: (defclass pitched-event (event pitch-designator) ()) m@24: (defclass chromatic-pitched-event (pitched-event chromatic-pitch) ()) m@24: (defclass percussive-event (event) ()) m@24: m@24: ;;; Range-based `constituents' m@24: ;; Whilst these are all constituents in the CHARM sense, their m@24: ;; properties apply to a timed range rather than to a set of m@24: ;; events. As such, they can be regarded as anchored-periods with m@24: ;; properties. m@24: m@24: (defclass time-signature (anchored-period) ()) m@24: m@24: (defclass basic-time-signature (anchored-period) m@24: ;; N.B. Can only deal with numeric signatures m@24: ((numerator :accessor %basic-time-signature-numerator m@24: :initarg :numerator) m@24: (denominator :accessor %basic-time-signature-denominator m@24: :initarg :denominator))) m@24: m@24: (defclass key-signature (anchored-period) ()) m@24: m@24: (defclass basic-key-signature (key-signature) m@24: ;; Only has line-of-fifths distance from c, so custom signatures m@24: ;; won't work m@24: ((sharp-count :accessor %basic-key-signature-sharp-count m@24: :initarg sharp-count))) m@24: m@24: (defclass tempo (anchored-period) m@24: ;; accel and rit in symbolic encoding will need other structures, as m@24: ;; will textual tempo markings. m@24: ((bpm :accessor %tempo-bpm m@24: :initarg :bpm))) m@24: