Synchronize two audio files in Logic?

Discussion in 'Digital Audio' started by sahnert, Mar 27, 2010.

  1. sahnert macrumors 6502

    Oct 20, 2003
    I recorded an hour-long concert on two different devices: my MacBook Pro using Logic Express 8, and a Zoom H2.

    I would like to combine the two recordings in logic and mix them together.

    If I line up the downbeat of the first tune, everything sounds great - for a while. Eventually the two audio files drift out of sync with one another, and by halfway through the recording, the results are un-listenable.

    I recorded both files as 44.1kHz 16-bit WAV files, so theoretically they *should* line up, right?

    Anyhow, is there a way in Logic to adjust one file or the other to correct this problem? It seems like I should be able to select a point at the beginning where they line up, and another at the end where they should line up, and have them automatically adjust.

    Thanks for any insights you can give on this problem.
  2. Luap macrumors 65816


    Jul 5, 2004
    Not all digital clocks are created equal, hence the drift.
    Also, what you are trying to do is a recipe for massive phase problems, for much the same reason.

    Still, an hour long concert presumably isn't one long single song. And if you tried to sync the entire gig, rather than segmenting each recording down to each song, then im not surprised it sounds awful. So if you didn't try it already, do it on a per song basis. It should sound a lot better, but it would be tricky to do perfectly with no weird artefacts.
    You may find the tone of the track sounds quite different from start to finish, due to the phase issues that gradually develop over time.
    It would be more work, but you could also edit each song every few bars to get it all locked down better. You would only need to do that to 1 of the stereo files to keep it better synced to the other.

    I guess it should also be possible to simply speed up the slower file (or slow down the faster one?!), but you'd need to calculate very precisely how to do it, and by how much. Otherwise it is only going to make things worse if you miss the mark.
    Work out what time percentage one of the files it out by, then counteract it with the appropriate percentage of pitch/speed/tempo change. It would be fractions of a percent, and the pitch change so very slight as to be inaudible in itself.. I've never tried this!? But it is perfectly doable, in theory, and if my maths was up to scratch :p
  3. lord patton macrumors 65816

    lord patton

    Jun 6, 2005
    It's way easier than Luap is telling you. This is a computer—you don't have to do any math. :p

    Logic can take any audio region and stretch it to match any length—without changing the pitch—all within the arrange window.

    First, trim each audio file so that they start at the same transient. Likewise trim the end of them so that they end at exactly the same transient. Line up the initial transient. Select one of the regions. Press ctrl-' which will make the locators match the start and end of the selected region.

    Now select the second region. From the arrange window's local menu bar select "Audio" and then "Adjust Region Length to Locators".

    As Luap said, you may run into problems. Stretching audio will always corrupt it to some extent. This effect may be negligible if it's a very small percentage, but it might show up since you're mixing it with another (very) similar file.

    I'd imagine you'd also get comb filtering if they're not exactly lined up. You can "nudge" one the regions by minute amounts until your ear tells you it's optimized. You can also adjust the placement of the region right down to the tick via the events pane (found under lists) on the right side of the main window's menu bar.

    good luck!

    (btw, these directions are for Logic Express 8, but they're probably close or identical for you EDIT: especially since you're using Logic Express 8 <slaps forehead>)
  4. sahnert thread starter macrumors 6502

    Oct 20, 2003
    Thanks Luap and Patton for the help.

    I like the idea of working on a single track at a time. I assumed I would get everything the way I wanted it and then export each track separately, but I think it might be worth the time to do each one on its own if it works out.

    I am trying the Adjust Region trick on the whole concert, just to see how that works, and it looks like it's going to take a while to process all that material.

    In the end it might be best to use one recording or the other, but not both. I thought it was worth a try anyhow, and we'll see how it turns out!

    Thanks again for the help.
  5. Luap macrumors 65816


    Jul 5, 2004
    I didn't specifically mention time stretching for a couple of reasons.. Logic's time stretching, although flexible, isn't great in the quality department.
    Secondly, if one file is slower than the other, then it will also be lower in pitch. Although by itself, the pitch change would be so slight, as to be inaudible. I suspect all kinds of weirdness could happen when merging the 2 files together, due to those slight differences.
    So you'd kill 2 birds with one stone by simply changing pitch, and thus the length of the file with it. Or, a means to the same end, you could do it the other way around. Correct the time/length, and pitch will follow.
    So less likelihood of phase or comb filtering problems, and no time stretching artefacts either.
    Do this per song, and I think you could get a pretty passable result.

    In future, use a multitrack recorder of some description, and save yourself some work :D
  6. ChrisA macrumors G4

    Jan 5, 2006
    Redondo Beach, California
    Be warned that if one of the two clocks was so bad as to drift like this then also the drift may not be uniform. What you can see is that one clock ran ON AVERAGE faster. But there might be some local speed up and slow down. So you do not want to stretch a large length of audio. Do it in smaller sections.

    One reason for this problem is the clocks tend to be temperature sensitive, some clocks more than others so as a building's thermostat kicks in the clocks speed and go up and down and tack the temperature. Over an hour you can have several cycles of this. This effect is way down in the 10 pars per million range but it adds up. Places that care about this effect is a common clock that is distributed to all the devices using coax cables. If this is a series of 4 to 5 minute songs then just cutting it into sections that size can work

Share This Page