I would like to confirm if there is a limitation to the maximum length of a command send through mod-script-pipe. Maybe it is just a coincidence, but when my command is longer than 1000 characters, it crashes Audacity.
My command contains a formatted list of labels, that I want to import into a project. The list contains approx. 50 labels. When I reduce number of labels so the command string length is below 1000 characters, the command works.
My guess is that the issue is due to the command being too big to fit in the pipe.
Are you on Windows?
What is the command that you are trying to send (No need to include all 50 labels, just 2 labels will be sufficient for me to be able to conduct tests).
I am on Windows, but I am interested in the pipe’s limitations on both platforms - Windows/macOS.
Here is a simplified example with two labels:
cmd = '(list (list 0.333333 0.333333 \\"1\\") (list 1.666666 1.666666 \\"2\\"))'
do(f'NyquistPrompt: Command="{cmd}" Parameters="" Version="4"')
do function is using standard send_command and get_response functions as suggested in the official audacity pipe example.
Note that the example pipe_test.py
file is only intended as a very simple demonstration, and says:
Keep pipe_test.py short!!
For practical scripts, take a look at the pipeclient library, and ensure that you regularly read from the read pipe to ensure that the read pipe does not become full.
This topic was automatically closed after 30 days. New replies are no longer allowed.