Wavm – Utility for Merging Two wav Files


- 06/11/05 first release of project. Still experimental. Merge function not complete, only the initial synchronization of the waveforms and the difference as a function of time are compute – Files are made available, but not much to download at this point. This is useful for investigating the merge process.


The goal of this project is to be able to merge two digitized analog recordings in order to increase the quality of the original signal. This is not straigh forward and there are some challenges to meet like:

Besides merging (averaging) two similar wav files applications could include:

This project (wavm), like related projects by this author:wava and wavb , is a simple stand alone utility which can be compiled for both Linux and win environments.


Waveform B is the original CD wav file, waveform A is digitized from a Sony CAR Discman. Note the initial dip in the CD output versus the original signal.

Illustration 1View the First 5 Seconds

In the illustration below, one waveform is the original wav file extracted from a CD using EAC, and the other is the digitized output from a CD player and no attempt was made to adjust the amplitude. This could be done is software.

Illustration 2View the Waveforms Initial Match

In the case below, one waveform is the original wav file extracted from a CD using EAC, and the other is the digitized output from a CD player. 30 seconds into the recording, there is a noticable time difference.

Illustration 3View the Waveform Match at Another Point

Below, two recordings made from the same CD player show a gradual drift in increasing error. (CD player or Abit A/D conversion : which is the cause?).

Illustration 4Two 'Identical' Recordings Made From Same CD Player

Work to be done at this stage includes:

Current Limitations:

  1. restricted to 44.1ksample/second stereo wav files with just one DATA section.

  2. Only the left channel is processed .

  3. NOT designed for comparing MP3 files to wav files.

  4. Filtering and mp3 to wav conversions can introduce phase shifts which may cause this application to not work correctly. This application works in the time domain while most audio functions are concerned mainly with the frequency domain. If a wav file created from an mp3 fails to match the original wav file, this does not mean that the mp3 is poor quality, just that the audio processing changed the waveshape, but the changes may not be perceptable to most people.