Currently running an older version (2.2.2) of audacity due to difficult building a newer version with mod-script-pipe on Raspberry Pi. I have mod-script-pipe working but I can’t find any documentation regarding available commands…a few commands work (such as those in the examples in the piped-work directory) but much of what is listed in the scripting documentation doesn’t seem to work and instead yields a "Your batch command of XXXX was not recognized " error.
I’d like to mute and unmute tracks via the scripting interface, but the toggle nature of “MenuCommand: CommandName=TrackMute” (which does mute or unmute the selected track) is problematic. Is there a list of commands that will work for 2.2.2, or a way in which I can use this version to get something that will allow me to define the mute status of a particular track (instead of just toggle it)? SetTrackAudio doesn’t seem to work. “MenuCommand: CommandName=Play” and “MenuCommand: CommandName=Stop” do seem to work.
I don’t know, but if there is it will be in the Audacity 2.2.2 manual.
If you don’t already have it, the 2.2.2 manual is available here: Old Audacity versions download
This is helpful, thanks! The problem I’m having now is that I can’t seem to select a track from the scripting interface. The “Select: Trackname=XXX” command works successfully, but then if I run “MenuCommand: CommandName=TrackMute” it does not mute the track that I told it to select, but instead the one that was previously selected manually in the GUI. Same problem if I select by track index. Am I missing something here? How do I select a track and then mute/unmute it with a script? I realize this is with an older version of the scripting interface, but would certainly appreciate any guidance.
EDIT: Nevermind, I was just able to get something working with the old syntax for SetTrackInfo…even though the 2.2.2 manual suggests that this only works to set the track name in this version, it does seem to be functional for mute state as well. I think that’ll solve my problem and avoid using the Select: command
Have you tried using pipeclient.py from the command line interface? That’s a convenient way to test commands.
This works for me (though I’m using a later version of Audacity):
Enter command or 'Q' to quit: TrackMute:
Sending command: TrackMute:
BatchCommand finished: OK
Execution time: 28.57ms
Yes, pipeclient.py is quite helpful for troubleshooting. The problem was really figuring out what the commands were since the scripting language has evolved quite a bit since the version I’m using. But the older version of the manual you pointed me to has some helpful information on that particular iteration (2.2.2) of the scripting interface. Still not sure why the "Select: " command wasn’t doing what I wanted (it wasn’t returning an error or failure, but wasn’t correctly selecting a track even after completing successfully), but in the end I could accomplish what I needed with "SetTrackInfo: " Thanks for the help!