31 "key",
"ThreeBandCompressor",
32 "category",
"Spectral Transformations",
33 "description",
"ThreeBandCompressor",
36 static FactoryRegistrator<ProcessingFactory, ThreeBandCompressor>
reg =
metadata;
44 const DataArray& iMag = in.GetMagBuffer();
46 int spectrumSize = in.
GetSize();
48 TData spectralResolution = spectrumSize/in.GetSpectralRange();
58 TData currentThreshold = lowThreshold;
59 for(
int i = 0; i<lowCutoff; i++)
61 if(iMag[i]>lowThreshold)
62 oMag[i] = lowThreshold;
64 for(
int i = lowCutoff; i<highCutoff; i++)
66 if(iMag[i]>midThreshold)
67 oMag[i] = midThreshold;
69 for(
int i = highCutoff; i<spectrumSize; i++)
71 if(iMag[i]>highThreshold)
72 oMag[i] = highThreshold;