diff yeti/templates.yeti @ 23:990b8b8b7e25

Hardcode the ranges
author Chris Cannam
date Fri, 28 Mar 2014 15:38:07 +0000
parents 782b910394f3
children
line wrap: on
line diff
--- a/yeti/templates.yeti	Fri Mar 28 14:00:40 2014 +0000
+++ b/yeti/templates.yeti	Fri Mar 28 15:38:07 2014 +0000
@@ -30,8 +30,21 @@
             done;
     done instruments;
 
+hardcodedRanges = [
+    "bassoon": { lowest = 15, highest = 51 },
+    "cello": { lowest = 15, highest = 60 },
+    "clarinet": { lowest = 29, highest = 68 },
+    "flute": { lowest = 39, highest = 72 },
+    "guitar": { lowest = 19, highest = 55 },
+    "horn": { lowest = 20, highest = 56 },
+    "oboe": { lowest = 37, highest = 70 },
+    "tenorsax": { lowest = 23, highest = 54 },
+    "violin": { lowest = 34, highest = 72 },
+    "piano-maps-SptkBGCl": { lowest = 16, highest = 72 },
+];
+
 //!!! these ranges are hardcoded, in the original (and are a bit more restrictive)
-extractRanges templates = mapIntoHash id
+extractRanges' templates = mapIntoHash id
     do instrument:
         levels = map vec.sum (mat.asColumns (templates[instrument]));
         first = length levels - length (find (>0) levels);
@@ -39,6 +52,8 @@
         { lowest = first, highest = last }
     done (keys templates);
 
+extractRanges templates = hardcodedRanges;
+
 {
     loadTemplates,
     extractRanges