Mercurial > hg > silvet
comparison src/Instruments.cpp @ 213:5bde003a43a9
Make source sparsity configurable in instrument pack as well as pitch sparsity; make both equal to 1 for piano templates
author | Chris Cannam |
---|---|
date | Tue, 15 Jul 2014 13:28:25 +0100 |
parents | 4840c6306b4f |
children | c0779464b792 |
comparison
equal
deleted
inserted
replaced
212:8f48b65a6ef2 | 213:5bde003a43a9 |
---|---|
130 InstrumentPack piano(silvet_templates_lowest_note, | 130 InstrumentPack piano(silvet_templates_lowest_note, |
131 silvet_templates_highest_note, | 131 silvet_templates_highest_note, |
132 "Piano", | 132 "Piano", |
133 pianoTemplates); | 133 pianoTemplates); |
134 // piano.maxPolyphony = 8; | 134 // piano.maxPolyphony = 8; |
135 // piano.levelThreshold = 3; | 135 // piano.levelThreshold = 4; |
136 piano.maxPolyphony = 5; | 136 piano.maxPolyphony = 5; |
137 piano.levelThreshold = 6; | 137 piano.levelThreshold = 6; |
138 piano.pitchSparsity = 1.0; | |
139 piano.sourceSparsity = 1.0; | |
138 if (isOK(piano)) { | 140 if (isOK(piano)) { |
139 ii.push_back(piano); | 141 ii.push_back(piano); |
140 } | 142 } |
141 | 143 |
142 vector<Templates> stringTemplates; | 144 vector<Templates> stringTemplates; |
143 vector<Templates> windTemplates; | 145 vector<Templates> windTemplates; |
144 | 146 |
145 for (int i = 0; | 147 for (int i = 0; |
146 i < int(sizeof(simpleInstruments)/sizeof(simpleInstruments[0])); | 148 i < int(sizeof(simpleInstruments)/sizeof(simpleInstruments[0])); |
147 i += 2) { | 149 i += 2) { |
150 | |
148 vector<Templates> tt; | 151 vector<Templates> tt; |
149 Templates t = templatesFor(simpleInstruments[i+1]); | 152 Templates t = templatesFor(simpleInstruments[i+1]); |
150 tt.push_back(t); | 153 tt.push_back(t); |
151 allTemplates.push_back(t); | 154 allTemplates.push_back(t); |
152 InstrumentPack instr(t.lowestNote, | 155 InstrumentPack instr(t.lowestNote, |