Scripting Reference

From Audacity Development Manual
Revision as of 21:35, 20 January 2018 by JamesCrook (talk | contribs) (Updated with effects and screenshot command.)
Jump to: navigation, search
This is an experiemental page, not linked to from anywhere, to list automation commands.
  • Yes these are the same as normal commands, as in the menus, just presented differently.
  • ToDo.png Add parameters.
  • Most of this page is automatically generated.

Edit: Remove Special

For more "advanced" removal of audio
Automation Id Action Parameters Description
SplitDelete Split Delete none Same as Delete, but none of the audio data or labels to right of the selection are shifted.

Transport: Play

These commands control playback in Audacity. You can Start, Stop or Pause playback of the audio in your project.
Automation Id Action Parameters Description
Play Play/Stop none Starts and stops playback or stops a recording (stopping does not change the restart position). Therefore using any play or record command after stopping with "Play/Stop" will start playback or recording from the same Timeline position it last started from. You can also assign separate shortcuts for Play and Stop.

Transport: Record

These commands control recording in Audacity. You can Start, Stop or Pause recording in your project. You can either start a recording on your existing track or an a new track.
Automation Id Action Parameters Description
Record1stChoice Record none Starts recording at the end of the currently selected track(s).
Record2ndChoice Record New Track none Recording begins on a new track at either the current cursor location or at the beginning of the current selection.

Tracks Menu

For extending a selection to more tracks.
Automation Id Action Parameters Description
RemoveTracks Remove Tracks none Removes the selected track(s) from the project. Even if only part of a track is selected, the entire track is removed.

Generate Menu

Generate
Automation Id Action Parameters Description
Chirp Chirp... double StartFreq, (default:440.000000)

double EndFreq, (default:1320.000000)
double StartAmp, (default:0.800000)
double EndAmp, (default:0.100000)
enum Waveform, (default:0)

  • Sine
  • Square
  • Sawtooth
  • Square, no alias

enum Interpolation, (default:0)

  • Linear
  • Logarithmic
Generates four different types of tone waveform like the Tone Generator, but additionally allows setting of the starting and ending amplitude and frequency.
DtmfTones DTMF Tones... string Sequence, (default:audacity)

double Duty Cycle, (default:55.000000)
double Amplitude, (default:0.800000)

Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones.
Noise Noise... enum Type, (default:0)
  • White
  • Pink
  • Brownian

double Amplitude, (default:0.800000)

Generates 'white', 'pink' or 'brown' noise.
Tone Tone... double Frequency, (default:440.000000)

double Amplitude, (default:0.800000)
enum Waveform, (default:0)

  • Sine
  • Square
  • Sawtooth
  • Square, no alias

enum Interpolation, (default:0)

  • Linear
  • Logarithmic
Generates one of four different tone waveforms: Sine, Square, Sawtooth or Square (no alias), and a frequency between 1 Hz and half the current project rate.

Effect Menu

Effect
Automation Id Action Parameters Description
Amplify Amplify... float Ratio, (default:0.900000)
Increases or decreases the volume of the audio you have selected.
AutoDuck Auto Duck... double DuckAmountDb, (default:-12.000000)

double InnerFadeDownLen, (default:0.000000)
double InnerFadeUpLen, (default:0.000000)
double OuterFadeDownLen, (default:0.500000)
double OuterFadeUpLen, (default:0.500000)
double ThresholdDb, (default:-30.000000)
double MaximumPause, (default:1.000000)

Reduces (ducks) the volume of one or more tracks whenever the volume of a specified "control" track reaches a particular level. Typically used to make a music track softer whenever speech in a commentary track is heard.
BassAndTreble Bass and Treble... double Bass, (default:0.000000)

double Treble, (default:0.000000)
double Gain, (default:0.000000)
bool Link Sliders, (default:False)

Increases or decreases the lower frequencies and higher frequencies of your audio independently; behaves just like the bass and treble controls on a stereo system.
ChangePitch Change Pitch... double Percentage, (default:0.000000)

bool SBSMS, (default:False)

Change the pitch of a selection without changing its tempo.
ChangeSpeed Change Speed... double Percentage, (default:0.000000)
Change the speed of a selection, also changing its pitch.
ChangeTempo Change Tempo... double Percentage, (default:0.000000)

bool SBSMS, (default:False)

Change the tempo and length (duration) of a selection without changing its pitch.
ClickRemoval Click Removal... int Threshold, (default:200)

int Width, (default:20)

Click Removal is designed to remove clicks on audio tracks and is especially suited to declicking recordings made from vinyl records.
Compressor Compressor... double Threshold, (default:-12.000000)

double NoiseFloor, (default:-40.000000)
double Ratio, (default:2.000000)
double AttackTime, (default:0.200000)
double ReleaseTime, (default:1.000000)
bool Normalize, (default:True)
bool UsePeak, (default:False)

Compresses the dynamic range by two alternative methods. The default "RMS" method makes the louder parts softer, but leaves the quieter audio alone. The alternative "peaks" method makes the entire audio louder, but amplifies the louder parts less than the quieter parts. Make-up gain can be applied to either method, making the result as loud as possible without clipping, but not changing the dynamic range further.
Distortion Distortion... enum Type, (default:0)
  • Hard Clipping
  • Soft Clipping
  • Soft Overdrive
  • Medium Overdrive
  • Hard Overdrive
  • Cubic Curve (odd harmonics)
  • Even Harmonics
  • Expand and Compress
  • Leveller
  • Rectifier Distortion
  • Hard Limiter 1413

bool DC Block, (default:False)
double Threshold dB, (default:-6.000000)
double Noise Floor, (default:-70.000000)
double Parameter 1, (default:50.000000)
double Parameter 2, (default:50.000000)
int Repeats, (default:1)

Use the Distortion effect to make the audio sound distorted. By distorting the waveform the frequency content is changed, which will often make the sound "crunchy" or "abrasive". Technically this effect is a waveshaper. The result of waveshaping is equivalent to applying non-linear amplification to the audio waveform. Preset shaping functions are provided, each of which produces a different type of distortion.
Echo Echo... float Delay, (default:1.000000)

float Decay, (default:0.500000)

Repeats the selected audio again and again, normally softer each time and normally not blended into the original sound until some time after it starts. The delay time between each repeat is fixed, with no pause in between each repeat. For a more configurable echo effect with a variable delay time and pitch-changed echoes, see Delay.
Equalization Equalization... size_t FilterLength, (default:4001)

string CurveName, (default:unnamed)
bool InterpolateLin, (default:False)
enum InterpolationMethod, (default:0)

  • B-spline
  • Cosine
  • Cubic
Adjusts the volume levels of particular frequencies.
Normalize Normalize... double Level, (default:-1.000000)

bool ApplyGain, (default:True)
bool RemoveDcOffset, (default:True)
bool StereoIndependent, (default:False)

Use the Normalize effect to set the maximum amplitude of a track, equalize the amplitudes of the left and right channels of a stereo track and optionally remove any DC offset from the track.
Paulstretch Paulstretch... float Stretch Factor, (default:10.000000)

float Time Resolution, (default:0.250000)

Use Paulstretch only for an extreme time-stretch or "stasis" effect, This may be useful for synthesizer pad sounds, identifying performance glitches or just creating interesting aural textures. Use Change Tempo or Sliding Time Scale rather than Paulstretch for tasks like slowing down a song to a "practice" tempo.
Phaser Phaser... int Stages, (default:2)

int DryWet, (default:128)
double Freq, (default:0.400000)
double Phase, (default:0.000000)
int Depth, (default:100)
int Feedback, (default:0)
double Gain, (default:-6.000000)

The name "Phaser" comes from "Phase Shifter", because it works by combining phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a Low Frequency Oscillator (LFO).
Repeat Repeat... int Count, (default:1)
Repeats the selection the specified number of times.
Reverb Reverb... double RoomSize, (default:75.000000)

double Delay, (default:10.000000)
double Reverberance, (default:50.000000)
double HfDamping, (default:50.000000)
double ToneLow, (default:100.000000)
double ToneHigh, (default:100.000000)
double WetGain, (default:-1.000000)
double DryGain, (default:-1.000000)
double StereoWidth, (default:100.000000)
bool WetOnly, (default:False)

A configurable stereo reverberation effect with built-in and user-added presets. It can be used to add ambience (an impression of the space in which a sound occurs) to a mono sound. Also use it to increase reverberation in stereo audio that sounds too "dry" or "close".
TimeScale Sliding Time Scale/Pitch Shift... double RatePercentChangeStart, (default:0.000000)

double RatePercentChangeEnd, (default:0.000000)
double PitchHalfStepsStart, (default:0.000000)
double PitchHalfStepsEnd, (default:0.000000)
double PitchPercentChangeStart, (default:0.000000)
double PitchPercentChangeEnd, (default:0.000000)

This effect allows you to make a continuous change to the tempo and/or pitch of a selection by choosing initial and/or final change values.
TruncateSilence Truncate Silence... enum Db, (default:0)
  • -20 dB
  • -25 dB
  • -30 dB
  • -35 dB
  • -40 dB
  • -45 dB
  • -50 dB
  • -55 dB
  • -60 dB
  • -65 dB
  • -70 dB
  • -75 dB
  • -80 dB

enum Action, (default:0)

  • Truncate Detected Silence
  • Compress Excess Silence

double Minimum, (default:0.500000)
double Truncate, (default:0.500000)
double Compress, (default:50.000000)
bool Independent, (default:False)

Automatically try to find and eliminate audible silences. Don't use with faded audio.
Wahwah Wahwah... double Freq, (default:1.500000)

double Phase, (default:0.000000)
int Depth, (default:70)
double Resonance, (default:2.500000)
int Offset, (default:30)
double Gain, (default:-6.000000)

Rapid tone quality variations, like that guitar sound so popular in the 1970's.

Analyze Menu

Analyze
Automation Id Action Parameters Description
FindClipping Find Clipping... int Duty Cycle Start, (default:3)

int Duty Cycle End, (default:3)

Displays runs of clipped samples in a Label Track, as a screen-reader accessible alternative to View > Show Clipping. A run must include at least one clipped sample, but may include unclipped samples too.

Extra Menu

Extra optional commands.
Automation Id Action Parameters Description
DemoCommand Demo Command float Delay, (default:1.000000)

float Decay, (default:0.500000)

no tip string.
ScreenshotCommand Screenshot string Path, (default:)

enum CaptureWhat, (default:window)

  • window
  • fullwindow
  • windowplus
  • fullscreen
  • toolbars
  • menus
  • effects
  • preferences
  • selectionbar
  • spectralselection
  • tools
  • transport
  • mixer
  • meter
  • playmeter
  • recordmeter
  • edit
  • device
  • scrub
  • transcription
  • trackpanel
  • ruler
  • tracks
  • firsttrack
  • secondtrack

enum Background, (default:None)

  • Blue
  • White
  • None
no tip string.

Extra: Track

Extra commands to operate on a track that has focus
Automation Id Action Parameters Description
TrackMute Mute/Unmute focused track none Toggles the Mute button on the focused track.