Mercurial > hg > amuse
comparison implementations/geerdes/constructors.lisp @ 281:4a03a1478c02
add identifier and timebase slots to midifile composition class
Ignore-this: 4e72a0860344399452bea196c3739bbf
darcs-hash:20090524150506-16a00-bce845ccf20a9289a4015fb58287f25ebfa178ad.gz
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Sun, 24 May 2009 16:05:06 +0100 |
parents | 8ec5cc5466fb |
children | d8f650e3796e |
comparison
equal
deleted
inserted
replaced
280:9ce6b954d403 | 281:4a03a1478c02 |
---|---|
2 | 2 |
3 (defgeneric %initialise-notes (composition)) | 3 (defgeneric %initialise-notes (composition)) |
4 (defmethod %initialise-notes ((composition geerdes-composition)) | 4 (defmethod %initialise-notes ((composition geerdes-composition)) |
5 (let ((notes) (l 0) (last-time 0) (monody-notes) | 5 (let ((notes) (l 0) (last-time 0) (monody-notes) |
6 (monody (make-instance 'geerdes-monody :file-id (file-id composition))) | 6 (monody (make-instance 'geerdes-monody :file-id (file-id composition))) |
7 (timebase (%midi-timebase composition))) | 7 (timebase (midi-timebase composition))) |
8 (dolist (row (%midi-events composition)) | 8 (dolist (row (%midi-events composition)) |
9 (let* ((note (if (pitched-row-p row) | 9 (let* ((note (if (pitched-row-p row) |
10 (make-geerdes-pitched-event (%fast-pitch row) | 10 (make-geerdes-pitched-event (%fast-pitch row) |
11 (%fast-velocity row) | 11 (%fast-velocity row) |
12 (%fast-patch row) | 12 (%fast-patch row) |
45 (defgeneric %initialise-constituents (composition)) | 45 (defgeneric %initialise-constituents (composition)) |
46 (defmethod %initialise-constituents ((composition geerdes-composition)) | 46 (defmethod %initialise-constituents ((composition geerdes-composition)) |
47 ;; FIXME: Should the duration of composition be affected by this? On | 47 ;; FIXME: Should the duration of composition be affected by this? On |
48 ;; the one hand, it makes no difference to the musical content, but | 48 ;; the one hand, it makes no difference to the musical content, but |
49 ;; on the other, it seems illogical to reach outside the period. | 49 ;; on the other, it seems illogical to reach outside the period. |
50 (let ((timebase (%midi-timebase composition)) | 50 (let ((timebase (midi-timebase composition)) |
51 (time-sigs) | 51 (time-sigs) |
52 (tempi) | 52 (tempi) |
53 (mystery 0)) | 53 (mystery 0)) |
54 (dolist (row (%midi-constituents composition)) | 54 (dolist (row (%midi-constituents composition)) |
55 (cond | 55 (cond |