Punch and Roll for Audacity in Linux, Mac, and Windows

Hello, audio book folks,

I’ve finished five audio books now for ACX and Audible using Audacity running on both Windows and Ubuntu Linux operating systems, all of them without the benefit of “punch and roll”. With ACX’s recent contest offer specifying their preference for un-edited punch and roll tracks as the submission criterion for production, I thought it was high time to up my game, and get a handle on the technique. Rather than cave, and use ProTools LE, I investigated how to make my beloved Audacity do the job. Here’s how:

  1. For Ubuntu/Linux, I adapted a Mac script developed for the purpose by Steven Jay Cohen: I wrote a “how-to” and you can find it on my blog, here:
  2. For MacOSX, go look at the fine blog post that Steven Jay Cohen wrote, here: http://www.stevenjaycohen.com/2014/01/19/punch-and-roll-editing-in-audacity-on-mac-osx/
    3.For Windows, there’s a simple script for AutoHotKey in the librivox forum that someone has reported does work: https://forum.librivox.org/viewtopic.php?p=725551 There’s also a youtube video on how, in general, to use AutoHotKeys with Audacity here: https://www.youtube.com/watch?v=0JXQvTS4We8&feature=youtu.be

My and Cohen’s techniques preserve the discarded edits in a separate track (non-destructive punch and roll). The windows technique at that Librivox link does not have that functionality, but it would be fairly simple to add by examining the linux and mac techniques, and adapting them to AutoHotKeys for windows.

I hope this post helps some of you out there. Please post comments about this has worked for you, and especially if you discover any refinements to share.

Do good work! -Elliott

Thanks for the post, Elliott.


I’m going to give this a try tonight.

Thanks. :slight_smile:

Edit - Hmm, feeling a little foolish here, but I can’t figure out how to get it running in Audacity. I have AHK installed. I have the script loaded and saved as an AHK file. I have it up and open next to my Audacity but can’t see an option for running it. I tried copying the script to the Nyquist prompt and that didn’t work.

I even watched the video on installing AHK and modifying scripts. It doesn’t mention how to actually run it, however. I’m sure it is something simple, but I’m not seeing it.

Windows 8.1 BTW.

Please advise.


I guess you just need to hit the right key combination to activate the script.
It is obiously something with “Q”.
AHK uses somewhat cryptic describers for the modifier keys. The + sign is obviously shift.
Don’t ask me what the exclamation mark (!) means.
Try it out.
Have you saved as e.g. Audacity.ahk? I’m not sure if it is enough to name the AHK file exactly like the executable (Audacity.[exe]) in order to make the hotkeys available when Audacity has focus.

In the Linux script, to get a 3 second pre-roll, there should be another:


Also I find that the 1 second pause near the end of the script can be reduced to 0.1 seconds, though that will probably vary from one machine to another.