Search Unity

Audio Visualization Tutorial [Unity C#] Q&A

Discussion in 'Community Learning & Teaching' started by PeerPlay, Sep 22, 2016.

  1. PeerPlay

    PeerPlay

    Joined:
    May 10, 2015
    Posts:
    64
    This is the official thread for discussion, issues and Q&A for the Audio Visualization tutorial.

    I have been working hard on creating an extensive video tutorial series on how to create your own Audio Visualizer in Unity C#.

    Learn how to code your own music visualizer using c#.
    In these series you will learn how to:
    • Use Fast Fourier Transform (FFT)
    • Visualize music into gameobjects
    • Scripting buffers for visualisation
    • Applying scripts to models, lights, transforms, camera, and shaders.

    If you have any questions, or additions to this tutorial, feel free to reply. I'm hoping you will find this tutorial helpful.
    I haven't seen an extensive tutorial on this subject yet, so I decided to share my knowledge for free, so that you all may learn, and create more awesome stuff!

    To support me creating free tutorials on audio, visuals, algorithms & shaders in Unity, consider supporting me on Patreon. http://www.patreon.com/peerplay

    Source files download: http://www.peerplay.nl/tutorials/peerplay-AudioVisTutPart1-source.zip


    Part 0 - Result


    Part 1 - FFT/Spectrum Theory


    Part 2 - GetSpectrumData in Unity


    Part 3 - Visualize 512 samples


    Part 4 - Eight Frequency Bands


    Part 5 - Adding Buffers
    https://www.youtube.com/watch?v=lEUuC3LQnzs (click link for video)

    Part 6 - Ranged Usable Values
    https://www.youtube.com/watch?v=QJCipD3YEE8 (click link for video)

    Part 7 - Get Average Amplitude
    https://youtu.be/EAjNZJ8G0Hs

    Part 10 - 64 Audio Bands
    https://youtu.be/l77pAKrKe5s
     
    Last edited: Jan 25, 2018
    MasterZuh, efge, JamesWjRose and 4 others like this.
  2. etkabu

    etkabu

    Joined:
    Mar 26, 2017
    Posts:
    1
    In part 3 (at 3 minutes and 10 seconds), how did you get the parametric cube prefab option to pop-up when selecting a sample cube prefab? Do we make the cube on our own?
     
  3. PeerPlay

    PeerPlay

    Joined:
    May 10, 2015
    Posts:
    64
    Dragonxd09 likes this.
  4. fossworking

    fossworking

    Joined:
    Apr 30, 2017
    Posts:
    2
    There is no valid source code where you say. The C# Script is where? On a pay for a post site? Correct me if I am wrong.
     
    ihgyug and EThomson42 like this.
  5. fossworking

    fossworking

    Joined:
    Apr 30, 2017
    Posts:
    2
    Download what valid source from one month ago?
     
  6. vi_ferreira

    vi_ferreira

    Joined:
    May 18, 2017
    Posts:
    1
    Really great stuff! Does this works in realtime?
     
  7. PeerPlay

    PeerPlay

    Joined:
    May 10, 2015
    Posts:
    64
    Yes it does! It takes the frequency bins from the audio you are playing in real time.
     
  8. wideeyeddreamer

    wideeyeddreamer

    Joined:
    May 19, 2017
    Posts:
    1
    If I wanted to use this for a live performance, what would I put inside AudioSource as the AudioClip?
     
  9. DaipayanRoy

    DaipayanRoy

    Joined:
    Nov 4, 2015
    Posts:
    7
    This is an awesome tutorial. I am pretty new to Unity, so i am just learning stuff. I just have the following questions.

    Why do you convert them into 8 bands only? Why not more? Wouldn't having less frequency range for each band result in more number of bands and thus be more accurate?
     
  10. garzonan

    garzonan

    Joined:
    Sep 12, 2017
    Posts:
    1
    no me muestra la luz de los cubos como esta en Part 5 - Adding Buffers como hago ese efecto de brillo
     
  11. VirtualMaster

    VirtualMaster

    Joined:
    Oct 21, 2018
    Posts:
    1
    In part one I am having issues with unity recognizing RequireComponent and AudioSource. I have the most up to date version I'm not sure what I need in my code to get unity to understand that even tho I am following unity's API. Should i just keep coding and hope that it works? It seems to me that I will get a compile error.
     
  12. Oxygame

    Oxygame

    Joined:
    Jul 25, 2012
    Posts:
    1
unityunity