UNIVERSAL SAMPLING RATE CONVERTER FOR DIGITAL AUDIO FREQUENCIES

Abstract: A method for conversion of input audio frequency data, at an input sample frequency, to output audio frequency data, at an output sample frequency. The input data is subjected to expansion to produce expanded data at an output sample frequency. The expanded data is interpolated to produce output data. In one embodiment of the invention the interpolation is effected by a process that also filters the output data. In another embodiment, the input data is sampled by an integer factor to produce expanded data, the expanded data is then interpolated to produce the output data. Also disclosed is a method of transition of a signal output, at one frequency, to a signal output at another frequency. The signal output at said one frequency is faded out over a period, and the signal output at said other frequency is faded in over that period. Both signal outputs are combined to produce the signal output over said period. Apparatus for effecting the methods is also disclosed.

Description: UNIVERSAL SAMPLING RATE CONVERTER FOR DIGITAL AUDIO FREQUENCIES FIELD OF THE INVENTION This invention relates to methods and apparatus for conversion of input audio frequencies to output audio frequencies, by expanding input data and interpolating the expanded data to form the output data at a new frequency. BACKGROUND OF THE INVENTION Digital Audio is based on many different means of communication, as described in the following reference. The different digital media generally have conflicting sampling frequencies. For example, digital transmission of broadcasting program at 32 kHz, compact discs at 44.1 kHz, digital video discs at 48 kHz and speech recording at 6 kHz to 8 kHz, as described in "High Quality Digital Audio in the Entertainment Industry", IEEE ASSP Magazine, 1985 pages 2-25. Thus, digital audio requires a sampling frequency conversion technique to handle simple as well as non-trivial ratios efficiently. Conversion by going from digital to analogue (through a DAC and a low-pass filter) and then re-sampling the smoothed signal at the output rate is simple, but costly and limited by the imperfections (non-linearity, phase response, noise) of the analogue filter as described in "High Quality Analogue Filters for Digital Audio", 67 th AES Convention, November 1980. Conversion in simple integer or rational ratios f/f 0 by single or multi-stage FIR filter design, as described in Rabiner and Croichiere, Multi-rate Digital Signal Processing, Prentice Hall Publication, 1983. However, it is not particularly suited for many arbitrary ratios, as it leads to far too many filter configurations. An individual filter configuration is suited maximally to a subset of these ratios only. SUMMARY OF THE INVENTION According to the processes of the invention there is provided a method for conversion of input audio frequency data, at an input sample frequency, to output audio frequency data, at an output sample frequency. The method including the steps of subjecting the input data to expansion- to produce expanded data at an output data sample frequency; and interpolating the expanded data to produce the output data, wherein the interpolation process also filters the output data. According to the processes of the invention there is also provided a method for conversion of digital input audio frequency data, at an input sample frequency, to digital output audio frequency data, at an output sample frequency. The method including upsampling the input data by an integer factor, so as to increase the sampling rate of the input data to produce expanded data; and interpolating the expanded data to produce the output data. The invention includes the method of transition of a signal output at one frequency to signal output at another frequency. In this method the signal output at said one frequency is faded out over a period, and the signal output at said another frequency is faded in over that period, and both are combined to produce the signal output over said period. In accordance with the invention an apparatus for implementing transition of a signal output thereof from a condition at which the signal output is derived from a first input signal, of a first frequency, applied on a first input to the apparatus, to a condition at which the signal output is derived from a second input signal, of a second frequency, applied to a second input of apparatus, the apparatus having means for fading out the first input signal over a period and fading in the second input signal over said period, and means for combining these over said period and applying the so combined input signals to said signal output. According to the invention there is provided a digital sequential frequency converter for conversion of input audio frequency data, at an input sample frequency, to output audio frequency data, at an output sample frequency. Included in the apparatus is the means for subjecting the input data to expansion to produce expanded data at an output data sample frequency; and the means for interpolating the expanded data to produce the output data, by an interpolation process which also filters the output data. According to the invention there is also provided a digital sequential frequency converter for conversion of digital input audio frequency data, at an input sample frequency, to digital output audio frequency data at an output sample frequency. Included in the apparatus is the means for upsampling the input data by an integer factor, so as to increase sampling rate of the input data to produce expanded data; and the means for interpolating the expanded data to produce output data. A single simple structure is often desired in Audio applications, for conversion between commonly occurring frequencies. The advantage of using a single structure is that for conversion between different frequency combinations, the same block code and same coefficients can be used. This reduces the program code size. A single simple structure also means it can be implemented efficiently as a hardware block, without excessive chip area. A single and simple embodiment of the invention may be implemented on a two-stage design for sampling rate conversion for a group of audio frequencies. Embodiments of the invention may be implemented in this way. Generally, the sampling and reconstruction of data may be effected in accordance with a suitable reconstruction formula. Thus, Let x[n] be sample of band-limited signal x(f), with sampling frequency of Fs. Then samples x' [m] corresponding to sampling frequency F' can be computed using the reconstruction formula: x / [m] = [n-r-fc]φjfc(Δr) where j ( \ _ <»- T * sin[ω c (r-fcr,)j ΨHO — ~1T (ϋ c O-kT ) and ω 0 = min (πF s , πF'). Then n = INT [mT'/TJ and Δt = mT' - nTs. A two-stage embodiment may also be employed. In the first stage an upscaling by a factor of 16 may be effected, by means of zero insertion (fifteen zeros for every one sample) followed by filtering with a filter cut-off frequency of π/16. The zero insertion and the filtering may be performed in practice through polyphase method that considerably decreases the computation complexity. The second stage may be a linear or sine interpolator. In simple cases, linear interpolation may be used. In that linear interpolation is used a further reduction in the computation can be achieved by ignoring those polyphase outputs which do not contribute to the actual output. In the case where fixed buffer constraint exists and slight variation occurs in input and output sampling clocks, method of cross fading may be used to smoothen the output. DETAILED DESCRIPTION OF THE DRAWINGS The invention is further described by way of example only with reference to the accompanying drawings, in which: Figure 1 is a block diagram of a digital frequency converter of a general kind described as prior art; Figure 2 is a block diagram of a digital frequency converter construction in accordance with the invention; Figure 3 is a block diagram of a digital frequency converter construction in accordance with the invention; Figure 4 is a block diagram of a digital frequency converter construction in accordance with the invention; Figure 5 is a flow diagram depicting sine and linear interpolation techniques which may be effected in the figure 3; Figure 6 is a diagram depicting processing steps occurring in the use of the digital frequency converter of figure 3; and Figure 7 is a diagram illustrating a cross-fading technique, in accordance with the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Figure 1 shows an audio frequency converter 10 according to the prior art. This employs a digital expansion stage 12, where the sampling frequency is increased to a significantly high integral value, such as a suitable power of 2, followed by an analogue interpolation stage 14 where sample values, at points corresponding to output sampling frequency, are computed. Consider a uniformly sampled version x[n] of the band-limited analogue signal x(t). If the sampling frequency is f s (Time Period T s ), then x[n] = x^T j ). Moreover, if x(t) was band- limited to f. /2 , then perfect reconstruction can be obtained by applying the inteφolation function (sampling theorem) x(t) = ∑ x[k]φk(t) where (1) k = -∞ ω c = πf s Since the summation limit is from -∞ to ∞ it cannot be practically implemented. If non- uniform sampling or finite length is considered (about the point of reconstruction) other types of interpolation functions such as spline, Lagrange interpolator (3) may be used. N 2 AD Mi F=-Nι κ ' (3) The advantage of Lagrange interpolator (3) is that it is a polynomial fit constructed in such a way that each sample is represented by a function which has zero values at all other sampling points. Evaluating x(t) for all possible values is physically impossible, however there is no reason to do so. What is required is to evaluate x(t) at points t = mT', corresponding to re- sampling with new sampling frequency f = 1/T\ Then n = INT [ mT' TJ and Λ t = mT' - nT s . And therefore, x(mT') = x(nT s + Δt) where 0 < Δt < T (4) When converting from a higher to a lower frequency by this method, the output of digital interpolation stage 12 is filtered to band-limit the signal content to f/2. The filtering process removes the effect of aliasing, frequency fold-over due to undersampling. In converters constructed by figure 1, and operating as above mentioned, if the interpolator 14 is a Lagrange, spline or linear interpolator, pre-fϊltering of the extended input data generally needs to be effected. Converter 20, shown in figure 2 and constructed in accordance with the principles of this invention, depicts a digital expansion stage 22 followed by sine interpolation 24. By this experience it is possible to avoid said pre-filtering, such as is necessary when using these Lagrange, spline and linear interpolators. Constraining ω c to the minimum of (%P , πF') and limiting the integral of the reconstruction formula, equation 5, to [-FJ2,FJ2], sine inteφolation may effectively inteφolate and filter the expanded data in a single step. In the case where the input data frequency is less than the output data frequency, the following limit on the integral would apply [-F 72,F 72]. C (ή = l/F. Figure 3 illustrates yet another two converters in accordance with the invention. The invention has a first stage 32 where the sampling rate of the input digital data is increased digitally by an integer factor L, giving the output y[n] at sampling rate LF S . The second stage 34 comprises a simple linear inteφolator, which inteφolates the denser expanded samples at frequency LF S 38 to generate output at required frequency F ' 36. Upsampling reduces the inteφolation error considerably. Upsampling by a factor of 16 followed by linear inteφolation leads to SNR of- 60 dB. for conversion ratio F VF S = 4. Converter 30 is simplified by using the same inteφolation factor, 16, for all conversion ratios. In effect, the said common inteφolation factor enables the same filter coefficients to be used for all ratios. A polyphase filter implements the upsampling stage. Figure 5 illustrates this. Figure 4 illustrates another converter substantially in accordance with converter 30 and in accordance with the invention. The invention has a first stage 42 where the sampling rate of the input digital data is increased digitally by an integer factor L, giving the output y[n] at sampling rate LF S . The second stage 44 comprises a sine inteφolator, which inteφolates the expanded samples at frequency LF S 48 to generate output at required frequency F ' 46. Upsampling reduces the inteφolation error considerably. Converter 40 is simplified by using the same inteφolation factor, 16, for all conversion ratios. In effect, the said common inteφolation factor enables the same filter coefficients to be used for all ratios. A polyphase filter implements the upsampling stage. For simple operations converter 30, would be effected in preference to converter 40. Figure 5 illustrates processes effected in the converters 30 and 40. Upsampling, in the embodiments of figures 3, 4 and 5, is generally performed by inserting I-l zeros between every two consecutive samples and then filtering the expanded result. If the converter is constructed in accordance with figure 3, then filtering is performed in a single step as a part of the inteφolation process. Insertion of I-l zeros means that Y'(z) = X(z τ ), where y'[n] is the sequence generated by inserting I-l zeros in x[n]. In the frequency domain Y^e 1 ™) - X(e jwI ), which essentially means that the spectrum of x[n] has been compressed I times. Since X(e jwI ) is periodic in 2π this leads to creation of extra images in the spectrum. In the case of an embodiment constructed in accordance with figure 4, these images need to be removed by a filter with band-limit ω c = π/I. Computational efficiency is obtained in the filter structure above by reducing the large FIR filter (h[n]) of length M into a set of smaller filters of length K = M/I, where is I is the inteφolation factor. Since the upsampling process inserts I-l zeros between successive values of x[n], only K out of M input values stored in the FIR filter at any time are non-zero. This observation leads to the well-known polyphase filters p k (n) = h( k + nl) k = 0,1, ..., I-l. n = 0, 1, ..., K-1 The set of I polyphase filers can be arranged as a parallel realisation 62, as shown in figure 6, where the output of each filter 64 can be selected by a commutator 66. In the case of linear inteφolation, two adjacent polyphase filter outputs are required at each time. Further reduction in computation is achieved by noting that in the case of linear inteφolation, not all polyphase filter outputs are used in generating the samples at the output. In a specific example of converter 30, the process of figure 6, rate conversion from 16 kHz. to 44.1 kHz. The input to the system are samples x[n] at 16 kHz. After upsampling by 16 samples y[n] are produced at frequency 16x16 kHz. = 256 kHz. The output {z[0], z[l], z[2], ..} at 441.1 kHz. are inteφolations of samples pairs { (y[0],y[l]) , (y[5],y[6J) , (y[ll],y[12]), ...} corresponding to the ratio 256/44.1 = 5.8049. Since only specific points are required others need not be computed. In the polyphase approach, above described, each polyphase filter 62 generates an output 64 and the commutator 66 moves to the next polyphase. At the end of a cycle the commutator returns to the first filter. Since only specific polyphase outputs are required computation can be reduced by skipping those polyphase filters whose output are not required for that period of time. Unless the conversion ratio is an integer no polyphase filter can be absolutely avoided. The above described example, achieves a computation gain of about four is achieved. Internal clock inconsistencies may be a problem in digital frequency conversion. Consider the example of conversion from 32 kHz. to 44.1 kHz. Real-time systems work on limited buffer space and on blocks of data. Suppose the constraint on the system is that it always operates on N output samples. Each time N samples are transmitted at the output the system receives an interrupt for DMA (Direct Memory Access) and all the samples collected at input since the last DMA is copied to internal buffer. Similarly N samples must be ready to be transferred to the output buffer. Now, the input and output clocks are free running so there is no guarantee that the ratio between the time periods of the two clocks will be exactly as computed. As a result it may happen that either the number of samples obtained from input is too few to produce N samples at output or they produce more than N samples. If F s is the input sampling frequency and F' is the required output sampling frequency, each time N samples are transmitted at output, [N*F S /F'] samples should accumulate at the input. A small deviation may occur, but on average the above relation must hold. In a case where the deviation is appreciable, samples may have to be dropped. This case arises when the input rate is higher than the output rate. As a result of being dropped samples may have to be repeated. In accordance with another aspect of the invention, when the input data frequency is higher than the output data frequency, more samples are produced at the output, than the buffer 68 can hold. Overwriting the older samples in the buffer produces a discontinuity. In the cross fading scheme of figure 7, the output data frequency 72 is less than the input data frequency 71. To enable a smooth transition, the input data frequency is faded in over time as indicated by 73 and the output data frequency is faded out over time by 74. The result is the smooth transition 75.

Claims: THE CLAIMS DEFINING THE INVENTION ARE AS FOLLOWS: 1. A method for conversion of input audio frequency data, at an input sample frequency, to output audio frequency data, at an output sample frequency, including the steps of: (a) subj ecting the input data to expansion to produce expanded data at an output data sample frequency; and (b) inteφolating the expanded data to produce the output data, wherein the step of inteφolating also filters the output data. 2. A method as claimed in claim 1, where the step of inteφolating includes sine inteφolation substantially in accordance with a reconstruction formula in which an intergral has finite limits with respect to frequency to effect filtering during said sine inteφolation. 3. A method as claimed in claim 2, wherein said sine inteφolation has the constraint that a cut off frequency, ω c , is equal to pi multiplied by either the input sample frequency, F s , or the output sample frequency, F', which ever is lesser, and the reconstruction formula is substantially in accordance with: 4. A method as claimed in claim 2, wherein said sine inteφolation has the constraint that the cut off frequency, ω c , is equal to pi multiplied by either the input sample frequency, F s , or the output sample frequency, F', which ever is lesser, and the reconstruction formula is substantially in accordance with: 5. A method for conversion of digital input audio frequency data, at an input sample frequency, to digital output audio frequency data, at an output sample frequency, including: (a) upsampling the input data by an integer factor, so as to increase the sampling 5 rate of the input data to produce expanded data; and (b) inteφolating the expanded data to produce the output data. 6. A method as claimed in claim 5, where the inteφolating is linear inteφolation. 10 7. A method as claimed in claim 6, wherein samples for said linear inteφolation substantially comprise the denser samples of said expanded data, and at least partially exclude the less dense samples of said expanded data. 8. A method as claimed in claim 7, wherein said upsampling includes polyphase filters 15 for filtering, producing said expanded data. 9. A method as claimed in claim 8, wherein said polyphase filters are arranged in parallel and said upsampling includes a commutator for selecting the outputs of the filters. 20 10. A method as claimed in claim 9, wherein the commutator at any one time selects only two outputs from the polyphase filters. 11. A method as claimed in claim 5, where the inteφolating is sine inteφolation. 25 12. A method of transition of a signal output at one frequency to signal output at another frequency, wherein the signal output at said one frequency is faded out over a period, and the signal output at said another frequency is faded in over that period, and both are combined to produce the signal output over said period. 13. Apparatus for implementing transition of a signal output thereof from a condition at which the signal output is derived from a first input signal, of a first frequency, applied on a first input to the apparatus, to a condition at which the signal output is derived from a second input signal, of a second frequency, applied to a second input of apparatus, the apparatus having means for fading out the first input signal over a period and fading in the second input signal over said period, and means for combining these over said period and applying the so combined input signals to said signal output. 14. A digital sequential frequency converter for conversion of input audio frequency data, at an input sample frequency, to output audio frequency data, at an output sample frequency, including: (a) means for subjecting the input data to expansion to produce expanded data at an output data sample frequency; and (b) means for inteφolating the expanded data to produce the output data, by an inteφolation process which also filters the output data. 15. A digital sequential frequency converter as claimed in claim 14, where the inteφolating is a sine inteφolation substantially in accordance with a reconstruction formula in which an integral has finite limits, with respect to frequency, to effect filtering during said sine inteφolation. 16. A digital sequential frequency converter as claimed in claim 15, wherein said sine inteφolation has the constraint that the cut off frequency, ω c , is equal to pi multiplied by either the input sample frequency, F s , or the output sample frequency, F', which ever is lesser, and the reconstruction formula is substantially in accordance with: 17. A digital sequential frequency converter as claimed in claim 15, wherein said sine inteφolation has the constraint that the cut off frequency, ω c , is equal to pi multiplied by either the input sample frequency, F s , or the output sample frequency, F', which ever is lesser, and the reconstruction formula is substantially in accordance with: 5 Xc(t) = x[k]e -βitFklF, JMffl 10 18. A digital sequential frequency converter for conversion of digital input audio frequency data, at an input sample frequency, to digital output audio frequency data at an output sample frequency including: (a) means for upsampling the input data by an integer factor, so as to increase sampling rate of the input data to produce expanded data; and 15 (b) means for inteφolating the expanded data to produce output data. 19. A digital sequential frequency converter as claimed in claim 18, where the inteφolating is linear inteφolation. 20 20. A digital sequential frequency converter as claimed in claim 19, wherein samples for said linear inteφolation substantially comprise the denser samples of said expanded data, and at least partially exclude less dense samples of expanded data. 21. A digital sequential frequency converter as claimed in any one of claims 18 to 20, 25 wherein said upsampling includes polyphase filters for filtering, producing said expanded data. 22. A digital sequential frequency converter as claimed in claim 21, wherein said polyphase filters are in parallel and said upsampling includes a commutator for selecting the 30 outputs of the filters. 23. A digital sequential frequency converter as claimed in claim 22, wherein the commutator at any one time selects only two outputs from the polyphase filters. 24. A digital sequential frequency converter as claimed in claim 18, where the inteφolating is sine inteφolation.

Inventors: ABSAR MOHAMMED JAVED, ALVAREZ-TINOCO ANTONIO MARIO, GEORGE SAPNA, ABSAR, MOHAMMED, JAVED, ALVAREZ-TINOCO, ANTONIO, MARIO, GEORGE, SAPNA
Applicants: ABSAR MOHAMMED JAVED, ALVAREZ TINOCO ANTONIO MARIO, GEORGE SAPNA, ST MICROELECTRONICS ASIA, ABSAR, MOHAMMED, JAVED, ALVAREZ-TINOCO, ANTONIO, MARIO, GEORGE, SAPNA, STMICROELECTRONICS ASIA PACIFIC PTE LTD
Application year: 2000
Main classification: H03H17
IPC codes: H03H17