comparison implementations/geerdes/constructors.lisp @ 136:fd85f52d9f9d

Class revolution * PITCH-DESIGNATOR -> PITCH (PITCH removed) * MOMENT-DESIGNATOR -> MOMENT , MOMENT -> STANDARD-MOMENT * PERIOD-DESIGNATOR -> PERIOD , PERIOD -> STANDARD-PERIOD * ANCHORED-PERIOD-DESIGNATOR -> ANCHORED-PERIOD , ANCHORED-PERIOD -> STANDARD-ANCHORED-PERIOD * FLOATING-PERIOD removed * TIME-SIGNATURE-DESIGNATOR -> TIME-SIGNATURE & TIME-SIGNATURE-PERIOD * TIME-SIGNATURE -> STANDARD-TIME-SIGNATURE & STANDARD-TIME-SIGNATURE-PERIOD * KEY-SIGNATURE-DESIGNATOR -> KEY-SIGNATURE (& ...-PERIOD) * KEY-SIGNATURE -> STANDARD-KEY-SIGNATURE (& ...-PERIOD) * TEMPO now abstract (& TEMPO-PERIOD) * STANDARD-TEMPO AND STANDARD-TEMPO-PERIOD * COMPOSITION, CONSTITUENT & TIME-ORDERED-CONSTITUENT all have STANDARD- forms make-x methods and specialisers changes appropriately darcs-hash:20070831142943-f76cc-7be0d08963de06d87b36e4922076287d565c7ee2.gz
author David Lewis <d.lewis@gold.ac.uk>
date Fri, 31 Aug 2007 15:29:43 +0100
parents d041118612d4
children edf2322ea33f
comparison
equal deleted inserted replaced
135:188fe5ea837f 136:fd85f52d9f9d
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)
13 (%fast-channel row) 13 (%fast-channel row)
14 (%fast-track row) 14 (%fast-track row)
15 (%fast-onset row timebase) 15 (%fast-onset row timebase)
16 (%fast-duration row timebase) 16 (%fast-duration row timebase)
17 (%fast-id row)) 17 (%fast-id row))
18 (make-geerdes-percussive-event (%fast-pitch row) 18 (make-geerdes-percussive-event (%fast-pitch row)
19 (%fast-velocity row) 19 (%fast-velocity row)
20 (%fast-patch row) 20 (%fast-patch row)
21 (%fast-channel row) 21 (%fast-channel row)
22 (%fast-track row) 22 (%fast-track row)
23 (%fast-onset row timebase) 23 (%fast-onset row timebase)
24 (%fast-duration row timebase) 24 (%fast-duration row timebase)
25 (%fast-id row))))) 25 (%fast-id row)))))
26 (when (%fast-monodyp row) 26 (when (%fast-monodyp row)
27 (let ((monody-note (copy-event note))) 27 (let ((monody-note (copy-event note)))
28 (setf (duration monody-note) (%fast-monody-duration row timebase)) 28 (setf (duration monody-note) (%fast-monody-duration row timebase))
29 (push monody-note monody-notes))) 29 (push monody-note monody-notes)))
30 (when (> (timepoint (cut-off note)) last-time) 30 (when (> (timepoint (cut-off note)) last-time)
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
56 ((%fast-tempo row) 56 ((%fast-tempo row)
57 (push (make-tempo 57 (push (make-standard-tempo-period
58 (microsecond-per-crotchet-to-bpm 58 (microsecond-per-crotchet-to-bpm
59 (%fast-tempo row)) 59 (%fast-tempo row))
60 (%fast-onset row timebase) 60 (%fast-onset row timebase)
61 (%fast-duration row timebase)) 61 (%fast-duration row timebase))
62 tempi)) 62 tempi))
63 ((%fast-numerator row) 63 ((%fast-numerator row)
64 (push (make-basic-time-signature 64 (push (make-standard-time-signature-period
65 (%fast-numerator row) 65 (%fast-numerator row)
66 (%fast-denominator row) 66 (%fast-denominator row)
67 (%fast-onset row timebase) 67 (%fast-onset row timebase)
68 (%fast-duration row timebase)) 68 (%fast-duration row timebase))
69 time-sigs)) 69 time-sigs))