comparison src/LiveInstruments.cpp @ 302:cac0be04c43c livemode

Add output for the templates (probably temporarily)
author Chris Cannam
date Tue, 02 Dec 2014 17:13:10 +0000
parents 00fab71b80ec
children d8468176339d
comparison
equal deleted inserted replaced
301:00fab71b80ec 302:cac0be04c43c
53 53
54 sum += t.data[j][k]; 54 sum += t.data[j][k];
55 } 55 }
56 56
57 // re-normalise 57 // re-normalise
58 for (int k = 0; k < (int)t.data[j].size(); ++k) { 58 if (sum > 0.f) {
59 t.data[j][k] *= 1.f / sum; 59 for (int k = 0; k < (int)t.data[j].size(); ++k) {
60 t.data[j][k] *= 1.f / sum;
61 }
60 } 62 }
61 } 63 }
62 64
63 templates.push_back(t); 65 templates.push_back(t);
64 } 66 }