TrimTrack plug-in

This plug-in was in response to a question posted here:


To use, download and put “TrimExtend.ny” in the Audacity Plug-ins folder. The effect will appear in the “Effect” menu when you restart Audacity.

I guess this would be a lot more useful if Nyquist plug-ins could be used in “Chains”.
[Update: Audacity 2.0.1 and later support Nyquist plug-in in chains]

I haven’t looked in detail at the thread, but what’s wrong with:

1 Select the track
2 SHIFT + CTRL + right arrow until you reach the correct place on Selection Toolbar
3 SHIFT + CTRL + left arrow until you reach the place on Selection Toolbar
4 Edit > Trim ?


Absolutely nothing, unless you’ve got a whole load of tracks and you want to trim off the same amount from each. In this user case “1000 sound files of between 4 and 10 seconds each”, in which case it is much quicker to press Ctrl+R.

Wiki candidate, please test.

Here’s an updated version of Trim Track…

If anyone has access to Jaws screen reader it would be very useful if they could say if this plug-in work properly with Jaws. If it does then I think that this could be particularly useful for visually impaired users.

The updated version includes code for error messages to be suppressed (fail silently) which I thought could be useful for using the effect in Chains.
Unfortunately Nyquist plug-ins are not currently supported in chains and sadly there appears to be no developer interest in this feature so I’ve commented out this code for now.
trimtrack.ny (2.08 KB)

This version can be used to either trim audio from the start of a track, delete from the end of a track or pad the start/end with silence.
Positive time values add silence.
Negative time values delete audio.

To enable the effect to be used in Chains (requires Audacity 2.0.1 or later) it is possible to skip error and warning messages.
Note that adding silence requires loading the entire track into RAM, so it will not be very fast and will require a lot of free RAM memory for adding padding to long tracks.
Trimming long tracks will also be quite slow but does not require more RAM memory than general Audacity usage.

This effect was developed primarily for use in Chains but may also be useful for visually impaired users as an easy and accessible method for adding or trimming a known length of silence from tracks.
TrimExtend.ny (3.08 KB)
[Update: do not use this version for extending stereo tracks]

There is a bug.

When extending a stereo track:

error: bad argument type - #(#<Sound: #b2965910> #<Sound: #b29652d0>)

This is due to:
Line 50

(dur (/ (snd-length s ny:all) *sound-srate*)))

Unfortunately, just fixing this to support stereo tracks does not solve the whole problem because of bug 425.

The plug-in works fine for mono tracks.

This is a bug-fix version to support extending stereo tracks.
It will need checking.
TrimExtend.ny (3.11 KB)

Would be useful if you could specify desired silence, rather than how much to add/cut to existing. I have to zoom in to see existing silence and then subtract this value from the desired track silence. For me it just as easy for me to just use the shift toolbar. Anyway, thanks for trying.

I downloaded the file but it’s TrimExtend, not Trimtrack, and seems to convert the time to silence (not really cropping it out). What am I missing?

thank you!

This version can make the track (or selection) shorter by removing some audio from the start or end (trimming) or can make the track longer by adding silence to the start and/or end. Positive values add silence, negative values trim (delete) from the selection.

Plug-in moved to the wiki