Problem dragging a clip between tracks

This section is now closed.
Forum rules
This forum is now closed.

For help with current Audacity, please post to the 2.x. board for your operating system.

Please post feedback about the current 2.x version on the 2.x.feedback board.
Locked
DickN
Posts: 445
Joined: Thu Jul 22, 2010 9:03 pm
Operating System: Windows Vista

Problem dragging a clip between tracks

Post by DickN » Wed Apr 20, 2011 6:54 am

I've finally started using this feature, or rather trying to, and thus far my success rate is under 50%. Still using Audacity 1.3.12 Beta. Here's the scenario:

I want to replace a chunk of a track with a copy of a nearby portion to remove a defect. "Editing a clip can move other clips" is Unchecked. I select the defective part and use Edit->Split New. Then I duplicate a nearby region with a similar waveform, long enough to overhang the edges of the new vacancy (I'll call it the patch). I select the piece (from Split New) that I'm going to discard so that the selection color shows exactly where the target is within the patch as I time-shift it. I keep the tool out of the selection area so only the clip moves. Next, I trim the patch using this same select range. I hit Ctrl-Shift-A to deselect everything, and try to drag the trimmed patch into the vacancy. It won't budge! Zooming reveals it's properly trimmed and aligned and would fit perfectly into the space, but I can't drag it in. This happens more than half the time, but the rest of the time I can drag it in. I've tried time-shifting the clip at the right of the vacancy to make even more room, but still can't drag the trimmed patch in. What am I doing wrong?

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

Re: Problem dragging a clip between tracks

Post by steve » Wed Apr 20, 2011 1:43 pm

Things can become a little unpredictable when it comes to fitting a peg into a hole with zero clearance.

The problem is that the digital audio is a series of discrete values (samples) - you can have 1000 samples or you can have 1001 samples, but you can't have 1000.6 samples but you can have a time duration that is equivalent to 1000.6 samples. Selections are time values (continuously variable), but the audio clips are samples (discrete values), so when calculating lengths and gaps Audacity needs to round the time values to the nearest sample value. Complicating the issue further, some calculations will not have exact answers (try calculating 22 divided by 7), so the calculations may also have small rounding errors. Usually this is not a problem, but in this case there is no room for error - you have allowed zero clearance, so if Audacity calculates that the gap is 10.0000000000000 seconds, but the audio that you're trying to drop in there is 10.0000000000001 seconds, then it won't fit (even though it looks like it should and even though the actual number of samples will fit).
DickN wrote:I've tried time-shifting the clip at the right of the vacancy to make even more room, but still can't drag the trimmed patch in.
Not sure why that's not working - it should, but I wouldn't this method for patching anyway as it can cause a "glitch" at the joins.
The way that I would patch the bad bit would be:

1) Leave "Editing a clip can move other clips" selected (checked) - this is really useful once you get used to it.
2) Delete the bad bit using "Split Delete" (Alt+Ctrl_K)
3) Duplicate a "patch" that is a little bigger than the deleted section.
4) Drag the patch so that it is directly under the "hole"
tracks001.png
tracks001.png (19.61 KiB) Viewed 1279 times
5) Trim the "hole" and the "patch" so there is just a little overlap
tracks003.png
tracks003.png (19.91 KiB) Viewed 1279 times
6) Use Fade-out / Fade-in so that as the original track fades out, the patch fades in.
7) Use Fade-in / Fade-out so that as the patch fades out, the second part of the original track fades in.

The patch and the original track may be left as separate tracks - they will be mixed together when you Export.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DickN
Posts: 445
Joined: Thu Jul 22, 2010 9:03 pm
Operating System: Windows Vista

Re: Problem dragging a clip between tracks

Post by DickN » Thu Apr 21, 2011 1:19 am

Guess I should have mentioned that what I'm fixing is clicks and other short-duration annoyances (yes, I did try Click Fix), and the holes I'm patching are only a ms or 2 - sometimes a fraction of a cycle. I do it by matching waveforms and if absolutely necessary, editing samples. Results are impeccable when the process works. My old method is to use Copy/Paste, which is what I still do when I can't drag the patch. I'll try it with "...can move other clips" ON next time - thanks for the explanation! I thought the basic time unit was the sample interval, which would mean all integer arithmetic except when converting to the selected display units.

So, what happens when I leave the patch in a separate track rather than inserting it? I know it works, since this is how I verify that it sounds right before the last step. But if the sample positions are computed from time which has roundoff error, don't the end points wind up in the wrong sample times? Coincident samples would get summed (potential spike there if it's a signal peak), but if there's a vacant sample position does the previous sample get replicated?

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

Re: Problem dragging a clip between tracks

Post by steve » Thu Apr 21, 2011 8:53 am

DickN wrote:Guess I should have mentioned that what I'm fixing is clicks and other short-duration annoyances (yes, I did try Click Fix), and the holes I'm patching are only a ms or 2 - sometimes a fraction of a cycle.
Have you tried the Repair effect? http://manual.audacityteam.org/man/Repair
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked