m@24: (cl:in-package #:amuse) m@24: m@24: ;; Time classes m@24: m@24: (defun make-moment (time) m@24: (make-instance 'moment :time time)) m@24: m@24: ;; N.B. period should never be constructed directly - it's either m@24: ;; floating or anchored or some other subclass. m@24: m@24: (defun make-floating-period (interval) m@24: (make-instance 'floating-period :interval interval)) m@24: d@33: d@33: ;; Should this take a moment and/or a period too? m@24: (defun make-anchored-period (onset interval) m@24: (make-instance 'anchored-period m@24: :time onset m@24: :interval interval)) m@24: m@24: ;; Pitch classes (no, not that sort of pitch class) m@24: m@24: (defun make-chromatic-pitch (pitch-number) m@24: (make-instance 'chromatic-pitch :number pitch-number)) m@24: m@24: (defun make-diatonic-pitch (name accidental octave) m@24: (make-instance 'diatonic-pitch m@24: :name name m@24: :accidental accidental m@24: :octave octave)) m@24: m@24: (defun make-pitch-interval (span) m@24: (make-instance 'pitch-interval :span span)) m@24: m@24: ;; Events m@24: m@24: (defun make-chromatic-pitched-event (pitch-number onset duration) m@24: (make-instance 'chromatic-pitched-event m@24: :number pitch-number m@24: :time onset m@24: :interval duration)) m@24: m@24: (defun make-basic-time-signature (numerator denominator onset duration) m@24: (make-instance 'basic-time-signature m@24: :numerator numerator m@24: :denominator denominator m@24: :time onset m@24: :interval duration)) m@24: m@24: (defun make-basic-key-signature (sharp-count onset duration) m@24: (make-instance 'basic-key-signature m@24: :sharp-count sharp-count m@24: :time onset m@24: :interval duration)) m@24: m@24: (defun make-tempo (bpm onset duration) m@24: (make-instance 'tempo m@24: :bpm bpm m@24: :time onset m@24: :interval duration))