I’m using the new AudioStreamInteractive (thanks Godot 4.3!) to connect a bunch of music together. It’s great but some clips are louder than others. I’d like to adjust the volumes of individual clips.
The issue is that the only volume control applies to the whole AudioStreamInteractive, so it affects all clips.
I could go back to my audio software and re-render the audio file to the correct volume, but that’s a tedious solution since I expect to be tweaking volumes a lot.
A different solution is, each time I ask AudioStreamInteractive to switch to a clip, I also set its volume to the needed one. A big caveat with this is that the volume would change immediately, not at the moment when the clip transitions to the next.
Is there an easy built in clip volume tweaker that I’m missing?
This is what i would do. Some audio software can streamline this process pretty easily. One method for the program audacity would be create cd tracks labels between each clip. Then it could be a single export.
To do this in Godot is not going to be simple either. There are no signals to tell you when a transition happens or if it’s part of a sequence. Unless. The signal parameter_list_changed is emitted when a clip changes.
Other then monitoring changes, you will need to keep a separate list of clip IDs to volume levels. So when, or if, you detect a clip change you would modify the volume… This would probably cause a jump during fades, so you would have to implement your own volume smoothing that can make it less noticable during a transition.
… I think it would be easier to properly mix your audio clips.
Maybe as a work around you could create audiostreaminteactive resources that wraps a single audio file and you can adjust the volume on the resource. Then in the real interactive stream include the adjusted stream.
Not very efficient but could also solve your problem.
I’ll try out your parameter_list_changed signal suggestion!
Yeah it’s a shame there’s no signal that says when the clip has looped or changed. For now I have a homemade solution that tracks the time elapsed and figures out which beat is playing… Not ideal.
You have a great idea about using another audiostream to set the volume. I’ll try that tomorrow too. Thanks!!!
Maybe as a work around you could create audiostreaminteactive resources that wraps a single audio file and you can adjust the volume on the resource. Then in the real interactive stream include the adjusted stream.
This didn’t work because it’s actually the AudioStreamPlayer that has the volume property. And I can’t feed an AudioStreamPlayer to the AudioStreamInteractive. It was worth a shot!
I guess I’ll do the volume control myself. That script is gonna get ugly.
I also tried the property_list_changed() signal but it does not trigger when the music clip loops or changes