Align tracks end to end

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Align tracks end to end

Post by steve » Thu May 16, 2013 1:45 am

This topic is in parallel with a discussion on the Audacity QA e-mail list. As most forum users are not on that list I thought that it would be useful to also raise the issue here (and also post some screenshots).

The question of how to join files end to end comes up quite regularly (for example: http://forum.audacityteam.org/viewtopic ... 46&t=72490)
Currently, it is quite awkward to append more than a few audio files. The options are to either import the files and then use the Time Shift tool to move them into position, or there are Nyquist plug-ins (Append Import and Chain it Up), which though quite powerful are not simple to use (mostly due to the lack of a file browser for Nyquist plug-ins and other limitations of the Nyquist plug-in interface).

Audacity is already able to import multiple audio files, but they are arranged one above the other. What is missing is the ability to quickly and easily arrange the imported files end-to-end. This could be accomplished by extending the functionality of "Tracks > Align Tracks" with a new option "Align End to End".
track-menu.png
track-menu.png (63.08 KiB) Viewed 21127 times
To concatenate (join end to end) a number of files:
1) "File > Import > Audio". Select the files that you want to import and they are imported in alphanumeric order, one above the other.
(Note: the ordering may be slightly different between Windows, Linux and Mac)
tracks007.png
tracks007.png (24.59 KiB) Viewed 21127 times
2) If the tracks need to be adjusted in any way, now is a good time to do it - for example you may want to normalize the tracks, or adjust the equalization so that they sound well together, or adjust the track order (by dragging tracks up or down).

3) Select all of the tracks ("Edit > Select > All" Ctrl+A)

4) "Tracks > Align Tracks > Align End to End" and the tracks are immediately aligned end to end:
tracks008.png
tracks008.png (18.85 KiB) Viewed 21127 times
5) (optional) If you want all of the tracks to be merged into a single track - Select All (as before) then "Tracks > Mix and Render" and the tracks will be mixed down into a single track. Note that "Mix and Render can be quite slow with large projects and may not be necessary as tracks are automatically mixed into a single mono or stereo file when the project is Exported.
firsttrack000.png
firsttrack000.png (10.63 KiB) Viewed 21127 times
For anyone that is able to build Audacity from the source code that wants to try out this proposed feature, here is an experimental patch:
AlignTracksEndToEnd-2.patch
(1.93 KiB) Downloaded 284 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Align tracks end to end

Post by steve » Thu May 16, 2013 4:46 pm

After concatenating the tracks, the project becomes much longer, so only a short section of the modified project is visible. Perhaps it would be preferable if "Align End to
End" also zoomed out to fit?

This new patch automatically zooms out to fit the project within the project window after aligning the tracks end to end.
AlignTracksEndToEnd-3b.patch
(1.99 KiB) Downloaded 320 times
To demonstrate the difference between AlignTracksEndToEnd-2 and AlignTracksEndToEnd-3, here is a project with three audio tracks before aligning:
tracks002.png
three tracks selected
tracks002.png (20.66 KiB) Viewed 21100 times

and after aligning with AlignTracksEndToEnd-2
tracks001.png
Only track 1 and the start of track 2 are visible
tracks001.png (16.3 KiB) Viewed 21100 times
and after aligning with AlignTracksEndToEnd-3
tracks003.png
The project is automatically zoomed to fit
tracks003.png (16.46 KiB) Viewed 21100 times
Is this new behaviour of automatically zooming to fit the project preferable?

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Align tracks end to end

Post by Edgar » Thu May 16, 2013 11:41 pm

steve wrote: Is this new behaviour of automatically zooming to fit the project preferable?
Very helpful patch--I have something similar in my custom build but it adds everything to a single track. I like the terminal zoom-to-fit.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Align tracks end to end

Post by steve » Fri May 17, 2013 1:12 am

I've still got a bug affecting stereo tracks - I'm working on it ;) (don't expect the last posted patch to be perfect - it isn't).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Align tracks end to end

Post by waxcylinder » Sun May 19, 2013 2:58 pm

Edgar wrote: I like the terminal zoom-to-fit.
+1 me too

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Align tracks end to end

Post by steve » Sun May 19, 2013 7:26 pm

Keeping this topic up to date - the latest patch also fixes a few other minor issues with the Align functions, in particular, the behaviour of label tracks.

The functions "Align with Cursor" and "Align with Selection Start" were identical in all but name, so these have been merged into a single "Align from Cursor / Selection Start" command.
Similarly "Align End with Cursor" and "Align End with Selection Start" have been merged into a single "Align End to Cursor / Selection Start".
Attachments
AlignTracksEndToEnd-4e.patch
(4.88 KiB) Downloaded 246 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Align tracks end to end

Post by waxcylinder » Mon May 20, 2013 10:09 am

Perhaps a further option to perform an automated Mix and Render so that the user ends up with a single track would be useful too?

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Align tracks end to end

Post by steve » Mon May 20, 2013 10:35 am

waxcylinder wrote:Perhaps a further option to perform an automated Mix and Render so that the user ends up with a single track would be useful too?
As the sounds will not be overlapping, it would be much faster (and lossless) to "move" the tracks into one track (and delete the empty tracks) rather than "mixing" to create one track. Also, "moving" the clips would maintain the splits between tracks, which would probably be useful.

Any idea how we could work that into the interface?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Align tracks end to end

Post by waxcylinder » Mon Jul 01, 2013 9:31 am

@Steve: ami I right in thinking (from past posts on devel/quality) that you are dealing with this? Can I therefore archive this thread?

Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Align tracks end to end

Post by steve » Mon Jul 01, 2013 9:56 am

waxcylinder wrote:@Steve: ami I right in thinking (from past posts on devel/quality) that you are dealing with this?
I have submitted my code.
Can we keep this here as a reminder for now just so that it doesn't get completely forgotten about?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked