implement getSpectrum() and a draft of getBPM().