Mercurial > hg > amuse
view base/datasets/datasets-file/methods.lisp @ 258:aac79c0ac1b9
add within-short-bar-p, and use this to correctly calculate the
ioi-from-bar of anacruses
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 18:50:38 +0000 |
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)))))