Gizmos Audacity

v0.1.0
io.github.gizmos-quest/gizmos-audacity-mcp Checked 4 days ago Published 1 month ago

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

ParameterTypeDescription
visibleboolean

audacity_window Window

Show or hide the Audacity window on Windows. A hidden Audacity keeps working through the pipe.

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

ParameterTypeDescription
saveTostringkeep 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.

ParameterTypeDescription
closeboolean

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.

ParameterTypeDescription
backupTostring.aup3 path for the current project
visibleboolean

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.

ParameterTypeDescription
type *string

audacity_describe Describe

Parameters of one scripting command or effect from the bundled English Audacity 3.7.8 catalogue.

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

ParameterTypeDescription
command *string
paramsobject

audacity_menu Menu

Run a menu command that needs no dialog (Play, Stop, Undo, Redo, SelectAll, SelectNone, NewMonoTrack, NewStereoTrack, NewLabelTrack, AddLabel, ZoomSel, FitInWindow, CursProjectStart, …). Use audacity_transport for guarded recording.

ParameterTypeDescription
command *string

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

ParameterTypeDescription
endnumber
startnumber
tracktrack index (0-based) or unique track name
trackCountinteger

audacity_import Import

Import an audio (or video, for its sound) file as a new track, name it and place it at start seconds.

ParameterTypeDescription
file *string
namestring
startnumber

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.

ParameterTypeDescription
track *track index (0-based) or unique track name
gainDbnumber
muteboolean
namestring
pannumbernormalized pan: -1 full left, 0 center, 1 full right
soloboolean

audacity_clip_move Clip Move

Move the clip that covers time `at` on a track so it starts at `start` seconds.

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

ParameterTypeDescription
points *array
track *track index (0-based) or unique track name
replaceboolean

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.

ParameterTypeDescription
labels *array
trackNamestring

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.

ParameterTypeDescription
effect *string
endnumber
paramsobject
startnumber
tracktrack index (0-based) or unique track name
trackCountinteger

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.

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

ParameterTypeDescription
file *string
channelsinteger
endnumber
startnumber

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.

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

ParameterTypeDescription
track *
attackMsnumber
bassDbnumber
compressboolean
dryRunboolean
endnumber
highPassHznumber
limitPeakDbnumberoptional limiter after normalization; measure the result
loudnessstringnormalization can raise quiet audio; select it explicitly
lowPassHznumber
lufsnumber
noiseProfileobjectexplicit room-tone interval; omitting it skips noise reduction
peakDbnumber
presetstring
rationumber
releaseMsnumber
removeClicksbooleanmust remain false: native Click Removal can open a blocking result dialog
removeDcboolean
rmsDbnumber
shortenPausesobjectoptional destructive silence truncation; changes timing and video sync
startnumber
thresholdDbnumber
trebleDbnumber

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.

ParameterTypeDescription
action *string
track *
endnumber
startnumber
trackCountinteger

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.

ParameterTypeDescription
kind *string
amplitudenumber
beatsPerBarinteger
channelsintegernew-track channel count; defaults to mono and must be omitted for an existing track
clickSoundstring
durationnumber
endAmplitudenumber
endFrequencynumber
frequencynumber
interpolationstring
namestring
noiseTypestring
startnumber
swingnumber
temponumber
trackomit to create a new track; supplying it replaces audio in the range
waveformstring

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.

ParameterTypeDescription
at *numbertime inside the clip; name/color require a point strictly after its start and before its end
track *
colorstring
gainDbnumberrelative sample gain applied destructively with Amplify to this clip
namestring

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.

ParameterTypeDescription
action *string
endnumber
namestring
startnumber
track
trackCountinteger

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.

ParameterTypeDescription
direction *string
track *
endnumber
startnumber

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.

ParameterTypeDescription
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
dryRunboolean
duckDbnumberattenuation applied to the bed, in dB
endnumber
fadeDownnumberouter fade-down duration, in seconds
fadeUpnumberouter fade-up duration, in seconds
innerFadeDownnumberinner fade-down duration, in seconds
innerFadeUpnumberinner fade-up duration, in seconds
maximumPausenumbermaximum pause to bridge while ducking, in seconds
startnumber
thresholdDbnumbervoice 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.

ParameterTypeDescription
track *
dryRunboolean
endnumber
maxBoostDbnumbermaximum positive static gain, in dB; does not cap attenuation
startnumber
targetLufsnumberdesired integrated loudness, in LUFS
toleranceLunumberallowed distance from targetLufs, in LU
truePeakCeilingDbtpnumbermaximum 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.

ParameterTypeDescription
currentSelectionboolean
endnumber
filestring
maxRegionsinteger
minimumSecondsnumber
startnumber
thresholdDbnumber
track
trackCountinteger

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.

ParameterTypeDescription
file *string
timeoutMsinteger

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.

ParameterTypeDescription
backendstring
currentSelectionboolean
dualMonoboolean
endnumber
startnumber
targetsobject
timeoutMsinteger
track
trackCountinteger

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.

ParameterTypeDescription
file *string
backendstring
dualMonoboolean
targetsobject
timeoutMsinteger

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.

ParameterTypeDescription
after *string
before *string
backendstring
dualMonoboolean
targetsobject
timeoutMsinteger

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.

ParameterTypeDescription
background *object
foreground *object
minimumDbnumber

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.

ParameterTypeDescription
action *string
durationnumber
endnumber
newTrackboolean
startnumber
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.

ParameterTypeDescription
action *string
stepsinteger

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.

ParameterTypeDescription
action *string
namestring
valuestring | 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.

ParameterTypeDescription
action *string
dryRunboolean
namestring
outputTostring

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.

ParameterTypeDescription
closeDialogsboolean
discardRecoveryboolean
reconnectboolean
visibleboolean

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.

ParameterTypeDescription
action *string
endnumber
indexinteger
intervalnumber
querystring
startnumber
textstring
trackNamestring

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.

ParameterTypeDescription
action *string
file *string
formatstring
trackNamestring

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.

ParameterTypeDescription
directory *string
channelsinteger
formatstring
trackNamestring

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.

ParameterTypeDescription
jobs *array
channelsinteger
dryRunboolean
measureboolean