Mercurial > hg > silvet
comparison yeti/templates.yeti @ 12:0f6db1895e1c
Prepare the ground for cqt and templates
author | Chris Cannam |
---|---|
date | Fri, 21 Mar 2014 17:14:44 +0000 |
parents | |
children | e15bc63cb146 |
comparison
equal
deleted
inserted
replaced
11:f268212ac499 | 12:0f6db1895e1c |
---|---|
1 | |
2 module templates; | |
3 | |
4 vec = load may.vector; | |
5 | |
6 // Load instrument templates | |
7 | |
8 instruments = [ | |
9 "bassoon", | |
10 "cello", | |
11 "clarinet", | |
12 "flute", | |
13 "guitar", | |
14 "horn", | |
15 "oboe", | |
16 "tenorsax", | |
17 "violin", | |
18 "piano-maps-SptkBGCl" | |
19 ]; | |
20 | |
21 loadTemplates () = mapIntoHash id | |
22 do instrument: | |
23 readFile "../data/\(instrument).csv" "UTF-8" | |
24 do istr: | |
25 array | |
26 (map do line: | |
27 vec.fromList (map number (strSplit "," line)) | |
28 done (istr.lines ())); | |
29 done; | |
30 done instruments; | |
31 | |
32 { | |
33 loadTemplates | |
34 } | |
35 |