annotate base/datasets/datasets-file/methods.lisp @ 266:d605fd37b0ee
fix mtp description again - return the string not '(string)
author |
Jamie Forth <j.forth@gold.ac.uk> |
date |
Sun, 10 Apr 2011 18:28:27 +0100 |
parents |
6a3adca16910 |
children |
|
rev |
line source |
j@251
|
1 (cl:in-package #:amuse-datasets)
|
j@251
|
2
|
j@251
|
3 (defmethod make-dataset ((identifier midifile-dataset-identifier)
|
j@251
|
4 composition-identifiers &optional
|
j@251
|
5 description)
|
j@251
|
6 (make-instance 'midifile-dataset
|
j@251
|
7 :%data composition-identifiers
|
j@251
|
8 :identifier identifier
|
j@251
|
9 :description description))
|
j@251
|
10
|
j@251
|
11 (defmethod get-dataset ((dataset-identifier midifile-dataset-identifier))
|
j@251
|
12 (let ((midifile-paths
|
j@251
|
13 (append (directory (merge-pathnames (dataset-path
|
j@251
|
14 dataset-identifier) "*.mid*"))
|
j@251
|
15 (directory (merge-pathnames (dataset-path
|
j@251
|
16 dataset-identifier) "*.MID*")))))
|
j@251
|
17 (unless midifile-paths
|
j@251
|
18 (warn "No midifiles in: ~A" (dataset-path dataset-identifier))
|
j@251
|
19 (return-from get-dataset nil))
|
j@251
|
20 (loop for path in midifile-paths
|
j@251
|
21 collect (make-composition-identifier
|
j@251
|
22 (implementation-package dataset-identifier) path)
|
j@251
|
23 into composition-identifiers
|
j@251
|
24 finally (return (make-dataset dataset-identifier
|
j@251
|
25 composition-identifiers)))))
|
j@251
|
26
|
j@251
|
27
|