diff src/Instruments.cpp @ 342:ad45b18427e0

Merge from branch livemode
author Chris Cannam
date Mon, 06 Jul 2015 09:15:21 +0100
parents 1bfde6dba499
children
line wrap: on
line diff
--- a/src/Instruments.cpp	Tue Apr 28 11:09:31 2015 +0100
+++ b/src/Instruments.cpp	Mon Jul 06 09:15:21 2015 +0100
@@ -19,16 +19,28 @@
 
 #include <iostream>
 
-const int InstrumentPack::templateNoteCount = SILVET_TEMPLATE_NOTE_COUNT;
-const int InstrumentPack::templateHeight = SILVET_TEMPLATE_HEIGHT;
-const int InstrumentPack::templateMaxShift = SILVET_TEMPLATE_MAX_SHIFT;
-const int InstrumentPack::templateSize = SILVET_TEMPLATE_SIZE;
-
 using std::string;
 using std::vector;
 using std::cerr;
 using std::endl;
 
+InstrumentPack::InstrumentPack(int lowest, int highest,
+                               std::string n, std::vector<Templates> tt) :
+    templateNoteCount(SILVET_TEMPLATE_NOTE_COUNT),
+    templateHeight(SILVET_TEMPLATE_HEIGHT),
+    templateMaxShift(SILVET_TEMPLATE_MAX_SHIFT),
+    templateSize(SILVET_TEMPLATE_SIZE),
+    lowestNote(lowest),
+    highestNote(highest),
+    maxPolyphony(5),
+    pitchSparsity(1.1),
+    sourceSparsity(1.2),
+    levelThreshold(5),
+    name(n),
+    templates(tt)
+{
+}
+
 const char *simpleInstruments[] = {
     // Each instrument has two consecutive slots, one for the pack
     // name and one for the template to look up
@@ -134,7 +146,7 @@
 			 "Piano",
 			 pianoTemplates);
     piano.maxPolyphony = 6;
-    piano.levelThreshold = 6;
+    piano.levelThreshold = 5;
     piano.pitchSparsity = 1.0;
     piano.sourceSparsity = 1.0;
     if (isOK(piano)) {
@@ -188,8 +200,8 @@
 			   silvet_templates_highest_note, // violin
 			   "String quartet",
 			   stringTemplates);
-    strings.maxPolyphony = 5;
-    strings.levelThreshold = 5;
+    strings.maxPolyphony = 6;
+    strings.levelThreshold = 3;
     if (isOK(strings)) {
 	ii.push_back(strings);
     }