Similar to #62: If nOctUp is not 0 the scaling doesn't work. This is caused by double s = std::pow(2.0, -double(i) / double(nPerOct + nOctUp)); which adds nOctUp to nPerOct before the division while the matlab code does scales = 2.^(-(0:nScales-1)/nPerOct+nOctUp); which adds it after the divion. Simple fix would be to cast both variables seperatly: double s = std::pow(2.0, -double(i) / double(nPerOct) + double(nOctUp));
Similar to #62: If
nOctUp
is not0
the scaling doesn't work. This is caused bydouble s = std::pow(2.0, -double(i) / double(nPerOct + nOctUp));
which addsnOctUp
tonPerOct
before the division while the matlab code doesscales = 2.^(-(0:nScales-1)/nPerOct+nOctUp);
which adds it after the divion. Simple fix would be to cast both variables seperatly:double s = std::pow(2.0, -double(i) / double(nPerOct) + double(nOctUp));