Mercurial > hg > amuse
view constructors.lisp @ 18:70e76c1c87b7
Bug fixes and exports in package.lisp
darcs-hash:20061213114049-f76cc-4c4175a1ad8b24e1c5df82c9fb67445ac32977d9.gz
author | David Lewis <d.lewis@gold.ac.uk> |
---|---|
date | Wed, 13 Dec 2006 11:40:49 +0000 |
parents | 930e9880ed3f |
children | 2f331bbdfab8 |
line wrap: on
line source
(cl:in-package #:amuse) ;; Time classes (defun make-moment (time) (make-instance 'moment :time time)) ;; N.B. period should never be constructed directly - it's either ;; floating or anchored or some other subclass. (defun make-floating-period (interval) (make-instance 'floating-period :interval interval)) (defun make-anchored-period (onset interval) (make-instance 'anchored-period :time onset :interval interval)) ;; Pitch classes (no, not that sort of pitch class) (defun make-chromatic-pitch (pitch-number) (make-instance 'chromatic-pitch :number pitch-number)) (defun make-diatonic-pitch (name accidental octave) (make-instance 'diatonic-pitch :name name :accidental accidental :octave octave)) (defun make-pitch-interval (span) (make-instance 'pitch-interval :span span)) ;; Events (defun make-midi-pitched-event (pitch-number onset duration) (make-instance 'midi-pitched-event :number pitch-number :time onset :interval duration))