Mercurial > hg > amuse
view implementations/meredith/constructors.lisp @ 315:d1ff5dad3f8d
Improve printing of list-collections.
Ignore-this: 3073e6c1462cf98ca5752179ab6ecb1d
darcs-hash:20100414191443-16a00-e2f9962b0cea652890be18297fdbd4bf7d533c84.gz
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Wed, 14 Apr 2010 20:14:43 +0100 |
parents | f5734df598f4 |
children |
line wrap: on
line source
(cl:in-package #:amuse-meredith) (defun make-meredith-composition-identifier (composition-id) (make-instance 'meredith-composition-identifier :composition-id composition-id)) (defun make-meredith-composition (&key events time interval identifier description) (make-instance 'meredith-composition :%data events :time time :interval interval :identifier identifier :description description)) (defun make-meredith-event (&rest args) (apply #'make-instance 'meredith-event args)) (defun db-event->meredith-event (db-event composition) (destructuring-bind (event-id tatum-on tatum-dur tactus-on tactus-dur crot-on crot-dur tatum-on-ms tatum-dur-ms beat-on-ms beat-dur-ms crot-on-ms crot-dur-ms pitch-name midi-note-number cpitch mpitch voice) db-event (make-meredith-event :identifier event-id :composition composition :tatum-on tatum-on :tatum-dur tatum-dur :tactus-on tactus-on :tactus-dur tactus-dur :time crot-on ; define crotchet as standard time :interval crot-dur :tatum-on-ms tatum-on-ms :tatum-dur-ms tatum-dur-ms :beat-on-ms beat-on-ms :beat-dur-ms beat-dur-ms :crot-on-ms crot-on-ms :crot-dur-ms crot-dur-ms :pitch-name pitch-name :number midi-note-number :cp cpitch :mp mpitch :voice voice)))