Spectrogram analysis of Tube Amplifier Distortion (PC simulation)
FFT spectrum of 1KHz-10dB_44100Hz_400ms-TwoTube_stereo.wav. There are 2nd harmonic(2KHz) and 3rd harmonic(3KHz).
BPF_analysis1.py output. Dark white line in the mid area shows 2nd harmonic(2KHz). Bright white line shows 1KHz.
Start wave pattern is filter transient response.
FFT spectrum of Mix_400Hz1KHz-10dB_44100Hz_400msec_TwoTube_mono.wav. There are 600Hz, 1400Hz, etc other than 800Hz, 2KHz, 1600Hz and 3000Hz.
BPF_analysis1.py output. Dark white lines show 600Hz, 1400Hz, and 2KHz.
A music spectrogram comparison of input and output of Tube Amplifier (PC simulation).
Matching portion (red rectangle area) in the template spectrogram to compare.
Set diagonal position by pointing-device mouse and exist figure. Matching portion in the matching spectrogram will be detected by cv2.matchTemplate function.
each matching portion of template spectrogram and matching spectrogram
matching portion and its difference (red means positive and blue means negative)
Specify the area as diagonal position by pointing-device mouse. And then, click right mouse button or press m on keyboard.
In the following figure, from top to bottom, spectrogram, 2D inverse FFT of red rectangle in 2D FFT, and 2D FFT of the spectrogram.
Load stero(2 channel) wav file and make Spectrogram per each channel (show Figure 1 and Figure 2).
Search some similar area to the specified area in another channel.
Specify the area as diagonal position by pointing-device mouse. And then, click right mouse button or press m on keyboard.
After above completed, then press c on keyboard. It will compute difference between both channel, after time correction.
Peak or bottom in the difference, frequency characteristic between channels, is significant, because real signal is available at the point to be compared.
BPF_analysis2.py was added simple moving average until 800Hz signal to accentuate ridge of local peak.
MIT
Regarding to nms.py, please refer copyright and license notice in the content.