comparison implementations/geerdes/constructors.lisp @ 212:619194befdd4

add identifier and timebase slots to midifile composition class Ignore-this: 4e72a0860344399452bea196c3739bbf darcs-hash:20090524150506-16a00-bce845ccf20a9289a4015fb58287f25ebfa178ad.gz committer: Jamie Forth <j.forth@gold.ac.uk>
author j.forth <j.forth@gold.ac.uk>
date Thu, 24 Feb 2011 11:23:17 +0000
parents be3d63b78054
children d8f650e3796e
comparison
equal deleted inserted replaced
211:e2839225f6fb 212:619194befdd4
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