annotate base/constructors.lisp @ 40:5bec705db9d6

Move midi-key-signature from implementations/midi to base/ darcs-hash:20070606134940-aa3d6-69b8a531ef8ae393234d065ff6105ed9ecd18434.gz
author m.pearce <m.pearce@gold.ac.uk>
date Wed, 06 Jun 2007 14:49:40 +0100
parents d1010755f507
children 4e1538df0d10
rev   line source
m@24 1 (cl:in-package #:amuse)
m@24 2
m@24 3 ;; Time classes
m@24 4
m@24 5 (defun make-moment (time)
m@24 6 (make-instance 'moment :time time))
m@24 7
m@24 8 ;; N.B. period should never be constructed directly - it's either
m@24 9 ;; floating or anchored or some other subclass.
m@24 10
m@24 11 (defun make-floating-period (interval)
m@24 12 (make-instance 'floating-period :interval interval))
m@24 13
d@33 14
d@33 15 ;; Should this take a moment and/or a period too?
m@24 16 (defun make-anchored-period (onset interval)
m@24 17 (make-instance 'anchored-period
m@24 18 :time onset
m@24 19 :interval interval))
m@24 20
m@24 21 ;; Pitch classes (no, not that sort of pitch class)
m@24 22
m@24 23 (defun make-chromatic-pitch (pitch-number)
m@24 24 (make-instance 'chromatic-pitch :number pitch-number))
m@24 25
m@24 26 (defun make-diatonic-pitch (name accidental octave)
m@24 27 (make-instance 'diatonic-pitch
m@24 28 :name name
m@24 29 :accidental accidental
m@24 30 :octave octave))
m@24 31
m@24 32 (defun make-pitch-interval (span)
m@24 33 (make-instance 'pitch-interval :span span))
m@24 34
m@24 35 ;; Events
m@24 36
m@24 37 (defun make-chromatic-pitched-event (pitch-number onset duration)
m@24 38 (make-instance 'chromatic-pitched-event
m@24 39 :number pitch-number
m@24 40 :time onset
m@24 41 :interval duration))
m@24 42
m@24 43 (defun make-basic-time-signature (numerator denominator onset duration)
m@24 44 (make-instance 'basic-time-signature
m@24 45 :numerator numerator
m@24 46 :denominator denominator
m@24 47 :time onset
m@24 48 :interval duration))
m@24 49
m@24 50 (defun make-basic-key-signature (sharp-count onset duration)
m@24 51 (make-instance 'basic-key-signature
m@24 52 :sharp-count sharp-count
m@24 53 :time onset
m@24 54 :interval duration))
m@24 55
m@40 56 (defun make-midi-key-signature (sharp-count mode onset duration)
m@40 57 (make-instance 'midi-key-signature
m@40 58 :sharp-count sharp-count
m@40 59 :mode mode
m@40 60 :time onset
m@40 61 :interval duration))
m@40 62
m@24 63 (defun make-tempo (bpm onset duration)
m@24 64 (make-instance 'tempo
m@24 65 :bpm bpm
m@24 66 :time onset
m@24 67 :interval duration))