Mercurial > hg > amuse
view base/datasets/datasets-file/methods.lisp @ 262:2284dbc7d51a
fix missing description value in mtp-compositions
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Sun, 10 Apr 2011 10:23:04 +0100 |
parents | 6a3adca16910 |
children |
line wrap: on
line source
(cl:in-package #:amuse-datasets) (defmethod make-dataset ((identifier midifile-dataset-identifier) composition-identifiers &optional description) (make-instance 'midifile-dataset :%data composition-identifiers :identifier identifier :description description)) (defmethod get-dataset ((dataset-identifier midifile-dataset-identifier)) (let ((midifile-paths (append (directory (merge-pathnames (dataset-path dataset-identifier) "*.mid*")) (directory (merge-pathnames (dataset-path dataset-identifier) "*.MID*"))))) (unless midifile-paths (warn "No midifiles in: ~A" (dataset-path dataset-identifier)) (return-from get-dataset nil)) (loop for path in midifile-paths collect (make-composition-identifier (implementation-package dataset-identifier) path) into composition-identifiers finally (return (make-dataset dataset-identifier composition-identifiers)))))