Hi! I wrote a python script ages ago to automate some stuff for Audacity. I’ve kept Audacity up to date (3.7.1 on Mac), and for some reason now, mod-script-pipe won’t obey the SetTrackAudio:Gain command, even though the commands to set the Pan and ExportMp3 are working totally fine.
I’ve tried the command SetTrackAudio:Pan=99 on Linux with Audacity 3.7.1 built from source, using the Pipe Client command-line interface, and the command works for me.
Some things to check:
Is mod-script-pipe enabled in Audacity Preferences (in the “Modules” section). Note that Audacity must be restarted after making changes to modules, and check that the change has succeeded.
One or more tracks must be selected for this command to work.
See if the command works using PipeClient’s command-line interface.
Hey, Steve! Thanks for responding.
Yes, mod-script-pipe is enabled and working. The track is selected – I know, because the previous command to SetTrackAudioPan works just fine. Then the very next line, SetTrackAudioGain, doesn’t.
And as I said, my script worked without any changes, through numerous updates of Audacity. I can’t tell, though, if it’s 3.7.1 specifically, because I only need to use this script once or twice a year, so I don’t know which update broke it.
Additionally, here is the output from those commands:
Send: >>>
SetTrackAudio:Pan=“99”
Rcvd: <<<
BatchCommand finished: OK
Send: >>>
SetTrackAudio:Gain=“-14”
Rcvd: <<<
BatchCommand finished: OK
I’ve never used PipeClient, but I’ll try it next. Thanks.
Okay, I finally got around to running pipeclient, and it’s exhibiting the same behavior. In the attached screenshot, you can see that I was able to set the focus on a particular track, I successfully set the Pan to 0, but the Gain remains unchanged at -14 instead of 0 as commanded.
I double-checked the scripting reference, and the syntax looks right, as far as I can tell.