# Macros and Scripting

**URL:** https://forum.audacityteam.org/c/programming-and-development/macros-and-scripting/16.md

[Latest](https://forum.audacityteam.org/latest.md) · [Categories](https://forum.audacityteam.org/categories.md) · [Tags](https://forum.audacityteam.org/tags.md)

---

## [About the Macros and Scripting category](https://forum.audacityteam.org/t/about-the-macros-and-scripting-category/122)

<div class="topic-metadata">

**Author:** [@system](https://forum.audacityteam.org/u/system)\
**Replies:** 0

</div>

Questions, discussion and recipes for scripting and batch processing in Audacity. See also the “Scripting” section of the Audacity manual.

---

## [Audacity-mcp (control Audacity with natural language w/ Claude)](https://forum.audacityteam.org/t/audacity-mcp-control-audacity-with-natural-language-w-claude/152456)

<div class="topic-metadata">

**Author:** [@tachyonshuggy](https://forum.audacityteam.org/u/tachyonshuggy)\
**Replies:** 2\
**Last updated:** [November 6, 2026, 6:27pm UTC](https://forum.audacityteam.org/t/audacity-mcp-control-audacity-with-natural-language-w-claude/152456 "2026-11-06T18:27:35Z")

</div>

Hi all, This is my first post here. I recently built a small open-source tool called audacity-mcp that I thought might interest this community. I didn’t see anything like it out there and I thought it might be useful to…

---

## [mod-script-pipe loads but no named pipe created on Windows 10 — Claude MCP integration](https://forum.audacityteam.org/t/mod-script-pipe-loads-but-no-named-pipe-created-on-windows-10-claude-mcp-integration/152504)

<div class="topic-metadata">

**Author:** [@GroundPigeon](https://forum.audacityteam.org/u/GroundPigeon)\
**Replies:** 1\
**Last updated:** [May 11, 2026, 11:19am UTC](https://forum.audacityteam.org/t/mod-script-pipe-loads-but-no-named-pipe-created-on-windows-10-claude-mcp-integration/152504 "2026-05-11T11:19:19Z")

</div>

Hi everyone, I’m trying to connect Claude Desktop to Audacity using the an3-audacity-mcp MCP server on Windows 10 and have hit a specific issue I can’t resolve. Hoping someone here has seen this before. My setup: — Wi…

---

## [How to change playback speed?](https://forum.audacityteam.org/t/how-to-change-playback-speed/54346)

<div class="topic-metadata">

**Author:** [@brettr](https://forum.audacityteam.org/u/brettr)\
**Replies:** 5\
**Last updated:** [October 27, 2025, 3:51pm UTC](https://forum.audacityteam.org/t/how-to-change-playback-speed/54346 "2025-10-27T15:51:31Z")

</div>

In Audacity 2.3.2 for Windows, I’d like to change the playback speed of MP3s to 1.5x. I have a new macro setup with the following: 01 Increase Playback Speed 02 Export as MP3 03 - END - When I execute this macro on a…

---

## [Is it possible to pause a macro for a specified time](https://forum.audacityteam.org/t/is-it-possible-to-pause-a-macro-for-a-specified-time/149356)

<div class="topic-metadata">

**Author:** [@Sweat](https://forum.audacityteam.org/u/Sweat)\
**Replies:** 5\
**Last updated:** [October 2, 2025, 4:12pm UTC](https://forum.audacityteam.org/t/is-it-possible-to-pause-a-macro-for-a-specified-time/149356 "2025-10-02T16:12:24Z")

</div>

I have a macro created but would like it to pause for a few seconds between files that it processes. Any suggestions?

---

## [Macro for multiple tracks "Fade Out"](https://forum.audacityteam.org/t/macro-for-multiple-tracks-fade-out/149251)

<div class="topic-metadata">

**Author:** [@Uffeg](https://forum.audacityteam.org/u/Uffeg)\
**Replies:** 5\
**Last updated:** [September 25, 2025, 5:07pm UTC](https://forum.audacityteam.org/t/macro-for-multiple-tracks-fade-out/149251 "2025-09-25T17:07:36Z")

</div>

Hi I have a project with an arbitrarily number of tracks with different lengths. Would like to “Fade Out” each track with a fixed time interval, say 5 seconds. How to do this with a macro script? Best regards, Ulf J…

---

## [The menu entry Apply Macro to Files doesn't appear stopping me from applying my macros to multiple files](https://forum.audacityteam.org/t/the-menu-entry-apply-macro-to-files-doesnt-appear-stopping-me-from-applying-my-macros-to-multiple-files/148885)

<div class="topic-metadata">

**Author:** [@SALACA](https://forum.audacityteam.org/u/SALACA)\
**Replies:** 6\
**Last updated:** [September 9, 2025, 7:10pm UTC](https://forum.audacityteam.org/t/the-menu-entry-apply-macro-to-files-doesnt-appear-stopping-me-from-applying-my-macros-to-multiple-files/148885 "2025-09-09T19:10:54Z")

</div>

I have created a macro to convert mp3 audio files to wav format audio files but the Apply Macro to Files menu entry doesn’t appear so I can’t process multiple files at once. Can anyone help?

---

## [Tone Generator via Scripting drifts frequency to last GUI-used value despite explicit parameters](https://forum.audacityteam.org/t/tone-generator-via-scripting-drifts-frequency-to-last-gui-used-value-despite-explicit-parameters/147278)

<div class="topic-metadata">

**Author:** [@flori8029](https://forum.audacityteam.org/u/flori8029)\
**Replies:** 1\
**Last updated:** [August 13, 2025, 10:29am UTC](https://forum.audacityteam.org/t/tone-generator-via-scripting-drifts-frequency-to-last-gui-used-value-despite-explicit-parameters/147278 "2025-08-13T10:29:22Z")

</div>

Dear Community, I’m trying to generate a constant frequency sine wave using Audacity’s scripting interface (mod-script-pipe), by using the Tone command in my python script: do\_command('NewMonoTrack:') do\_command('Selec…

---

## [Adaptus Mechanicus voice macro](https://forum.audacityteam.org/t/adaptus-mechanicus-voice-macro/64950)

<div class="topic-metadata">

**Author:** [@MetaStatistical](https://forum.audacityteam.org/u/MetaStatistical)\
**Replies:** 1\
**Last updated:** [August 11, 2025, 12:08pm UTC](https://forum.audacityteam.org/t/adaptus-mechanicus-voice-macro/64950 "2025-08-11T12:08:34Z")

</div>

I wanted to try my hand at duplicating the vocal effect from the title teaser in the WH40K: Mechanicus video game. Combined a few different guides and got something that works. Figured I’d share it. It’s just a macro, a…

---

## [Macro to move track 0.005 seconds forward with Silence](https://forum.audacityteam.org/t/macro-to-move-track-0-005-seconds-forward-with-silence/145017)

<div class="topic-metadata">

**Author:** [@Jacksaur](https://forum.audacityteam.org/u/Jacksaur)\
**Replies:** 11\
**Last updated:** [July 21, 2025, 12:29pm UTC](https://forum.audacityteam.org/t/macro-to-move-track-0-005-seconds-forward-with-silence/145017 "2025-07-21T12:29:57Z")

</div>

I’ve been trying to make a macro that performs a few operations, but surprisingly the one I’m finding hardest by far is just moving my track 0.005 seconds ahead. From what I’ve found, there is absolutely no way to move t…

---

## [Macro to Remove Tracks](https://forum.audacityteam.org/t/macro-to-remove-tracks/58170)

<div class="topic-metadata">

**Author:** [@dtessier](https://forum.audacityteam.org/u/dtessier)\
**Replies:** 6\
**Last updated:** [June 25, 2025, 10:56am UTC](https://forum.audacityteam.org/t/macro-to-remove-tracks/58170 "2025-06-25T10:56:03Z")

</div>

Hello, I have a project with 14 tracks in it. I would like a macro to delete all of the tracks except for track 3 and 11. I can’t seem to find any information on how to do this. Your help would be greatly appreciated…

---

## [Creating a macro to add silence to the end of a track to match another tracks length](https://forum.audacityteam.org/t/creating-a-macro-to-add-silence-to-the-end-of-a-track-to-match-another-tracks-length/140503)

<div class="topic-metadata">

**Author:** [@moterrac](https://forum.audacityteam.org/u/moterrac)\
**Replies:** 0\
**Last updated:** [May 23, 2025, 10:31am UTC](https://forum.audacityteam.org/t/creating-a-macro-to-add-silence-to-the-end-of-a-track-to-match-another-tracks-length/140503 "2025-05-23T10:31:50Z")

</div>

Hello, I have been trying to create a macro for generating silence to match to another tracks length. Lets say I have two tracks, one slighty longer and the other shorter. Currently if I want to add silence to match the …

---

## [Applying noise reduction in a macro to multiple files](https://forum.audacityteam.org/t/applying-noise-reduction-in-a-macro-to-multiple-files/65492)

<div class="topic-metadata">

**Author:** [@openclosed2](https://forum.audacityteam.org/u/openclosed2)\
**Replies:** 7\
**Last updated:** [May 22, 2025, 8:15pm UTC](https://forum.audacityteam.org/t/applying-noise-reduction-in-a-macro-to-multiple-files/65492 "2025-05-22T20:15:47Z")

</div>

So I know you can batch apply a macro to multiple files but the issue I have is part of my macro is a noise reduction, which means I need to select a piece of the audio with just background noise to get the noise profile…

---

## [ChangeSpeed Not Working in Scripting in Python](https://forum.audacityteam.org/t/changespeed-not-working-in-scripting-in-python/136902)

<div class="topic-metadata">

**Author:** [@domesticSnail](https://forum.audacityteam.org/u/domesticSnail)\
**Replies:** 3\
**Last updated:** [April 16, 2025, 4:48pm UTC](https://forum.audacityteam.org/t/changespeed-not-working-in-scripting-in-python/136902 "2025-04-16T16:48:07Z")

</div>

Hi all, I’m using pyaudacity to batch edit some files in Audacity using the mod-script-pipes functionality. My commands in general work fine, with the exception of the command where I use ChangeSpeed: import pyaudacity…

---

## [I have created MCP for connecting Claude Desktop Client with the Audacity application](https://forum.audacityteam.org/t/i-have-created-mcp-for-connecting-claude-desktop-client-with-the-audacity-application/136802)

<div class="topic-metadata">

**Author:** [@an3de](https://forum.audacityteam.org/u/an3de)\
**Replies:** 0\
**Last updated:** [April 14, 2025, 11:59pm UTC](https://forum.audacityteam.org/t/i-have-created-mcp-for-connecting-claude-desktop-client-with-the-audacity-application/136802 "2025-04-14T23:59:10Z")

</div>

Hi guys. I have created an MCP server to connect Claude Desktop Client with Audacity. I have added all possible commands from the Audacity scripting reference page, so now you can work with all commands in Audacity thro…

---

## [I would like to launch Audacity from Python and open multiple wav files simultaneously](https://forum.audacityteam.org/t/i-would-like-to-launch-audacity-from-python-and-open-multiple-wav-files-simultaneously/136571)

<div class="topic-metadata">

**Author:** [@vmmf89](https://forum.audacityteam.org/u/vmmf89)\
**Replies:** 2\
**Last updated:** [April 11, 2025, 8:52pm UTC](https://forum.audacityteam.org/t/i-would-like-to-launch-audacity-from-python-and-open-multiple-wav-files-simultaneously/136571 "2025-04-11T20:52:12Z")

</div>

Hello, I’m trying to write a python script which loads Audacity with multiple audio files in the same window. So far I have been able to do this but instead of opening both audio files on the same window, 2 independent …

---

## [A Python script for cut .wav file by .cue file and more](https://forum.audacityteam.org/t/a-python-script-for-cut-wav-file-by-cue-file-and-more/136297)

<div class="topic-metadata">

**Author:** [@tyysoft](https://forum.audacityteam.org/u/tyysoft)\
**Replies:** 0\
**Last updated:** [April 9, 2025, 1:10am UTC](https://forum.audacityteam.org/t/a-python-script-for-cut-wav-file-by-cue-file-and-more/136297 "2025-04-09T01:10:42Z")

</div>

I’ve write a python script to order audacity cut .wav(many tracks) to separately file by .cue file as once, only need set the file path of .wav, it will choose the .cue file in the same folder with same name, if don’t fi…

---

## [Splitting 500 wav files\>3hours into 3h tracks](https://forum.audacityteam.org/t/splitting-500-wav-files-3hours-into-3h-tracks/134194)

<div class="topic-metadata">

**Author:** [@osh7878](https://forum.audacityteam.org/u/osh7878)\
**Replies:** 1\
**Last updated:** [March 17, 2025, 9:46am UTC](https://forum.audacityteam.org/t/splitting-500-wav-files-3hours-into-3h-tracks/134194 "2025-03-17T09:46:24Z")

</div>

Hi, new to Audacity and this forum. I have MANY wav files (almost 500), which their length varies between 3 hours to almost 14h. I want to split each file into multiple 2:59:50 tracks. The name of the output files shou…

---

## [Nyquist generate plugin crashes on return](https://forum.audacityteam.org/t/nyquist-generate-plugin-crashes-on-return/133978)

<div class="topic-metadata">

**Author:** [@Barleyman](https://forum.audacityteam.org/u/Barleyman)\
**Replies:** 7\
**Last updated:** [March 15, 2025, 11:32am UTC](https://forum.audacityteam.org/t/nyquist-generate-plugin-crashes-on-return/133978 "2025-03-15T11:32:36Z")

</div>

So, I wanted to create a script to generate tones for embedded µCU to use and getting way too fanatical about getting it done “properly” it as usual. There would’ve been easier ways to do this, but I got annoyed I didn’t…

---

## [Exporting as Wav Bit Rate Settings](https://forum.audacityteam.org/t/exporting-as-wav-bit-rate-settings/57438)

<div class="topic-metadata">

**Author:** [@prettyfrickn](https://forum.audacityteam.org/u/prettyfrickn)\
**Replies:** 10\
**Last updated:** [February 2, 2025, 6:45pm UTC](https://forum.audacityteam.org/t/exporting-as-wav-bit-rate-settings/57438 "2025-02-02T18:45:17Z")

</div>

Using an audacity macro to batch convert my stems from stereo to mono. In doing so, I also need to export the converted files in the macro. My problem is, the macro “export to wav” only exports at 16-bit depth, and my …

---

## [Read or set the volume slider on the track control panel](https://forum.audacityteam.org/t/read-or-set-the-volume-slider-on-the-track-control-panel/130353)

<div class="topic-metadata">

**Author:** [@gregorissimo](https://forum.audacityteam.org/u/gregorissimo)\
**Replies:** 0\
**Last updated:** [February 1, 2025, 3:41am UTC](https://forum.audacityteam.org/t/read-or-set-the-volume-slider-on-the-track-control-panel/130353 "2025-02-01T03:41:52Z")

</div>

Do any scripting commands allow you to read or set the volume on the volume slider on the track control panel? The closest I could find in the scripting reference was OutputGain, but that’s a different volume control. B…

---

## [Getting time while recording with pipe](https://forum.audacityteam.org/t/getting-time-while-recording-with-pipe/130300)

<div class="topic-metadata">

**Author:** [@egit](https://forum.audacityteam.org/u/egit)\
**Replies:** 1\
**Last updated:** [January 31, 2025, 11:41am UTC](https://forum.audacityteam.org/t/getting-time-while-recording-with-pipe/130300 "2025-01-31T11:41:00Z")

</div>

Hi, I can start recording with python and pipe, I can stop the recording, but how can I get the current PlayHead position (while recording and later while playing)?? Thanks for your help.

---

## [Macro Request - Jump to last edit](https://forum.audacityteam.org/t/macro-request-jump-to-last-edit/129726)

<div class="topic-metadata">

**Author:** [@Languagelabpodcast](https://forum.audacityteam.org/u/Languagelabpodcast)\
**Replies:** 1\
**Last updated:** [January 27, 2025, 2:21pm UTC](https://forum.audacityteam.org/t/macro-request-jump-to-last-edit/129726 "2025-01-27T14:21:45Z")

</div>

Hi all, I’m editing long interviews and need to be able to skip back to the most recent edit (as in if I delete a section or put silence in etc, I need to be able to return to that section quickly. Is there a macro that…

---

## [Batch split 35 separate 45 minute files into "3" 15 minute files each?](https://forum.audacityteam.org/t/batch-split-35-separate-45-minute-files-into-3-15-minute-files-each/53097)

<div class="topic-metadata">

**Author:** [@bounzes](https://forum.audacityteam.org/u/bounzes)\
**Replies:** 23\
**Last updated:** [January 22, 2025, 6:23am UTC](https://forum.audacityteam.org/t/batch-split-35-separate-45-minute-files-into-3-15-minute-files-each/53097 "2025-01-22T06:23:57Z")

</div>

Is there a way to open up all 35 files in Audacity (45 minutes each) and split them up into 3 files of 15 minutes each for all files then export it all to .wav in one folder?

---

## [Processing long tracks with DeClicker.ny](https://forum.audacityteam.org/t/processing-long-tracks-with-declicker-ny/66393)

<div class="topic-metadata">

**Author:** [@GJG](https://forum.audacityteam.org/u/GJG)\
**Replies:** 27\
**Last updated:** [January 13, 2025, 10:39pm UTC](https://forum.audacityteam.org/t/processing-long-tracks-with-declicker-ny/66393 "2025-01-13T22:39:22Z")

</div>

Hi, something like this could be very useful for me - I’m very new to Audacity macros, by the way. I have a filter that I want to run on the whole of a single track in an Audacity file, it can be maybe 40 to 70 minutes …

---

## [Change default wav encoding in macro "export wav"](https://forum.audacityteam.org/t/change-default-wav-encoding-in-macro-export-wav/125790)

<div class="topic-metadata">

**Author:** [@psychpan](https://forum.audacityteam.org/u/psychpan)\
**Replies:** 3\
**Last updated:** [December 20, 2024, 4:39pm UTC](https://forum.audacityteam.org/t/change-default-wav-encoding-in-macro-export-wav/125790 "2024-12-20T16:39:07Z")

</div>

I’m using a macro to batch convert nearly 800 sound files to WAV format (44,100 Hz, 16 bits), but it seems I’m getting AIFF files instead of WAV files. I’ve noticed that for Mac users, AIFF seems to be the default setti…

---

## [Exporting Macro Dialogs to csv/txt](https://forum.audacityteam.org/t/exporting-macro-dialogs-to-csv-txt/124031)

<div class="topic-metadata">

**Author:** [@Natantheaud](https://forum.audacityteam.org/u/Natantheaud)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 1:06pm UTC](https://forum.audacityteam.org/t/exporting-macro-dialogs-to-csv-txt/124031 "2024-11-22T13:06:47Z")

</div>

A general question about macros from a newcomer (Audacity 3.6.2, 64bit; Windows); I’m trying to export information about an audacity project, namely start and end times of clips throughout the project. The ‘Get Info’ co…

---

## [I need help with my macro](https://forum.audacityteam.org/t/i-need-help-with-my-macro/123782)

<div class="topic-metadata">

**Author:** [@Saiya](https://forum.audacityteam.org/u/Saiya)\
**Replies:** 3\
**Last updated:** [November 20, 2024, 6:36pm UTC](https://forum.audacityteam.org/t/i-need-help-with-my-macro/123782 "2024-11-20T18:36:55Z")

</div>

Gapped Listening (Beginner).txt (80.6 KB) I’ve been working with this macro and I noticed it works perfectly on short files (about a second or two) but on the longer files, it doesn’t work properly. It will change the t…

---

## [How to have audacity continually record to a file every hour 24/7?](https://forum.audacityteam.org/t/how-to-have-audacity-continually-record-to-a-file-every-hour-24-7/122036)

<div class="topic-metadata">

**Author:** [@InGearX](https://forum.audacityteam.org/u/InGearX)\
**Replies:** 4\
**Last updated:** [October 31, 2024, 10:11am UTC](https://forum.audacityteam.org/t/how-to-have-audacity-continually-record-to-a-file-every-hour-24-7/122036 "2024-10-31T10:11:22Z")

</div>

I also asked ChatGPT is there any windows software that will record audio and save it as a file (likely .mp3) every hour - much like CCTV but for audio it told me: Audacity with Timer Record and Auto Save Plugins …

---

## [Macro to batch truncate silence](https://forum.audacityteam.org/t/macro-to-batch-truncate-silence/59110)

<div class="topic-metadata">

**Author:** [@perzaklie](https://forum.audacityteam.org/u/perzaklie)\
**Replies:** 1\
**Last updated:** [October 25, 2024, 12:43am UTC](https://forum.audacityteam.org/t/macro-to-batch-truncate-silence/59110 "2024-10-25T00:43:24Z")

</div>

I apologize in advance if my issue has be addressed elsewhere. I searched the entire forum then the Macros and Scripting forum and I could not find it addressed. And I apologize if this is posted in the wrong forum. He…

[Next page](https://forum.audacityteam.org/c/programming-and-development/macros-and-scripting/16.md?page=1)
