I’m using mod-script-pipe to generate tones, but the Scripting Reference doesn’t show how to pass a duration value:
double Frequency, (default:440)
double Amplitude, (default:0.8)
enum Waveform, (default:Sine)
enum Interpolation, (default:Linear)
There are a few others that lack duration too (like Silence…). Does anyone know what the duration parameter is called, or if it exists?
You need to make a selection of the required duration, then generate the tone. The generated tone will fill the selection.
Thanks for the answer. Unfortunately this sounds a bit cryptic. A code snippet (ideally in Python) that selects a duration in seconds and then generates the tone as outlined in your answer would go a long way. Thanks in advance for your help!
Example: Generate a 25 second tone:
- SelectTime: Start=0 End=25
You can find a list of commands here: https://manual.audacityteam.org/man/scripting_reference.html
For testing, I’d recommend using pipeclient.py from the command line.
Thanks for the speedy reply - much appreciated!
I just thought - do you have “pipeclient.py”?
If not, it’s available here: https://raw.githubusercontent.com/audacity/audacity/master/scripts/piped-work/pipeclient.py
(save the page as a “.py” file, and set the “executable” permission flag)