Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Audio GetSpectrumData from sound file not recorder.

Discussion in 'Audio & Video' started by we00037890, Mar 30, 2019.

  1. we00037890

    we00037890

    Joined:
    Sep 23, 2017
    Posts:
    5
    Hello, i would like to create an spectrogram image from my sound file.
    I successfully did it with the real-time live recording with AudioListener but the problem is they only read the live data from my micro.
    Is there any possible way to do it ?
    Thanks you in advance.
    .
    Here is the example of what i wanna do, but not real-time. I wanna it to create an image right after i import the sound file. (*.wav, *.mp3, ...)
     
    Last edited: Mar 31, 2019
  2. seanfwilson

    seanfwilson

    Joined:
    Jun 4, 2017
    Posts:
    2
    Unity only allows current audio buffer reads using the GetSpectrumData functions.
    To read an entire file ahead you would probably have to implement a third party FFT library like Kiss FFT