Tone: duration?

Hi all,

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.

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!

Example: Generate a 25 second tone:

  • NewMonoTrack:
  • SelectTime: Start=0 End=25
  • Tone:

You can find a list of commands here:

For testing, I’d recommend using from the command line.

HI Steve,

Thanks for the speedy reply - much appreciated!

I just thought - do you have “”?
If not, it’s available here:
(save the page as a “.py” file, and set the “executable” permission flag)