Scripting Reference

From Audacity Development Manual
Revision as of 19:59, 9 February 2018 by JamesCrook (talk | contribs) (Updated.)
Jump to: navigation, search
This is an experiemental page, not linked to from anywhere, to list automation commands.
  • Yes these are the same commands as in "Commands and Shortcuts", same as in the menus, just presented differently.
    • Presented in a format useful to people using Scripting or Chains.
    • Most of this page is automatically generated.


File Menu

This menu has items to open, save, import and export files.
Automation Id Action Parameters Description
SaveProject: Save Project string Filename, (default:name.aup)

bool AddToHistory, (default:False)
bool Compress, (default:False)

Saves the current Audacity project .AUP file.
Export: Export string Filename, (default:exported.wav)

int NumChannels, (default:1)

For exporting audio files
Import: Import string Filename, (default:)
For importing audio files or label files into your project

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)

double EndFreq, (default:1320)
double StartAmp, (default:0.8)
double EndAmp, (default:0.1)
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)
double Amplitude, (default:0.8)

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.8)

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

double Amplitude, (default:0.8)
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.9)
Increases or decreases the volume of the audio you have selected.
AutoDuck: Auto Duck... double DuckAmountDb, (default:-12)

double InnerFadeDownLen, (default:0)
double InnerFadeUpLen, (default:0)
double OuterFadeDownLen, (default:0.5)
double OuterFadeUpLen, (default:0.5)
double ThresholdDb, (default:-30)
double MaximumPause, (default:1)

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)

double Treble, (default:0)
double Gain, (default:0)
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)

bool SBSMS, (default:False)

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

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)

double NoiseFloor, (default:-40)
double Ratio, (default:2)
double AttackTime, (default:0.2)
double ReleaseTime, (default:1)
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)
double Noise Floor, (default:-70)
double Parameter 1, (default:50)
double Parameter 2, (default:50)
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)

float Decay, (default:0.5)

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)

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)

float Time Resolution, (default:0.25)

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.4)
double Phase, (default:0)
int Depth, (default:100)
int Feedback, (default:0)
double Gain, (default:-6)

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)

double Delay, (default:10)
double Reverberance, (default:50)
double HfDamping, (default:50)
double ToneLow, (default:100)
double ToneHigh, (default:100)
double WetGain, (default:-1)
double DryGain, (default:-1)
double StereoWidth, (default:100)
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)

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

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.5)
double Truncate, (default:0.5)
double Compress, (default:50)
bool Independent, (default:False)

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

double Phase, (default:0)
int Depth, (default:70)
double Resonance, (default:2.5)
int Offset, (default:30)
double Gain, (default:-6)

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: 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.

Extra: Automation

No special notes for Automation
Automation Id Action Parameters Description
CompareAudio: Compare Audio... float Threshold, (default:0)
no tip string.
GetPreference: Get Preference... string Name, (default:)
no tip string.
GetInfo: Get Info... enum Type, (default:0)
  • Commands
  • Commands+
  • Menus
  • Tracks
  • Clips
  • Labels
  • Boxes

enum Format, (default:0)

  • JSON
  • LISP
  • Brief
no tip string.
SelectTime: Select Time... double StartTime, (default:0)

double EndTime, (default:0)
bool FromEnd, (default:False)

no tip string.
SelectTracks: Select Tracks... int FirstTrack, (default:0)

int LastTrack, (default:0)
enum Mode, (default:0)

  • Set
  • Add
  • Remove
no tip string.
SetPreference: Set Preference... string Name, (default:)

string Value, (default:)
bool Reload, (default:False)

no tip string.
SetClip: Set Clip... int ClipIndex, (default:0)

enum Color, (default:0)

  • Color0
  • Color1
  • Color2
  • Color3

double Start, (default:-5)

no tip string.
SetLabel: Set Label... int LabelIndex, (default:0)

string Text, (default:empty)
double Start, (default:0)
double End, (default:0)

no tip string.
SetProject: Set Project... string Name, (default:Project)

int X, (default:10)
int Y, (default:10)
int Width, (default:1000)
int Height, (default:900)

no tip string.
SetTrack: Set Track... int TrackIndex, (default:0)

string Name, (default:Unnamed)
double Pan, (default:0)
double Gain, (default:1)
int Height, (default:120)
enum Color, (default:0)

  • Color0
  • Color1
  • Color2
  • Color3

bool Selected, (default:False)
bool Focuseed, (default:False)
bool Solo, (default:False)
bool Mute, (default:False)

no tip string.