- Home /
Any way to get current audio volume from a Timeline Audio Track
title! I want to change the brightness of a material based on the current volume from a timeline audiotrack.
I'm aware of this solution where you sample the clip of an audiosource: https://answers.unity.com/questions/1167177/how-do-i-get-the-current-volume-level-amplitude-of.html - but that doesn't work here because the audiotrack does not set the 'clip' property, it just plays through the audiosource directly.
It have a lot of clips being played in sequence so i'd prefer to not have to workaround this by playing the clips the normal way.
One alternative might be getting the volume of an AudioMixer channel instead, and i'm currently working on doing that but I haven't found anything yet.
I appreciate any help or insight! :D
I have the exact same problem, did you find another solution?
@swanickj Have you tried implementing a similar solution using OnAudioFilterRead() ? That gives you access to the audiosource data regardless of whether it is being fed from a clip or from some other source.
Thanks for the reply Jon. I ended up using the position in the Timeline Clip to sample the amplitude from the corresponding audioClip. Not as clean as your solution, so I'll be using yours in the future!
Your answer
![](https://koobas.hobune.stream/wayback/20220612193758im_/https://answers.unity.com/themes/thub/images/avi.jpg)