Search Unity

Beats Per Minute detection and FFT

Discussion in 'Audio & Video' started by Eric_Lin, Dec 18, 2014.

  1. Eric_Lin

    Eric_Lin

    Joined:
    Oct 29, 2014
    Posts:
    32
    Hi,
    Recently,I've been trying to implement some applications about audio. What I want to do is to read the stream buffer(the audio maybe comes from website or phone's SD card), and give it to FFT to analysis its frequency maybe show the correspond frequency on the screen. Is there any one might know where I can start? Sorry for my bad English btw. Thanks in advance.
     
  2. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    there are 1-2 bpm assets on the asset store, it would save you a while coding. the FFT function is integrated in Unity, check the references and forums. BPM involves counting peaks and finding what times they happen at, it's general programming research, i.e. google all the info you can. I think that you can read the buffer from OnAudioFilterRead into another array and work on it from there. or directly on the sound files.
     
    Eric_Lin likes this.
  3. Eric_Lin

    Eric_Lin

    Joined:
    Oct 29, 2014
    Posts:
    32
    Thanks for your advice. I will try to figure them out!. Thanks anyway.