changeset 220:81288afddf43

Add piano and viola (for string quartet) to instruments, update RDF
author Chris Cannam
date Tue, 15 Jul 2014 17:18:04 +0100
parents a144217a9cfb
children f4265591d9e5
files silvet.n3 src/Instruments.cpp
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/silvet.n3	Tue Jul 15 16:40:58 2014 +0100
+++ b/silvet.n3	Tue Jul 15 17:18:04 2014 +0100
@@ -80,7 +80,7 @@
     vamp:unit           "" ;
     vamp:quantize_step   1  ;
     vamp:default_value   0 ;
-    vamp:value_names     ( "Multiple or unknown instruments" "Piano" "Guitar" "Violin" "Cello" "Horn" "Flute" "Oboe" "Clarinet" "Tenor Sax" "Bassoon" "String ensemble" "Wind ensemble");
+    vamp:value_names     ( "Multiple or unknown instruments" "Piano" "Guitar" "Violin" "Viola" "Cello" "Horn" "Flute" "Oboe" "Clarinet" "Tenor Sax" "Bassoon" "String quartet" "Wind ensemble");
     .
 plugbase:silvet_param_finetune a  vamp:QuantizedParameter ;
     vamp:identifier     "finetune" ;
--- a/src/Instruments.cpp	Tue Jul 15 16:40:58 2014 +0100
+++ b/src/Instruments.cpp	Tue Jul 15 17:18:04 2014 +0100
@@ -34,6 +34,7 @@
     // name and one for the template to look up
     "Guitar", "guitar",
     "Violin", "violin",
+    "Viola", "viola",
     "Cello", "cello",
     "Horn", "horn",
     "Flute", "flute",
@@ -44,10 +45,11 @@
 };
 
 static bool
-isString(int i)
+isBowedString(int i)
 {
     string tname(simpleInstruments[i+1]);
     return tname == "violin"
+	|| tname == "viola"
 	|| tname == "cello"
 	;
 }
@@ -124,11 +126,13 @@
     allTemplates.push_back(templatesFor("piano1"));
     allTemplates.push_back(templatesFor("piano2"));
     allTemplates.push_back(templatesFor("piano3"));
+    allTemplates.push_back(templatesFor("pianorwc"));
 
     vector<Templates> pianoTemplates;
     pianoTemplates.push_back(templatesFor("piano1"));
     pianoTemplates.push_back(templatesFor("piano2"));
     pianoTemplates.push_back(templatesFor("piano3"));
+    pianoTemplates.push_back(templatesFor("pianorwc"));
     InstrumentPack piano(silvet_templates_lowest_note,
 			 silvet_templates_highest_note,
 			 "Piano",
@@ -161,7 +165,7 @@
 //        instr.pitchSparsity = 1.5;
         instr.maxPolyphony = 5;
         instr.levelThreshold = 6;
-	if (isString(i)) {
+	if (isBowedString(i)) {
 //            instr.maxPolyphony = 2;
 //            instr.levelThreshold = 3;
 	    stringTemplates.push_back(t);
@@ -188,7 +192,7 @@
 
     InstrumentPack strings(silvet_templates_lowest_note,  // cello
 			   silvet_templates_highest_note, // violin
-			   "String ensemble",
+			   "String quartet",
 			   stringTemplates);
     strings.maxPolyphony = 5;
     strings.levelThreshold = 3;