Any way to change the audio volume of various layers by using layer sets or automation?

Is there any way to change the audio volume of various layers by using layer sets or automation layers?

1 Like

Yes, with automation. If you have one and the same audio in several layers, I’d suggest to change the gain of the source(s) by a script.

Call a request something like this in your script, for each source:
httpRequest(http://localhost:8989 ENDPOINT ?update=...)
(Without spaces!)

To get the endpoint, right-click the source and add “copy Source’s API Endpoint to clipboard”.

e.g.: for sources:
httpRequest(http://localhost:8989–API-ENDPOINT–?update={“gain”:2.0}) // 200% volume
httpRequest(http://localhost:8989–API-ENDPOINT–?update={“gain”:1.0}) // 100% volume
httpRequest(http://localhost:8989–API-ENDPOINT–?update={“gain”:0.5}) // 50% volume

Make sure that you “url encode” this part {“gain”:X.Y}

You can do it here:

(Or in LibreOffice with the command =urlencoder())

You’ll get something like this:

So, finally (for sources) use something like this:
httpRequest( http://localhost:8989/api/v1/documents/4928914/sources/4928914-TVDeviceVideoSource-1?update={"gain"%3A0.5} )

“0.5” is the value.

In a similar way, this would be also possible for layers: there it isn’t called “gain” it’s called “volume”. But from layer to layer this can be different. See JSON-Object for all the values and names. For this simply call http://localhost:8989/ together with the API-endpoint in your favorite browser.

Hello @JoPhi, thank you very much for your detailed explanation. You helped me a lot!

In the end, the commands I used are the following ones.

To change source gain




is the Source API Endpoint.

To change layer volume




is the Layer API Endpoint.

1 Like