[SOLVED] How to extract multiple segments from audio file?

Hello

(This question isn’t specifically related to the Windows port of Audacity, but as it seems like this forum has no General section where to ask questions, here goes.)

I’m currently running Audacity 2.0.6 on Windows7.

I have a newbie question: I need to extract several parts from an audio file, add some fade out/fade in to mash them up, and save the whole thing as an audio file.

What is the right way to do this?

Is there a way to 1) mark several parts with start/end points, 2) tell Audacity to remove the rest that I don’t need, 3) add some fade out/in for each segment, and 4) save the whole thing as an audio file?

Thank you.

One way is to create a number of blank tracks (Tracks > Add New) and copy/paste segments from existing tracks into the new ones one at a time. That means you can use the MUTE and SOLO buttons to the left of each track to turn it on and off and the Time Shift Tool…

http://manual.audacityteam.org/o/man/time_shifting.html

…to shove each track later and earlier as needed. Obviously, all the regular tools like Effect > Fade-In and Effect > Fade-Out work, too.

When you Export, Audacity will create one single track with all the un-muted work. If you need individual segments, I think you’re stuck UnMuting one at a time and Exporting, or Select one track by clicking just above the MUTE button and File > Export Selected.

I think it’s still true that Audacity will ignore leading blank spaces, so no matter where you slipped them sooner and later, they’ll all start with the first note.

Koz

In Audacity you can label sections , then save the labelled sections as separate audio files in-one-go using “export multiple

If you select a section of audio , then duplicate it , (press Ctrl+D), a copy will be created on a separate track which you can move about using the time-shift tool

save the sections as separate audio files in one go using “export multiple”

Yes, and that’s assuming you plan to open all the exported files in a fresh Audacity later and do the post-production tricks. That does work. Depending on how many raw, pre-production files you have, that will give you a much cleaner, leaner edit screen.

Almost without question you will find zooming handy.

http://manual.audacityteam.org/o/man/zooming.html

That’s the graduate level course. I only use three Zooms: Drag-select something and zoom into it with Control-E. Zoom out a little bit with Control-3. Zoom out to the full show with Control-F. That’s it. I’ve never found need to use any of the other controls.

Shift-ScrollWheel will gently push the tracks sooner and later (left and right).

And I like turning Screen Update off. Nothing like Audacity grabbing your edit point right out from in front of you before you can stop it.

Audacity > Edit > Preferences > Tracks > [_] Update… (de-select)

Koz

Thanks for the input, but before going further, I’d like to check that there’s indeed no way to do what I wanted:

  1. I wrote down a list of start-end points in an audio file
  2. I want to select those parts in the audio track, and then have Audacity just keep those
  3. I’ll do some further editing to remove useless audio, and apply some fade in/out
  4. Finally, I’ll save the whole thing into a single audio file.

I expected to 1) select a section of the track, 2) let Audacity remember that section, 3) select a new section, etc. until I’d be done selecting all the parts I need in that single audio file I imported.

Apparently, Audacity is unable to select multiple parts of a single audio track, so the user is required to 1) select a section, 2) copy it into a new track, 3) merge all the new tracks in to a single track, and 4) finally, save the new, single track into an audio file.

Am I correct?

Thank you.

With just a bit of reformatting, you could convert that list into a list of “labels”, which can then be imported into Audacity to create a label track (Audacity Manual). The required format for importing labels from a text file is described here: Audacity Manual

Once you have your label track, you can export the labelled sections using “Export Multiple” Audacity Manual

Then you would start a new project and import the files that you have just exported.

The current version of Audacity (2.1.1) includes two effects that make crossfading much easier:
http://manual.audacityteam.org/o/man/crossfade_clips.html
http://manual.audacityteam.org/o/man/crossfade_tracks.html

Audacity 2.1.1 is available here; Audacity ® | Free, open source, cross-platform audio software for multi-track recording and editing.

Thanks.

So Audacity requires 1) exporting each part, 2) before re-importing them, and 3) saving the whole thing a single audio file?

Is there no way to just 1) select multiple parts of a single audio file, 2) hit a button to have the unselected parts to be deleted, and 3) save the new edited track into an audio file?

I see “labels”, and “regions”, but am unclear at what they are, how they differ, and whether they are useful for what I need to do.

Google didn’t help much, which surprises me because I expected this task to be very common.

To avoid the export multiple and reimport you would have to be prepared to delete the parts you don’t want (using the areas outside the labels as a guide).

Or select and label the parts you don’t want then select the label track and use one of the Labeled Audio commands to delete the labeled sections in one go.


Gale

Labels are described in the link provided previously: Audacity Manual
A label may mark a single time position (sometimes referred to as a “point label”), or may mark a time region (sometimes referred to as a “region label”).

Thanks.

To me, it’s easier to note down the parts I do want to keep, select them, and have Audacity remove the rest:

At this point, I defined three regions… and am stuck at how to have Audacity remove the rest of the audio, ie. the parts between the regions. Neither the tutorials, Google, or YouTube helped :confused:

I don’t think there is any provision to do that. Delete “everything I don’t want” is dangerous. One wrong move and your show goes away. Isn’t there an “Invert Selection?” One of my editors can do that.

Labels became more important than you would think because particularly if you’re used to a video editor, Audacity doesn’t have edit markers. The only way to mark an action region is Labels.

Koz

It doesn’t matter: That’s what CTRL+Z is for.

Yes, I was looking for either a “Delete unselected parts”, or “Invert Selection” followed by “Delete selected parts”, but so far, nothing.

Surely, there must quite a few users like me who need to 1) select some parts they want to keep, and 2) have Audacity remove the rest of the audio.

I think the closest we get is File > Export Selection.

Koz

But File > Export selection would export each audio section, re-encoding the audio in the process, before having to re-combine the parts, and re-encoding them. Definitely not what I want.

Found a work-around:

  1. Launch a second instance of Audacity
  2. In the first instance, create regions for each segment you want to keep
  3. For each region: Select it by clicking on its label in the Label Track, select Edit > Copy, switch to the other instance of Audacity, select Edit > Paste

Maybe there’s a faster way, but it does the job.

Thank you.

It will only encode if you choose a format that requires encoding. If you choose 32-bit float WAV format then the exported file is identical to the original audio in Audacity.

You can also do it in the same Audacity session. Just create a new track (Tracks menu) and then copy and paste parts from the first track into the second track. To listen to just one of the tracks, use the “Solo” button on the panel on the left end of the track (easiest if you set the solo button behaviour to “simple” (Edit menu > Preferences > Tracks).

If you want to crossfade the audio clips there are two effects that make this simple to do:
http://manual.audacityteam.org/o/man/crossfade_clips.html
http://manual.audacityteam.org/o/man/crossfade_tracks.html

The reason that I initially suggested creating separate files for each part is that if you change your mind about which parts in which order, it can be much easier if you are working with discrete files. There are however many ways to do this type of work and some approaches are more efficient with some projects than others. The “multiple files” approach is nice because it provides lots of flexibility and safety.

Thanks much. A bit more involved than I expected this to be, but it does the job.

After adding a stereo audio track, I notice that hitting the End key jumps to the end of the imported audio track, even after making sure the focus is put on the new audio track: Is there a way to jump to the end of the new audio track instead?

“K” (Moves the cursor to the end of the selected track)
See: Audacity Manual

If Edit > Labeled Audio had a Trim command, or if there was Tracks > Invert Labels, the task would have been much easier.


Gale

I’m stuck at how to crossfade the parts I copy/pasted from the full file above to the new audio tracks below:
Audacity.crossfade.tracks.jpg
Effect > Crossfade Tracks says “Nyquist: Only 1 track selected. ‘Crossfade Tracks’ requires 2 tracks.”

OTOH, although it looks like what I need, the Crossfade Clips article on the Audacity site contains no URL from which to download this plug-in.

Edit: clipfix.ny is listed in "c:\Program Files\Audacity\Plug-Ins", but Edit > Preferences seems to show no way to enable/disable plug-ins: Why is Crossfade Clip not listed in the Effect menu?

It is included in Audacity 2.1.1