Mercurial > hg > amuse
comparison implementations/geerdes/constructors.lisp @ 133:d041118612d4
Fixed monody import for geerdes
darcs-hash:20070821110338-f76cc-6958b98c5ece929c14f7faa5bc837810254621b9.gz
author | David Lewis <d.lewis@gold.ac.uk> |
---|---|
date | Tue, 21 Aug 2007 12:03:38 +0100 |
parents | 8ea75cc8bc2c |
children | fd85f52d9f9d |
comparison
equal
deleted
inserted
replaced
132:bfe5afcad183 | 133:d041118612d4 |
---|---|
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 (push note monody-notes)) | 27 (let ((monody-note (copy-event note))) |
28 (setf (duration monody-note) (%fast-monody-duration row timebase)) | |
29 (push monody-note monody-notes))) | |
28 (when (> (timepoint (cut-off note)) last-time) | 30 (when (> (timepoint (cut-off note)) last-time) |
29 (setf last-time (timepoint (cut-off note)))) | 31 (setf last-time (timepoint (cut-off note)))) |
30 (push note notes) | 32 (push note notes) |
31 (incf l))) | 33 (incf l))) |
32 (sequence:adjust-sequence composition l :initial-contents (reverse notes)) | 34 (sequence:adjust-sequence composition l :initial-contents (reverse notes)) |
90 (seventh event-row)) | 92 (seventh event-row)) |
91 (defun %fast-id (event-row) | 93 (defun %fast-id (event-row) |
92 (eighth event-row)) | 94 (eighth event-row)) |
93 (defun %fast-monodyp (event-row) | 95 (defun %fast-monodyp (event-row) |
94 (ninth event-row)) | 96 (ninth event-row)) |
97 (defun %fast-monody-duration (event-row timebase) | |
98 (/ (tenth event-row) timebase)) | |
95 | 99 |
96 (defun %fast-tempo (tp-row) | 100 (defun %fast-tempo (tp-row) |
97 (eighth tp-row)) | 101 (eighth tp-row)) |
98 (defun %fast-numerator (ts-row) | 102 (defun %fast-numerator (ts-row) |
99 (ninth ts-row)) | 103 (ninth ts-row)) |
145 :time time | 149 :time time |
146 :interval interval | 150 :interval interval |
147 :velocity velocity | 151 :velocity velocity |
148 :patch patch | 152 :patch patch |
149 :id id))) | 153 :id id))) |
150 (defmethod copy-event ((event geerdes-percussive-event)) | 154 (defmethod copy-event ((event geerdes-percussive-event)) |
151 (with-slots ((channel amuse-midi::channel) | 155 (with-slots ((channel amuse-midi::channel) |
152 (track amuse-midi::track) | 156 (track amuse-midi::track) |
153 (time amuse::time) | 157 (time amuse::time) |
154 (interval amuse::interval) | 158 (interval amuse::interval) |
155 (velocity amuse-midi::velocity) | 159 (velocity amuse-midi::velocity) |
156 (patch amuse-midi::patch) | 160 (patch amuse-midi::patch) |
157 (sound amuse-midi::sound) id) | 161 (sound amuse-midi::sound) id) |
158 event | 162 event |
159 (make-instance 'geerdes-percussive-event | 163 (make-instance 'geerdes-percussive-event |
160 :channel channel | 164 :channel channel |
161 :track track | 165 :track track |
162 :time time | 166 :time time |
163 :interval interval | 167 :interval interval |
164 :velocity velocity | 168 :velocity velocity |
165 :patch patch | 169 :patch patch |