Mercurial > hg > amuse
comparison implementations/midi-db/examples/importing-midifiles.lisp @ 238:55c188ef8b0a
Update midi-db example (add clapping music to db).
Ignore-this: 36c28b012dc8a50b1daf6a7ec4de5105
darcs-hash:20100414183655-16a00-f4e9de706e2f6869d977fe35511507cb2a1d5bb0.gz
committer: Jamie Forth <j.forth@gold.ac.uk>
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 11:23:18 +0000 |
parents | a5d065905f6d |
children | 66f9c2913ac7 |
comparison
equal
deleted
inserted
replaced
237:be5cd4c5ecc2 | 238:55c188ef8b0a |
---|---|
1 (cl:in-package #:amuse-midi-db) | 1 (cl:in-package #:amuse-midi-db) |
2 | 2 |
3 (connect-to-database :database-name "amuse" | 3 (connect-to-database :database-name "amuse" |
4 :username "jamief") ; needs to be adequate permissions | 4 :username "jamief") ; needs to be adequate permissions |
5 | 5 |
6 (create-midi-db-tables *amuse-database*) | 6 ;(create-midi-db-tables *amuse-database*) ; if not already created |
7 | 7 |
8 ;(drop-midi-db-tables *amuse-database*) | 8 ;(drop-midi-db-tables *amuse-database*) |
9 | 9 |
10 (register-new-implementation *package*) | 10 ;(register-new-implementation *package*) ; if not already registered |
11 | 11 |
12 | 12 |
13 ;;;===================================================================== | 13 ;;;===================================================================== |
14 ;;; Import collections of drum loops (from Marcus) | 14 ;;; Import collections of drum loops (from Marcus) |
15 ;;;===================================================================== | 15 ;;;===================================================================== |
19 (register-new-collection "Dangerous Drums" | 19 (register-new-collection "Dangerous Drums" |
20 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." | 20 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." |
21 *amuse-database*))) | 21 *amuse-database*))) |
22 | 22 |
23 (import-midifiles | 23 (import-midifiles |
24 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/DangerousDrums/" | 24 "/home/jamie/music/midifiles/marcus-midifiles/DangerousDrums/" |
25 collection-identifier | 25 collection-identifier |
26 *amuse-database*)) | 26 *amuse-database*)) |
27 | 27 |
28 | 28 |
29 ;;; LA Riot v1 | 29 ;;; LA Riot v1 |
31 (register-new-collection "LA Riot V1" | 31 (register-new-collection "LA Riot V1" |
32 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." | 32 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." |
33 *amuse-database*))) | 33 *amuse-database*))) |
34 | 34 |
35 (import-midifiles | 35 (import-midifiles |
36 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/LARiotv1/" | 36 "/home/jamie/music/midifiles/marcus-midifiles/LARiotv1/" |
37 collection-identifier | 37 collection-identifier |
38 *amuse-database*)) | 38 *amuse-database*)) |
39 | 39 |
40 ;;; Midi breakbeats v8 | 40 ;;; Midi breakbeats v8 |
41 (let ((collection-identifier | 41 (let ((collection-identifier |
42 (register-new-collection "MIDI Breakbeats V8" | 42 (register-new-collection "MIDI Breakbeats V8" |
43 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." | 43 "Collection of drum loops. Each 'composition' is a collection of loops on separate tracks." |
44 *amuse-database*))) | 44 *amuse-database*))) |
45 | 45 |
46 (import-midifiles | 46 (import-midifiles |
47 "/home/jamie/Music/MIDIFiles/MarcusMIDIFiles/MIDIBreakbeatsv8/" | 47 "/home/jamie/music/midifiles/marcus-midifiles/MIDIBreakbeatsv8/" |
48 collection-identifier | 48 collection-identifier |
49 *amuse-database*)) | 49 *amuse-database*)) |
50 | 50 |
51 | |
52 ;;;===================================================================== | |
53 ;;; Import Clapping Music (from Marcus) | |
54 ;;;===================================================================== | |
55 | |
56 (let ((collection-identifier | |
57 (register-new-collection "Clapping Music" | |
58 "Three versions of Steve Reich's Clapping Music." | |
59 *amuse-database*))) | |
60 | |
61 (import-midifiles | |
62 "/home/jamie/music/midifiles/modernism/clapping-music/" | |
63 collection-identifier | |
64 *amuse-database*)) | |
65 | |
66 | |
51 (disconnect-from-database) | 67 (disconnect-from-database) |