On my home stereo I have a spectrograph that has a 2D matrix, whereby the X axis is the frequency (deep bass on the left, vocals in the center, treble on the right), and the Y axis is the volume or power of the sound at that frequency. I have seen things like this for Ubuntu, but they work on MP3 files or other pre recorded songs. Is there anything that can do this real time for a microphone attached or simply the system mixer?
This may be a bit overkill, but Baudline is an incredible real-time FFT spectrogram. It's not in Ubuntu repos, so you will need to download it on your own. It displays a real-time analysis of source signal, but it also allows to analyze pre-recorded data. The brightness of a point represent the power of the sound at this frequency, where horizontal axis represents frequencies, and vertical time - so it kind of shows history of your signal.
It's extensive features make it definitely the most advanced spectrogram available for Linux. It may be a bit too complicated for your uses, though. I am not sure what exactly you are looking for.
The JACK & ALSA Audio Analyser, an audio signal generator and spectrum analyser.
glferis a GTK+ application with a waterfall spectrum display and slow CW (QRSS) / dual-frequency CW (DFCW) transmitter control interface. [ . . . ] The signal to be analyzed can be acquired in real-time from the sound card or can be read from a
The Quisk receiver can read the sample data, tune it, filter it, demodulate it, and send the audio to the sound card for output to external headphones or speakers. The Quisk transmitter can accept microphone input and send that to your transmitter via a soundcard or Ethernet.
Spek (IPA: /spɛk/, ‘bacon’ in Dutch) helps to analyse your audio files by showing their spectrogram. Spek is free software available for Unix, Windows and Mac OS X.
The sox tool is able to create a spectrogram:
sox Test.wav -n spectrogram -o Test.png
- example: https://thepenguin.eu/2017-09-27-create-spectrograms-with-sox/
- documentation with additional options: http://sox.sourceforge.net/sox.html
I just came accross this python snippet searching for the exact same thing and it works quite great :
Really simple, you will need to install with pip3 : - numpy as np - pyqtgraph as pg - pyaudio - PyQt4
To get it work , I converted line
self.img_array = np.zeros((1000, CHUNKSZ/2+1))
to self.img_array = np.zeros((1000, math.floor(CHUNKSZ/2+1)))
to remove the float to int conversion error.
then $ python3 script.py
If you develop in python, funny stuff can be added to this really cool base.