Spectrogram Examples [Python]

Sdílet
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

Komentáře • 44

  • @Alopez3297
    @Alopez3297 Před 4 lety +22

    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.

  • @juliogodel
    @juliogodel Před 3 lety

    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!!!!!

  • @YunusEmreBalak
    @YunusEmreBalak Před 4 lety +3

    I'm a CS student and loved your style a lot. I watched your video with real excitement.

  • @annapan2666
    @annapan2666 Před rokem +1

    Steve, you are an amazing teacher!

  • @matthewlennon6289
    @matthewlennon6289 Před 3 lety +2

    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?

  • @deldridg
    @deldridg Před 7 měsíci

    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

  • @SRIMANTASANTRA
    @SRIMANTASANTRA Před 4 lety +1

    Hi Professor Steve, Thank you.

  • @frankservant5754
    @frankservant5754 Před 2 lety

    Love your passion i learnt a lot from this video

  • @gabrielhollander8121
    @gabrielhollander8121 Před 3 lety +1

    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!

    • @vigneshb5347
      @vigneshb5347 Před 2 lety +1

      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.

  • @alephgates7519
    @alephgates7519 Před 3 lety

    These are well made subbed. Also this is fun :)

  • @AbhishekMishra-fr7po
    @AbhishekMishra-fr7po Před 3 lety +1

    Awesome video sir...actually i m unable to load the audio file via librosa...throws nobackenderror ..is it something m doing wrong?

  • @thewhoyouknow
    @thewhoyouknow Před 2 lety +2

    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!

    • @deldridg
      @deldridg Před 7 měsíci

      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!

  • @smilebig3884
    @smilebig3884 Před 4 lety +3

    Thanks for the beautiful lecture. Quick question, how can we apply svd on this spectogram?

    • @Eigensteve
      @Eigensteve  Před 4 lety +1

      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.

  • @andrewsoong8817
    @andrewsoong8817 Před 4 lety +2

    I absolutely love your videos and book! Is there any way to obtain the Python code for the material in your book?

    • @F255123
      @F255123 Před 3 lety

      The code can be found here:
      github.com/dynamicslab/databook_python

  • @aoliveira_
    @aoliveira_ Před rokem

    With librosa, the load method don't return the original sampling rate but a default one used in that library.

  • @shakeelsahito619
    @shakeelsahito619 Před 3 lety

    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

  • @user-pm5pd9ur4k
    @user-pm5pd9ur4k Před rokem

    can I select a specific range in the spectrogram? like zooming a range of it?

  • @lancelotdsouza4705
    @lancelotdsouza4705 Před 2 lety

    Beautiful video

  • @tobiassamuelsugandi6623
    @tobiassamuelsugandi6623 Před 10 měsíci

    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?

  • @myozinaung
    @myozinaung Před 4 lety +2

    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.

    • @Eigensteve
      @Eigensteve  Před 4 lety +6

      I am using a "lightboard". If you google this, you will find lots of resources.

  • @nowrozimohammad
    @nowrozimohammad Před 3 lety +1

    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

  • @athoumanimoustadjib7813

    What is the stft cod python please ?

  • @aliteralsink2814
    @aliteralsink2814 Před 3 lety

    can you write it here because i dont understand english when someone is speaking them?

  • @Sutirtha
    @Sutirtha Před 3 lety +1

    Can we build a video spectrogram? Any libraries in python?

    • @Eigensteve
      @Eigensteve  Před 3 lety +1

      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...

    • @Sutirtha
      @Sutirtha Před 3 lety

      @@Eigensteve I wanted a spectogram made from.video data only.

  • @karimharoun1684
    @karimharoun1684 Před 3 lety

    Dear Professor,
    is the code in Python available ?
    Thank you

  • @eToguard
    @eToguard Před 3 lety

    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!

  • @ruichenfu7684
    @ruichenfu7684 Před 3 lety +1

    How can I save the spectrogram?

    • @Eigensteve
      @Eigensteve  Před 3 lety

      You can try saving the spectrogram as an image, or you can save the STFT matrix in a file.

  • @Matter743
    @Matter743 Před 3 lety

    Can we use scalogram? For audio signal

    • @AbhishekMishra-fr7po
      @AbhishekMishra-fr7po Před 3 lety

      yes he just did
      in the video

    • @Matter743
      @Matter743 Před 3 lety

      @@AbhishekMishra-fr7po no it's spectrogram I am talking about plotting using discrete wavelet transform...that ll be scalogram..yea

  • @avidreader100
    @avidreader100 Před 3 lety

    ipd.Audio plays sound neatly

  • @iLeno
    @iLeno Před 2 lety +1

    using:
    import IPython.display as display
    display.Audio(x, rate=fs)
    fixes the audio thing he has. Anyways awesome video.

  • @dpm2213
    @dpm2213 Před 3 lety

    I wanted to make a music visualizer and now I am here at 2:41 AM

  • @treksis
    @treksis Před rokem

    Booobooooooooup @3:00 😆😆😆