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