How can I add a 1.5ms time delay (not echo) to one channel?

Hello,

I would like to add a pure time delay (not an echo) of about 1.5 ms to the left channel of a mp3 file.

Actually I have a couple hundred mp3 files I would like to do this to, so ideally I would like to find a way to automate this process - or at least make it very quick and easy.

Is there a plugin that will perform this function (and work on only the left channel?) All the delay plugins I have found are for creating echo effects. I don’t want that.

I would also like to preserve the audio quality the best I can of course.

Any help is appreciated.

kk

I would also like to preserve the audio quality the best I can of course.

Then you might not want to use Audacity for this. Audacity doesn’t edit MP3. It converts an MP3 to its own very high quality internal format (the sound quality doesn’t get any better, sorry), but then makes a new one on export. With no other changes this can double the MP3 sound distortion.

Never do production in MP3.

But for the first part, I don’t know if we can automate that, but Import the MP3 and using the dropdown on the left (little black arrow) Split Stereo Track.

Use the Time Shift (not echo) Tool (two sideways black arrows) and push the left channel later the amount you need.

Then dropdown > Make Stereo Track.

File > Export. You can get around the sound distortion problem by exporting as an uncompressed WAV (or other uncompressed format), or you can stay in MP3 by picking a very high quality value like 250 or 320. Of course, the file size will go way up in all those options.

Koz

Also note, that even if you do export in a very high quality, the original MP3 damage is still waiting back there like a forgotten land mine. If you make an MP3 weeks down the road for posting on line, the distortion will go up again.

Never do production in MP3.

Koz

Then you might not want to use Audacity for this.

I don’t know of any tool that can do this without de-compressing and re-compressing the MP3 (assuming you want to keep the file in MP3 or other lossy format).

There are tools like mp3directcut that can do some simple direct-editing of MP3 files, but mp3direct cut doesn’t seem to allow you to choose only one channel to edit. And most MP3s are encoded as joint stereo, so you simply cannot separate the left & right channels without de-compressing.

Never do production in MP3.

I agree, but… sometimes we don’t have a choice, and you don’t always hear the quality loss.


P.S.
If you don’t need a portable or free solution you can use a [u]hardware effects processor[/u]. It might have some advantages (besides avoiding the 2nd lossy compression step)… You could adjust for different delays or eliminate the delay, or delay the opposite channel, etc., all on-the-fly. (I’m not sure that particular unit can do exactly what you want, it’s just the 1st one I found.)

You can do that with this “Echo” effect: https://forum.audacityteam.org/t/new-plug-in-stereo-echo/15997/1

Set the left and right delay times as you want them.
Set “Feedback” to 0%.
Set “Effect Mix” to 100%.

Installation instructions are here: http://wiki.audacityteam.org/wiki/Download_Nyquist_Plug-ins#Installing_Plug-ins

Thanks for all the help, folks.

I actually found a Nyquist plugin called Time Shifter that does what I want. Well, at least is makes it easier.

Problem is, I tried it on a couple of files, and found the result not to be quite right. I can’t put my finger on it, but it’s like the soundstage is still diffuse.

So I tried shifting the time manually via the drag method. Same result. The plugin works as expected, meaning I can see that the signal has been shifted by 1.5 ms, but I don’t get the clear center image I’m expecting.

My baseline approach was using Garageband. This is more tedious, which is why I turned to Audacity. However, the Garageband result sounds fantastic while the Audacity result does not. I have no idea why this is but I’m trying to figure it out.

I am using the same input file - an MP3 file, which I realize is far from ideal but this is just for experimentation purposes. (Once I get this all figured out delay-wise I will obtain uncompressed files for the source)

In Garageband, I use their built-in MP3 export.
In Audacity, I installed the LAME plugin to allow MP3 export.

In Garageband, the process of adding the 1.5ms delay is more tedious because Garageband does not allow you to manipulate only the left or right independently; so one must import the file, copy it to a second track, mute the left channel of one track and the right channel of the other track, drag the one track to the right by 1.5 ms, then export. The result is a very focused center image and very good staging.
In Audacity, I simply import, go to my Time Shifter plugin, type in my 1.5 ms delay, then export. The result should be the same, but the Audacity version has a very poor center image, and the staging is muddy and diffuse.

Not sure what else to try. :slight_smile:

What are you exporting it as? As a 16 bit WAV file?

The fact that you are using an MP3 file as the source material and/or using MP3 as the export format will introduce unpredictable variables. MP3 is an algorithm that allows encoding and restoring audio with a reasonable degree of accuracy, but it is not perfect and is not expected to be perfect. MP3 and other “lossy” formats are intended to make the file size smaller while still giving “good enough” accuracy.

To remove those variables completely, the test should be done using an uncompressed format (such as WAV) for both the input and export format.
If you don’t have a WAV format file that has the problem that you are trying to solve, try converting one of your MP3 files to WAV format, then process the WAV file in Garrageband and in Audacity and in each case export/save as a new WAV file. Ideally the WAV files should be 32 bit float format, but I don’t know if Garageband supports that.

Do you still see / hear a difference between Garageband and Audacity?

What is the problem we are trying to solve? How is it that you have hundreds of MP3 files in which you need to shift one channel by 1.5 ms?

Import the Garageband result into Audacity, Split Stereo to Mono using the left drop-down menu and listen to one at a time. Now do the same thing to the Audacity sound file. Do you still have two clear mono tracks?

What happens if you open the Audacity file in Garageband?

I would not expect delaying one side of a stereo performance like that to result in a clear center image.

However, since Garageband is not available on Windows (that I know of) are you listening to the Windows file through one of the Windows Playback “Enhancements” like “Theater” or Opera Concert Hall?" Check in the Windows Control Panels.

Which Windows are you using?

Koz

Steve and Koz,

I will try my experiments again in Garageband and Audacity using WAV files for importing. I’m not sure if Garageband can import and export WAV format - if not, would another uncompressed and/or lossless format work OK, like AIFF or Apple Lossless?

The reason I am doing this is because my listening environment isn’t symmetrical. The left side speakers are about 18" further from my listening position. Hardware solutions are obviously available (yet expensive) and I’m working on that in parallel. This software method started as an experiment, and I decided to take it further when I experienced the results with the Garageband method - the improvement was dramatic - I’m talking night and day. To my ears, the listening experience went from about a 5 to about a 8 on a scale of 1-10 once the delay was added. Imaging and Staging existed now, and did not before.

And you are correct; Garageband is not available on Windows. I am using a Mac. I have tried burning the files to DVD and playing them from the source, and I have also tried running a cable right from my mac to the receiver. The results are the same either way.

I’ll post back when I’ve done some more experimentation. This is fun! :slight_smile:

AIFF should be OK. That’s a supported lossless format for both programs. Apparently (I don’t use Garageband) Garageband can import WAV or AIFF files and can export AIFF (but not WAV directly).

An interesting experiment, but difficult to analyze what the results mean. If two people cook the same meal and you know that one person stirred the pan for longer and their meal tasted better, then that may suggest that stirring the pan for longer made the meal taste better, but not necessarily.

I’m well aware of the subjectivity of listening experiments. But with the tests I’ve done so far, the difference is quite easily noticeable and repeatable. I’ll post again once I repeat the experiments with some lossless/uncompressed files.

Cheers,
Ken

I don’t doubt it, but we need to take care to not jump to assumptions about why that is until we know exactly why the two are not identical.

Going slightly off at a tangent, I’ve seen a fascinating study in which people were played two versions of each audio sample in which the “only” difference was that one was a barely perceptible 1dB louder than the other. The listeners were asked to say which sounded better and why. The outcome was overwhelmingly that the +1dB version “sounded better”. The reasons given were broad ranging, including: more detailed, better definition, more dynamic, more open, better sound staging, greater clarity… but not one person said “louder”.

I look forward to your test results. :ugeek:

1 Like

I am using a Mac.

You posted in the Windows forum.
Koz

The outcome was overwhelmingly that the +1dB version “sounded better”.

The sound system that the store has on sale is always louder. Works every time.

I wonder if this isn’t a Garageband “enhancement.” If you take the Garageband show apart in Audacity, I bet you don’t get the original two sounds back.

You’re not compensating for the square-law distance volume droop. Just the delay. They both change.

Koz

Agreed, but I also have to consider how far I’m willing to take this investigation. At some point, my desire to spend time getting to the root cause of this may be trumped by my desire to just spend the extra time in Garageband to get a result that sounds good to my ears. :wink:

I’ve seen that too, and indeed it is fascinating.

Oops! Sorry.

In my experience the effect of the time delay and the effect of the balance knob are pretty easy to distinguish. I think I’m accounting for the volume droop well enough for my experiments.

Cheers,
Ken