def plotMagnitudeSpectrogram(self, rate, sample, framesz, hop):

        X = self.STFT(sample, rate, framesz, hop)

        # Plot the magnitude spectrogram.
        pylab.figure('Magnitude spectrogram')
        pylab.imshow(scipy.absolute(X.T), origin='lower', aspect='auto',
                     interpolation='nearest')
        pylab.xlabel('Time')
        pylab.ylabel('Frequency')
        pylab.show()
Calculates and plots the magnitude spectrum of a given sound wave.
dataset/ETHPy150Open Agerrr/Automated_Music_Transcription/first_peaks_method.py/MIDI_Detector.plotMagnitudeSpectrogram