Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Tilt Brush - Multiple audio reactive sketches, each with its own audio source, in Unity?

Discussion in 'AR/VR (XR) Discussion' started by dpentecost, Aug 17, 2017.

  1. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    The audio reactive export pipeline to Unity is fantastic but I would like each Tilt Brush object to have and react to its own audio source.

    Digging in, I found VisualizerAudioInput.cs with this invitation in comments:
    //Get audio data from Unity (Hint: replace this with your own!)

    The line in question is:
    AudioListener.GetOutputData(m_WaveformFloats, 0);

    I know that I can get the current audio source (not Listener) data by using AudioSource.GetOutputData but here are my questions:

    1) Will that refer to just the source on that GameObject or any playing source?
    2) If we think it will work with some extra code, can someone give me the correct code? (not a c# coder myself)
    3) Can I put this revised code on each gameobject/source or is the Tilt Brush audio reactive code designed to occur only once in a Unity scene?

    I will try a hack myself and if it works, pass it along here.

    Thanks!
     
    semionovdenis likes this.
  2. semionovdenis

    semionovdenis

    Joined:
    Apr 29, 2019
    Posts:
    1
    Have you found the solution? I am interrested in the same question about separation of the audio sourses for each brush
     
  3. garretthoyos

    garretthoyos

    Joined:
    Oct 18, 2019
    Posts:
    2
    Also looking for this solution.