threshMult = thresh;
onsetFunction = new double[(int) numFrames];
this.numFrames = numFrames;
melSpec = new AvgMelSpec(swin / 2 + 1, sr, nmel);
// low frequency boost for bass drum
// double[] freqs = DSP.times(DSP.range(0,swin/2), sr/swin);
// double[] lfboost =
// DSP.times(DSP.log10(DSP.max(DSP.plus(DSP.rdivide(DSP.minus(200,