Spectrogram Examples [Python]
Vložit
- čas přidán 1. 06. 2024
- This video describes how to compute the Spectrogram in Python.
Book Website: databookuw.com
Book PDF: databookuw.com/databook.pdf
These lectures follow Chapter 2 from:
"Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control" by Brunton and Kutz
Amazon: www.amazon.com/Data-Driven-Sc...
Brunton Website: eigensteve.com
This video was produced at the University of Washington - Věda a technologie
Frankly, had my undergrad EE been taught this way, I would have chosen a more signals oriented path. Your lectures are down to earth and organized in one of the most digestible formats I’ve seen. Quality content, Steve, we appreciate your good work- it will do wonders for upcoming EE and CS students.
As always, an excellent explanation. I wish every book had this duo: book AND videos explaining. And doesn't stop here...all of this for free. Go and grab it. Thanks Prof. Steve Brunton!!!!!
I'm a CS student and loved your style a lot. I watched your video with real excitement.
Steve, you are an amazing teacher!
Hi Steve, love the video thank you! Had a question regarding your first example - does the oscillating nature of the neighbouring frequencies (ex. at time 0, power of 200Hz is red, and at time 0.3s, power of 200Hz is blue) indicate some aliasing of the signal? i.e. should the surrounding frequencies be more of a consistent band, less oscillation, in a more highly sampled case?
Marvellous stuff and thank you. You have a wonderful way of clearly articulating and conveying the essence of what could otherwise be overly dauntingly complex concepts to many of us. Izotope RX is a fabulous tool for editing sound in a spectrogram form. For example, you can visually identify bird noises in recordings, select them with a loop tool and replace them with some kind of average of the ambient sound in that frequency range, effectively eliminating them just from their particular frequency/time space. It's beautiful indeed and thanks to you, great to have a better idea of what goes on under the hood, as it were. Cheers and thank you - David
Hi Professor Steve, Thank you.
Love your passion i learnt a lot from this video
Super interesting video! I'm really interested in knowing how you recorded yourself to show the code? Did you use some kind of screen/projector to do so? Thanks for your help!
Me too, I am guessing ..He is writing it on a glass with illumination on top (like a light tube or channel), and also projecting the code onto it.
all this in a dark room, and he is also wearing dark cloths, a fill light illuminating him from top and side.
Camera captures him and his writing behind his back.
These are well made subbed. Also this is fun :)
Awesome video sir...actually i m unable to load the audio file via librosa...throws nobackenderror ..is it something m doing wrong?
This is very exciting! Actually, pianos are very hard to tune, no one uses a machine (that performs this spectrum analysis under the hood that you explained here) they must be tuned by ear. Usually, each key has 3 strings with a knob each that need to be turned separately. Moreover, as you just found here, usually, only the central keys are perfectly tuned. The lower keys are tuned incrementally lower than the they should and the higher keys are tuned a bit incrementally higher than they should. A perfectly tuned piano would sound terrible if you play chords. They say that disonant harmonics would occur. Congratulations for the book and the channel!
True. However, there are unscrupulous (and unmusical) people who claim to be piano tuners who do tune pianos using signal analysis tech only. They don't tune for blocks of chords by ear and the end result is horrendous. It takes many years to develop the ears and skills required to do this properly - it's quite an art form!
Thanks for the beautiful lecture. Quick question, how can we apply svd on this spectogram?
I usually just apply the SVD to the spectrogram matrix (the same matrix we are plotting). Then the columns are "eigen" short-time frequency components.
I absolutely love your videos and book! Is there any way to obtain the Python code for the material in your book?
The code can be found here:
github.com/dynamicslab/databook_python
With librosa, the load method don't return the original sampling rate but a default one used in that library.
Test a gas stove at, e.g., five different powers. Record the acoustic signal and the sound pressure level [this latter will not be a precise value, but their ratios will be]. For the acoustic signal, you can use, e.g., the Spectroid or Spectrogram app (there are a lot of apps out there to do FFT on the microphone signal). For the sound pressure level, you can use, e.g., the Andro sensor app. Evaluate the measurement result, can you please guide me for above task as i am facing problems
can I select a specific range in the spectrogram? like zooming a range of it?
Beautiful video
I wonder how different the SVD of the spectogram is compared with the Fourier basis and the Fourier coefficients.. since they are already some kind of eigenvalue eigenvector pairs?
Hi professor, I would like to know how you make these videos since I am planning to make an online course in my native language. A video on the process of making these videos will be very helpful to the teachers worldwide.
I am using a "lightboard". If you google this, you will find lots of resources.
How you plot a spectrogram if the data is already calculated and you just need to plot? I have order number as columns and rpm as rows
then you should just do the heatmap of the matrix
What is the stft cod python please ?
can you write it here because i dont understand english when someone is speaking them?
Can we build a video spectrogram? Any libraries in python?
There is an awesome video on youtube about the spectrogram of Beethoven, played as a movie. I don't know of any code to do this though...
@@Eigensteve I wanted a spectogram made from.video data only.
Dear Professor,
is the code in Python available ?
Thank you
github.com/dynamicslab/databook_python/tree/master/CH02
Just realized his macbook has the popping sound issue when he plays the sound. Mine got it a few minutes after playing the video. Odd... anyhow, just kill coreaudiod process and it's back to normal. *cough* apple needs to fix this *cough*
Edit: Forgot... Thanks for the wonderful content!
How can I save the spectrogram?
You can try saving the spectrogram as an image, or you can save the STFT matrix in a file.
Can we use scalogram? For audio signal
yes he just did
in the video
@@AbhishekMishra-fr7po no it's spectrogram I am talking about plotting using discrete wavelet transform...that ll be scalogram..yea
ipd.Audio plays sound neatly
using:
import IPython.display as display
display.Audio(x, rate=fs)
fixes the audio thing he has. Anyways awesome video.
I wanted to make a music visualizer and now I am here at 2:41 AM
Booobooooooooup @3:00 😆😆😆