Mercurial > hg > silvet
comparison src/Instruments.cpp @ 268:00d76494a722
Thresholds and tidy
author | Chris Cannam |
---|---|
date | Wed, 23 Jul 2014 18:28:29 +0100 |
parents | c9d2809cb86d |
children | ebe5e0942bb8 |
comparison
equal
deleted
inserted
replaced
267:a8c05709e486 | 268:00d76494a722 |
---|---|
160 instr.maxPolyphony = 5; | 160 instr.maxPolyphony = 5; |
161 instr.levelThreshold = 6; | 161 instr.levelThreshold = 6; |
162 | 162 |
163 if (isBowedString(i)) { | 163 if (isBowedString(i)) { |
164 instr.maxPolyphony = 2; | 164 instr.maxPolyphony = 2; |
165 // instr.levelThreshold = 3; | 165 instr.levelThreshold = 5; |
166 stringTemplates.push_back(t); | 166 stringTemplates.push_back(t); |
167 } | 167 } |
168 if (isWind(i)) { | 168 if (isWind(i)) { |
169 instr.maxPolyphony = 2; | 169 instr.maxPolyphony = 2; |
170 // instr.levelThreshold = 5; | |
171 windTemplates.push_back(t); | 170 windTemplates.push_back(t); |
172 } | 171 } |
173 if (isOK(instr)) { | 172 if (isOK(instr)) { |
174 ii.push_back(instr); | 173 ii.push_back(instr); |
175 } | 174 } |
178 InstrumentPack all(silvet_templates_lowest_note, | 177 InstrumentPack all(silvet_templates_lowest_note, |
179 silvet_templates_highest_note, | 178 silvet_templates_highest_note, |
180 "Multiple or unknown instruments", | 179 "Multiple or unknown instruments", |
181 allTemplates); | 180 allTemplates); |
182 all.maxPolyphony = 5; | 181 all.maxPolyphony = 5; |
183 all.levelThreshold = 6;//!!! but this does need to be a parameter too, or else we need to be able to detect very quiet stuff somehow | 182 all.levelThreshold = 6; |
184 if (isOK(all)) { | 183 if (isOK(all)) { |
185 ii.insert(ii.begin(), all); | 184 ii.insert(ii.begin(), all); |
186 } | 185 } |
187 | 186 |
188 InstrumentPack strings(silvet_templates_lowest_note, // cello | 187 InstrumentPack strings(silvet_templates_lowest_note, // cello |
189 silvet_templates_highest_note, // violin | 188 silvet_templates_highest_note, // violin |
190 "String quartet", | 189 "String quartet", |
191 stringTemplates); | 190 stringTemplates); |
192 strings.maxPolyphony = 5; | 191 strings.maxPolyphony = 5; |
193 strings.levelThreshold = 3; | 192 strings.levelThreshold = 5; |
194 if (isOK(strings)) { | 193 if (isOK(strings)) { |
195 ii.push_back(strings); | 194 ii.push_back(strings); |
196 } | 195 } |
197 | 196 |
198 InstrumentPack winds(silvet_templates_lowest_note, // basson | 197 InstrumentPack winds(silvet_templates_lowest_note, // basson |