comparison NNLSChroma.cpp @ 79:f50f701df33e matthiasm-plugin

debugged semitone spectrum (has values now even if all are zero)
author matthiasm
date Mon, 15 Nov 2010 09:23:49 +0900
parents ba930176df5b
children e8ceb7d3bd4f
comparison
equal deleted inserted replaced
78:d52884de7d79 79:f50f701df33e
395 // cerr << mode << endl; 395 // cerr << mode << endl;
396 chroma[signifIndex[iNote] % 12] += x[iNote] * treblewindow[signifIndex[iNote]]; 396 chroma[signifIndex[iNote] % 12] += x[iNote] * treblewindow[signifIndex[iNote]];
397 basschroma[signifIndex[iNote] % 12] += x[iNote] * basswindow[signifIndex[iNote]]; 397 basschroma[signifIndex[iNote] % 12] += x[iNote] * basswindow[signifIndex[iNote]];
398 } 398 }
399 } 399 }
400 } else {
401 for (int i = 0; i < 84; ++i) f3.values.push_back(0);
400 } 402 }
401 403
402 f4.values = chroma; 404 f4.values = chroma;
403 f5.values = basschroma; 405 f5.values = basschroma;
404 chroma.insert(chroma.begin(), basschroma.begin(), basschroma.end()); // just stack the both chromas 406 chroma.insert(chroma.begin(), basschroma.begin(), basschroma.end()); // just stack the both chromas