adding unit tests for spectrograms and energy + fixing bugs with Spectrogram.cc