Mercurial > hg > silvet
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/yeti/templates.yeti Fri Mar 21 17:14:44 2014 +0000 @@ -0,0 +1,35 @@ + +module templates; + +vec = load may.vector; + +// Load instrument templates + +instruments = [ + "bassoon", + "cello", + "clarinet", + "flute", + "guitar", + "horn", + "oboe", + "tenorsax", + "violin", + "piano-maps-SptkBGCl" +]; + +loadTemplates () = mapIntoHash id + do instrument: + readFile "../data/\(instrument).csv" "UTF-8" + do istr: + array + (map do line: + vec.fromList (map number (strSplit "," line)) + done (istr.lines ())); + done; + done instruments; + +{ + loadTemplates +} +