comparison data/model/FFTModel.cpp @ 1200:825d0d7641ba spectrogram-minor-refactor

Restore phase display
author Chris Cannam
date Thu, 04 Aug 2016 14:02:56 +0100
parents 6d09ad2ab21f
children 6f7a440b6218
comparison
equal deleted inserted replaced
1199:4d0d94ba2ea7 1200:825d0d7641ba
98 { 98 {
99 auto cplx = getFFTColumn(x); 99 auto cplx = getFFTColumn(x);
100 Column col; 100 Column col;
101 col.reserve(cplx.size()); 101 col.reserve(cplx.size());
102 for (auto c: cplx) col.push_back(abs(c)); 102 for (auto c: cplx) col.push_back(abs(c));
103 return move(col);
104 }
105
106 FFTModel::Column
107 FFTModel::getPhases(int x) const
108 {
109 auto cplx = getFFTColumn(x);
110 Column col;
111 col.reserve(cplx.size());
112 for (auto c: cplx) col.push_back(arg(c));
103 return move(col); 113 return move(col);
104 } 114 }
105 115
106 float 116 float
107 FFTModel::getMagnitudeAt(int x, int y) const 117 FFTModel::getMagnitudeAt(int x, int y) const