Gizmos Audacity
v0.1.0Safe local audio editing, analysis and production in Audacity 3.7 through mod-script-pipe.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
audacity_launch Launch
Start or attach to Audacity with a visible or hidden Windows project window. Waits for a real script-pipe response.
| Parameter | Type | Description |
|---|---|---|
visible | boolean |
audacity_window Window
Show or hide the Audacity window on Windows. A hidden Audacity keeps working through the pipe.
| Parameter | Type | Description |
|---|---|---|
show * | boolean |
audacity_quit Quit
On Windows, quit Audacity without a save prompt. Without saveTo the project is discarded (saved to a temporary file that is then deleted).
| Parameter | Type | Description |
|---|---|---|
saveTo | string | keep the project at this .aup3 path |
audacity_dialogs Dialogs
On Windows, list Audacity's open windows and dialogs; close=true closes the dialogs (WM_CLOSE, like the window's X; Cancel for questions). Use it when a call times out: a modal dialog blocks the pipe.
| Parameter | Type | Description |
|---|---|---|
close | boolean |
audacity_fresh Fresh
Get an empty project in a single window. A running session is backed up when it has tracks (backupTo required), then restarted, even when empty. Restart is Windows-only; on other platforms save and quit Audacity first. Never use the New menu: a second project window has crashed Audacity 3.7 under scripting.
| Parameter | Type | Description |
|---|---|---|
backupTo | string | .aup3 path for the current project |
visible | boolean |
audacity_status Status
Whether Audacity answers, and its tracks with name, kind, start/end, volume, pan, mute and solo.
audacity_info Info
Read native state: Tracks, Clips, Envelopes (points as t/y), Labels, Boxes, Selection, Preferences, Commands (full catalogue with parameters) or Menus.
| Parameter | Type | Description |
|---|---|---|
type * | string |
audacity_describe Describe
Parameters of one scripting command or effect from the bundled English Audacity 3.7.8 catalogue.
| Parameter | Type | Description |
|---|---|---|
command * | string |
audacity_command Command
Run a catalogue scripting command or effect on the current selection (Amplify, Compressor, Limiter, LoudnessNormalization, Normalize, High-passFilter, FilterCurve, AutoDuck, FadeIn, …). Parameters follow Audacity's own list; see audacity_describe. Native Set* setters use selected tracks: call audacity_select first. NoiseReduction requires a captured profile.
| Parameter | Type | Description |
|---|---|---|
command * | string | |
params | object |
audacity_select Select
Select a time range on one or more tracks (all tracks when track is omitted; the whole project when start/end are omitted).
| Parameter | Type | Description |
|---|---|---|
end | number | |
start | number | |
track | track index (0-based) or unique track name | |
trackCount | integer |
audacity_import Import
Import an audio (or video, for its sound) file as a new track, name it and place it at start seconds.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
name | string | |
start | number |
audacity_track_set Track Set
Set track properties: name, gain in dB (the track's volume slider; status reports it back as a linear factor), pan (-1..1), mute, solo.
| Parameter | Type | Description |
|---|---|---|
track * | track index (0-based) or unique track name | |
gainDb | number | |
mute | boolean | |
name | string | |
pan | number | normalized pan: -1 full left, 0 center, 1 full right |
solo | boolean |
audacity_clip_move Clip Move
Move the clip that covers time `at` on a track so it starts at `start` seconds.
| Parameter | Type | Description |
|---|---|---|
at * | number | |
start * | number | |
track * | track index (0-based) or unique track name |
audacity_envelope_set Envelope Set
Write a volume envelope on a track: points of time (s) and linear gain (1 = unchanged, 0.5 = -6 dB, 0.25 = -12 dB). Visible as the volume curve in Audacity. replace=true clears the old points first.
| Parameter | Type | Description |
|---|---|---|
points * | array | |
track * | track index (0-based) or unique track name | |
replace | boolean |
audacity_labels_set Labels Set
Add point or region labels to a named label track, creating it if needed and retaining existing labels. Use them for chapters, picture events or script lines. Disable the label naming dialog in Preferences > Tracks > Track Behaviors before adding labels.
| Parameter | Type | Description |
|---|---|---|
labels * | array | |
trackName | string |
audacity_effect Effect
Select a track/range and apply an effect using the bundled English Audacity 3.7.8 catalogue parameters. Default time scope is the track extent, avoiding silent gap clips. NoiseReduction requires a captured profile on this same track and params={}; it uses saved UI settings. Scripted effects add no undo entry: save a project backup first.
| Parameter | Type | Description |
|---|---|---|
effect * | string | |
end | number | |
params | object | |
start | number | |
track | track index (0-based) or unique track name | |
trackCount | integer |
audacity_noise_profile Noise Profile
Capture room tone in a fresh Audacity process, then apply NoiseReduction with params={}. Audacity 3.7.8 uses saved UI settings, ignores effect parameters and cannot reset its profile through scripting. Repeating this exact interval reuses its profile; a different interval requires audacity_fresh with backupTo.
| Parameter | Type | Description |
|---|---|---|
end * | number | |
start * | number | |
track * | track index (0-based) or unique track name |
audacity_export Export
Export the rendered mix or an explicit time range to WAV/FLAC/MP3/OGG by file extension, honoring gain, pan, mute, solo and envelopes. Selects time and tracks explicitly, including after label editing; channels is 1 or 2.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
channels | integer | |
end | number | |
start | number |
audacity_project Project
Open an existing .aup3 into an empty project or save to a new .aup3 path. Existing save destinations are refused to prevent a blocking modal. Use audacity_fresh with backupTo before opening when tracks are present.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
file * | string |
audacity_pipeline Pipeline
Preview or run a reviewed cleanup/mastering chain on one track: voice, podcast, interview, audiobook, vocal, live, music, lo-fi or cleanup. dryRun lists exact ordered commands without changing selection. Noise reduction requires supplied room tone; normalization and limiting are explicit. Default range is the track extent, recalculated after edits.
| Parameter | Type | Description |
|---|---|---|
track * | ||
attackMs | number | |
bassDb | number | |
compress | boolean | |
dryRun | boolean | |
end | number | |
highPassHz | number | |
limitPeakDb | number | optional limiter after normalization; measure the result |
loudness | string | normalization can raise quiet audio; select it explicitly |
lowPassHz | number | |
lufs | number | |
noiseProfile | object | explicit room-tone interval; omitting it skips noise reduction |
peakDb | number | |
preset | string | |
ratio | number | |
releaseMs | number | |
removeClicks | boolean | must remain false: native Click Removal can open a blocking result dialog |
removeDc | boolean | |
rmsDb | number | |
shortenPauses | object | optional destructive silence truncation; changes timing and video sync |
start | number | |
thresholdDb | number | |
trebleDb | number |
audacity_edit Edit
Split, split-new, trim, duplicate, delete, cut/copy, silence or join/disjoin audio on explicit tracks and time range. split accepts a cursor; delete closes the gap while split_delete retains timing. Paste is not offered: it depends on the system clipboard.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
track * | ||
end | number | |
start | number | |
trackCount | integer |
audacity_generate Generate
Generate tone/noise/silence/chirp/rhythm in a new mono/stereo track, or replace a range of an existing track. Uses a time selection for duration and validates kind-specific parameters before adding tracks.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
amplitude | number | |
beatsPerBar | integer | |
channels | integer | new-track channel count; defaults to mono and must be omitted for an existing track |
clickSound | string | |
duration | number | |
endAmplitude | number | |
endFrequency | number | |
frequency | number | |
interpolation | string | |
name | string | |
noiseType | string | |
start | number | |
swing | number | |
tempo | number | |
track | omit to create a new track; supplying it replaces audio in the range | |
waveform | string |
audacity_clip_set Clip Set
Rename/color a clip or apply a relative gain in dB destructively to its samples. For name/color, at must lie strictly inside exactly one clip, avoiding shared boundaries. Use audacity_track_set gainDb for a reversible track slider, audacity_clip_move for timing.
| Parameter | Type | Description |
|---|---|---|
at * | number | time inside the clip; name/color require a point strictly after its start and before its end |
track * | ||
color | string | |
gainDb | number | relative sample gain applied destructively with Amplify to this clip |
name | string |
audacity_track_edit Track Edit
Add mono/stereo/label tracks, remove tracks, mix/render, or align selected tracks by start/end/selection. Track scope is explicit; add actions can name the new track. mix_new keeps the original tracks audible: mute them before exporting the new mix to avoid doubling. Find the new audio track in returned tracks; it can precede label tracks.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
end | number | |
name | string | |
start | number | |
track | ||
trackCount | integer |
audacity_fade Fade
Apply sample FadeIn or FadeOut on one track and time range. Omitting time applies to the track extent; use envelope_set for editable automation.
| Parameter | Type | Description |
|---|---|---|
direction * | string | |
track * | ||
end | number | |
start | number |
audacity_auto_duck Auto Duck
Destructively duck bed samples under speech using native AutoDuck; save a project backup first. The unselected voice must be the immediately following track below the selected bed; import the bed first, then voice. dryRun lists exact parameters/range. Use audacity_envelope_set for editable ducking or an existing track order.
| Parameter | Type | Description |
|---|---|---|
bed * | bed track index (0-based) or unique name; must immediately precede the voice track | |
voice * | voice track index (0-based) or unique name; must immediately follow the bed track | |
dryRun | boolean | |
duckDb | number | attenuation applied to the bed, in dB |
end | number | |
fadeDown | number | outer fade-down duration, in seconds |
fadeUp | number | outer fade-up duration, in seconds |
innerFadeDown | number | inner fade-down duration, in seconds |
innerFadeUp | number | inner fade-up duration, in seconds |
maximumPause | number | maximum pause to bridge while ducking, in seconds |
start | number | |
thresholdDb | number | voice detection threshold, in dB |
audacity_loudness_target Loudness Target
Measure then apply static gain to approach targetLufs while preserving measured true-peak headroom and respecting maxBoostDb. Requires ffmpeg and a non-silent audio track; default scope is its own extent. dryRun returns the measured input and Amplify plan without applying gain. Reports before/after and whether the target was achievable; it never compresses or guesses absent LUFS/true peak.
| Parameter | Type | Description |
|---|---|---|
track * | ||
dryRun | boolean | |
end | number | |
maxBoostDb | number | maximum positive static gain, in dB; does not cap attenuation |
start | number | |
targetLufs | number | desired integrated loudness, in LUFS |
toleranceLu | number | allowed distance from targetLufs, in LU |
truePeakCeilingDbtp | number | maximum rendered true peak, in dBTP |
audacity_silence Silence
Find quiet regions without deleting audio: every channel must stay below thresholdDb for minimumSeconds. Scan an optional file, or rendered tracks/currentSelection with selection restored. Times are absolute project seconds for Audacity ranges and file seconds for files. Returns capped regions plus the total count; current mute/gain/envelopes affect rendered silence.
| Parameter | Type | Description |
|---|---|---|
currentSelection | boolean | |
end | number | |
file | string | |
maxRegions | integer | |
minimumSeconds | number | |
start | number | |
thresholdDb | number | |
track | ||
trackCount | integer |
audacity_probe_file Probe File
Inspect an audio/video file before importing or exporting: container, duration, audio codecs, sample rate, channels and stream metadata. Requires optional ffprobe (installed with ffmpeg); reads the file without changing Audacity.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
timeoutMs | integer |
audacity_measure Measure
Measure tracks, a time range, or currentSelection using a temporary export; restores selection and preserves track controls. Reports peak/RMS/DC/crest, advisory defects and silence. Optional ffmpeg adds integrated LUFS/LRA/true peak. Reads rendered gain/mute/solo/envelopes, so use file measurement for unprocessed source levels. With targets, returns {measurement,targetCheck}; otherwise returns the measurement directly.
| Parameter | Type | Description |
|---|---|---|
backend | string | |
currentSelection | boolean | |
dualMono | boolean | |
end | number | |
start | number | |
targets | object | |
timeoutMs | integer | |
track | ||
trackCount | integer |
audacity_measure_file Measure File
Measure an exported/source audio file without touching Audacity. Native PCM/float WAV peak/RMS/DC/crest and advisory defects need no dependencies; ffmpeg on PATH adds EBU R128 LUFS/LRA/true peak and decodes other containers. Unavailable targets report unknown. With targets, returns {measurement,targetCheck}; otherwise returns the measurement directly.
| Parameter | Type | Description |
|---|---|---|
file * | string | |
backend | string | |
dualMono | boolean | |
targets | object | |
timeoutMs | integer |
audacity_compare_files Compare Files
Compare before/after audio files with the same measurement settings. Returns both reports and numeric changes only for metrics established on both sides; missing LUFS or true peak never becomes a zero change.
| Parameter | Type | Description |
|---|---|---|
after * | string | |
before * | string | |
backend | string | |
dualMono | boolean | |
targets | object | |
timeoutMs | integer |
audacity_targets Targets
List numeric house reference targets for podcast, video, broadcast, audiobook and premaster; use these with measurement targets. These references are not publishing certification. Recording noise floor requires isolated room tone.
audacity_contrast Contrast
Measure the RMS level difference between foreground speech and background room tone without opening Audacity Contrast. Each range is exported with current track controls and selection restored. This is a numeric contrast check, not full accessibility certification.
| Parameter | Type | Description |
|---|---|---|
background * | object | |
foreground * | object | |
minimumDb | number |
audacity_transport Transport
Play a selected region, pause/resume, stop, or record using Audacity’s configured input. Appending requires an explicit audio track matching the configured recording channels (1 or 2). Record mode respects Audacity’s new-track preference, and recording always starts from a cursor point to avoid batch progress waits. status reports selection and a monotonic estimated position; manual transport changes are not tracked. record returns immediately unless duration is supplied.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
duration | number | |
end | number | |
newTrack | boolean | |
start | number | |
track |
audacity_history History
Undo or redo existing native menu/import history entries. Individual scripted effects and pipelines add no undo entry; save a project backup before destructive processing. Stops before a step the native history does not have, or at Audacity’s own first error, and does not claim checkpoint rollback.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
steps | integer |
audacity_project_info Project Info
Read project tracks, clips, selection, length, active project paths and actual render sample rate. Rate is measured by a tiny temporary WAV export with selection restored; an empty project returns rate=null and its default preference separately.
audacity_preferences Preferences
Get a preference or list available preferences. Set is restricted to default project sample rate and recording channel count; never changes modules, UI language, devices or pipe settings. Original value and readback are returned.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
name | string | |
value | string | number | boolean |
audacity_macros Macros
List or apply saved local Audacity macros without opening the Macro Manager. Every step is parsed and checked first; dryRun lists steps. Modal/lifecycle commands and implicit effect presets are refused. Export macros need explicit outputTo.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
dryRun | boolean | |
name | string | |
outputTo | string |
audacity_recover Recover
Inspect process, pipe and crash-recovery entries; optionally close blocking dialogs and reconnect after a timeout. Never kills Audacity or replays edits. discardRecovery clears stale config entries only while Audacity is stopped, saving the config first and retaining all project files.
| Parameter | Type | Description |
|---|---|---|
closeDialogs | boolean | |
discardRecovery | boolean | |
reconnect | boolean | |
visible | boolean |
audacity_labels Labels
List/find labels by text, edit one flat zero-based label index, delete one label, or create regular markers. Delete safely reconstructs only its label track at the bottom of the project, preserving every other label including overlaps; returned indices reflect the new order.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
end | number | |
index | integer | |
interval | number | |
query | string | |
start | number | |
text | string | |
trackName | string |
audacity_labels_file Labels File
Import Audacity TSV or JSON labels into a named track; export labels as TSV/JSON, SRT/VTT subtitles, timestamp chapters, CUE, Podlove or ffmetadata. Point-label subtitle ends come from the next marker or project end. Existing output files are refused.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
file * | string | |
format | string | |
trackName | string |
audacity_label_regions_export Label Regions Export
Export every positive-duration region in one label track as numbered audio files, using the current mix and explicit time/track selections. Point labels are skipped. Existing outputs are refused and all destinations are checked before export.
| Parameter | Type | Description |
|---|---|---|
directory * | string | |
channels | integer | |
format | string | |
trackName | string |
audacity_batch Batch
Clean/master audio files in Audacity using isolated temporary tracks and the reviewed pipeline. Preflights all paths/steps, dryRun lists jobs, and original tracks stay intact. Pause shortening requires an empty project because sync-lock may shift other tracks. Stops at the first failure; completed outputs are retained. Optional before/after reports measure the rendered result. Current solo tracks are refused because they could silence temporary-track exports.
| Parameter | Type | Description |
|---|---|---|
jobs * | array | |
channels | integer | |
dryRun | boolean | |
measure | boolean |