annotate implementations/midi-db/examples/importing-midifiles.lisp @ 310:f99fd6a7bbfc

Add midi-db. Ignore-this: c6f4fc32efa4453ddbdc478793eedd52 A basic implementation for working with MIDI files stored in the database. It is a test case for `versioned' data, but only partially implemented at the moment. darcs-hash:20100223152703-16a00-4388d2720907d777a1c6c6b3a010885ce0fe06a7.gz
author j.forth <j.forth@gold.ac.uk>
date Tue, 23 Feb 2010 15:27:03 +0000
parents
children 55c188ef8b0a
rev   line source
j@310 1 (cl:in-package #:amuse-midi-db)
j@310 2
j@310 3 (connect-to-database :database-name "amuse"
j@310 4 :username "jamief") ; needs to be adequate permissions
j@310 5
j@310 6 (create-midi-db-tables *amuse-database*)
j@310 7
j@310 8 ;(drop-midi-db-tables *amuse-database*)
j@310 9
j@310 10 (register-new-implementation *package*)
j@310 11
j@310 12
j@310 13 ;;;=====================================================================
j@310 14 ;;; Import collections of drum loops (from Marcus)
j@310 15 ;;;=====================================================================
j@310 16
j@310 17 ;;; Dangerous Drums
j@310 18 (let ((collection-identifier
j@310 19 (register-new-collection "Dangerous Drums"
j@310 20 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks."
j@310 21 *amuse-database*)))
j@310 22
j@310 23 (import-midifiles
j@310 24 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/DangerousDrums/"
j@310 25 collection-identifier
j@310 26 *amuse-database*))
j@310 27
j@310 28
j@310 29 ;;; LA Riot v1
j@310 30 (let ((collection-identifier
j@310 31 (register-new-collection "LA Riot V1"
j@310 32 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks."
j@310 33 *amuse-database*)))
j@310 34
j@310 35 (import-midifiles
j@310 36 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/LARiotv1/"
j@310 37 collection-identifier
j@310 38 *amuse-database*))
j@310 39
j@310 40 ;;; Midi breakbeats v8
j@310 41 (let ((collection-identifier
j@310 42 (register-new-collection "MIDI Breakbeats V8"
j@310 43 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks."
j@310 44 *amuse-database*)))
j@310 45
j@310 46 (import-midifiles
j@310 47 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/MIDIBreakbeatsv8/"
j@310 48 collection-identifier
j@310 49 *amuse-database*))
j@310 50
j@310 51 (disconnect-from-database)