15.01.2013 Views

U. Glaeser

U. Glaeser

U. Glaeser

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FIGURE 39.63<br />

series of frequencies at F,<br />

3F,<br />

5F,<br />

7F,<br />

…,<br />

(2n<br />

+ 1) F,<br />

where n goes to infinity. However, the first partial, 3F,<br />

is above the Nyquist frequency. Therefore, this must represent a sine wave. However, its peak magnitude<br />

is not 0.707, but is instead equal to 1.0, as shown in Fig. 39.63.<br />

The ultimate goal of sample rate conversion is to create a new time series at a new sample rate that<br />

correctly represents the true original signal. An ideal sample rate converter creates a time series that is<br />

indistinguishable from that derived by resampling the original signal. Because it requires an infinitelength<br />

time series, no real sample rate converter achieves this ideal; however, it is possible to come<br />

arbitrarily close, given enough computation.<br />

To create a new time series at a new sample rate, it is necessary to interpolate values between the input<br />

samples. To do this, the sample rate converter maintains an output phase that represents the time index<br />

of the output samples relative to the input samples. It maintains the phase by accumulating the pitch.<br />

To double the number of output samples, use a pitch of 0.5. On each output sample period, the sample<br />

rate converter adds the pitch to the phase accumulator. If the initial value for the phase accumulator is<br />

0.0, the resulting phase over time will be the following:<br />

© 2002 by CRC Press LLC<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

-0.2<br />

-0.4<br />

-0.6<br />

-0.8<br />

-1<br />

0 1 2 3 4 5 6 7<br />

True signal represented by simple time series.<br />

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5<br />

The integer portion of the phase accumulator is the address of the input sample(s) to convert, and<br />

the fractional portion is the interpolation factor that indicates how far between input samples to generate<br />

an output sample. In the previous example phase accumulator, the fraction alternates between 0.0 and<br />

0.5. The fraction of 0.5 indicates that the output sample should be halfway between two input samples.<br />

This definition is somewhat imprecise when using multi-point interpolation, but in a logical sense, it<br />

still applies.<br />

Usually, a hardware implementation of a sample rate converter uses a fixed-point representation for<br />

both the pitch and the phase accumulator. The fixed-point representation enables very simple extraction<br />

of both the integer and fractional portions, and minimizes the size of the adder used to maintain the<br />

phase accumulator. The number of integer bits in the phase accumulator limits the amount of memory<br />

addressable by the sample rate converter. Integer widths of at least 24-bit are common.<br />

The number of integer bits required for the pitch is much smaller than the number required for the<br />

phase accumulator. Upward pitch shifting, which is equivalent to conversion to a lower sample rate<br />

requires filtering to a lower cutoff frequency than downward pitch shifting. Often, much more distortion<br />

occurs when performing upward pitch shifting. The additional filtering and distortion of upward pitch<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!