Mercurial > hg > constant-q-cpp
changeset 137:9bdabd830609
Bins are from high to low, not low to high (for getBinFrequencies)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 May 2014 17:24:55 +0100 |
parents | 8970f4838285 |
children | 7563025cc1b1 |
files | src/ConstantQ.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ConstantQ.cpp Mon May 19 17:24:17 2014 +0100 +++ b/src/ConstantQ.cpp Mon May 19 17:24:55 2014 +0100 @@ -80,6 +80,8 @@ double ConstantQ::getBinFrequency(int bin) const { + // our bins are returned in high->low order + bin = (getBinsPerOctave() * getOctaves()) - bin - 1; return getMinFrequency() * pow(2, (double(bin) / getBinsPerOctave())); }