Hi all,
I’m using mod-script-pipe to generate tones, but the Scripting Reference doesn’t show how to pass a duration value:
Tone:
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?
Thanks!!
steve
January 16, 2020, 10:31am
2
You need to make a selection of the required duration, then generate the tone. The generated tone will fill the selection.
Hi Steve,
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!
steve
August 27, 2020, 10:30am
4
Example: Generate a 25 second tone:
NewMonoTrack:
SelectTime: Start=0 End=25
Tone:
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.
HI Steve,
Thanks for the speedy reply - much appreciated!
steve
August 28, 2020, 2:17pm
6
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)