Different methods for imposing the spectral envelope of one sound onto another.


This page details how to use Super VP to take the spectral envelope from one sound file and then apply it another. At present there are two methods for doing this.

Method 1.

Method one to carry this out is simply to use the cross synthesis method detailed in the help page for Super VP. This simply invloves using a single command line like the one below:

svp -v -t -T -U -Afft -aced 45 -Z -Gmul -S"soundfile to be filtered" -s"soundfile to extract spectrum from" "outfile"

This method has provided reasonable results when I have tested it on actual sound files but it has disadvantage of using a one stage process so that it is not possible to inspect the spectral envelope at any point. Figures 1 and 2 below show results obtained by using method 1. A sound file was created containg 40Hz harmonics of equal amplitude up to 20KHz and then a simple envelope was applied to create a second file. This file was used as 'soundfile to extract spectrum from'. The spectrum of this file can be seen in figure 1. The original file (partials of equal amplitude) was then used as the 'soundfile to be filtered'. The success of the operation can be judged by the similarity of the output of Super VP to the 'soundfile to extract envelope from'. The spectrum of 'outfile' can be seen in figure 2.

figure1

figure2

It can be seen that, although the first peak is well defined, the second is almost missed. So, although this method is simple, it is not ideal.


Method 2.

Method two uses two stages. One to produce the spectral envelope file of the first soundfile and then another to read this as input and apply it to the second soundfile. The two command lines for this are shown below:

svp -v -t -T -Aced 45 -U -Og1 -S"soundfile to extract spectrum from" "filter"

svp -v -t -T -Afft -U -S"soundfile to be filtered" -Z -Fgabarit "filter" "outfile"

The output 'filter' from the first line is used as the input for the second. This method allows inspection of the spectral envelope file and also seems to provide more accurate results. The output for the same two files described above can be seen below in figure 3.

figure3

Here we can see that, although not perfect, the second peak is far better detected. For this reason, method two is probably the better choice wether it is important to be able to inspect the spectral envelope or not.


Note that the file format used for the spectral envelope output is the Unified File Format. This stores each frame of the envelope as a header of three floating point values (time, type, number of samples) and then the samples themselves. Normally (FFT of 1024 samples) there will be 513 floating point values of data per frame.
Ivan Perry 28/10/99