• No se han encontrado resultados

RUTA DE ATENCION INTEGRAL (RAI)

In document MANUAL DE CONVIVENCIA (página 36-47)

Gain control is used extensively in audio systems. Digital filtering and trans- form calculations rely heavily on it, as do the processes in a mixer. Gain

Figure 2.28 (a) Half adder; (b) full-adder circuit and truth table; (c) comparison of sign bits

prevents wraparound on adder overflow by substituting clipping level.

is controlled in the digital domain by multiplying each sample value by a coefficient. If that coefficient is less than one, attenuation will result; if it is greater than one, amplification can be obtained.

Multiplication in binary circuits is difficult. It can be performed by repeated adding, but this is too slow to be of any use. In fast multiplication, one of the

Figure 2.29 Two configurations which are common in processing. In (a) the feedback around the

adder adds the previous sum to each input to perform accumulation or digital integration. In (b) an inverter allows the difference between successive inputs to be computed. This is differentiation.

inputs will be simultaneously multiplied by one, two, four, etc., by hard-wired bit shifting. Figure 2.30 shows that the other input bits will determine which of these powers will be added to produce the final sum, and which will be neglected. If multiplying by five, the process is the same as multiplying by four, multiplying by one, and adding the two products. This is achieved by adding the input to itself shifted two places. As the wordlength of such a device increases, the complexity increases greatly, so this is a natural application for an integrated circuit.

Figure 2.30 Structure of fast multiplier. The input A is multiplied by 1, 2, 4, 8, etc. by bit

shifting. The digits of the B input then determine which multiples of A should be added together by enabling AND gates between the shifters and the adder. For long wordlengths, the number of gates required becomes enormous, and the device is best implemented in a chip.

2.16 Transforms

At its simplest a transform is a process which takes information in one domain and expresses it in another. Audio signals are in the time domain: their voltages (or sample values) change as a function of time. Such signals are often trans- formed to the frequency domain for the purposes of analysis or compression. In the frequency domain the signal has been converted to a spectrum; a table of the energy at different temporal or spatial frequencies. If the input is repeating, the spectrum will also be sampled, i.e. it will exist at discrete frequencies. In real program material, all frequencies are seldom present together and so those which are absent need not be transmitted and a coding gain is obtained. On reception an inverse transform or synthesis process converts back from the frequency domain to the time or space domains. To take a simple analogy, a frequency transform of piano music effectively works out what frequencies are present as a function of time; the transform works out which notes were played and so the information is not really any different from that contained in the original sheet music.

One frequently encountered way of entering the frequency domain from the time or spatial domains is the Fourier transform or its equivalent in sampled

a square wave has a sin x/x spectrum and a sin x/x impulse has a square spectrum. Figure 2.32 shows a number of transform pairs. Note the pulse pair. A time-domain pulse of infinitely short duration has a flat spectrum. Thus a flat waveform, i.e. a constant voltage, has only 0 Hz in its spectrum. Interestingly the transform of a Gaussian response in still Gaussian.

The Fourier transform specifies the amplitude and phase of the frequency components just once and such sine waves are endless. As a result the Fourier transform is only valid for periodic waveforms; i.e. those which repeat endlessly. Real program material is not like that and so it is necessary to break up the continuous time domain using windows. Figure 2.33(a) shows how a block of time is cut from the continuous input. By wrapping it into a ring it can be made to appear like a continuous periodic waveform for which a

Figure 2.31 Fourier analysis of a square wave into fundamental and harmonics. A, amplitude; υ,

phase of fundamental wave in degrees; 1, first harmonic (fundamental); 2, odd harmonics 3 15; 3, sum of harmonics 1 15; 4, ideal square wave.

Figure 2.32 The concept of transform pairs illustrates the duality of the frequency (including

spatial frequency) and time domains.

single transform, known as the short-time Fourier transform (STFT), can be computed. Note that in the Fourier transform of a periodic waveform the frequency bands have constant width. The inverse transform produces just such an endless waveform, but a window is taken from it and used as part of the output waveform. Rectangular windows are used in video compression, but are not generally adequate for audio because the discontinuities at the boundaries are audible. This can be overcome by shaping and overlapping the windows so that a crossfade occurs at the boundaries between them as in (b). As has been mentioned, the theory of transforms assumes endless periodic waveforms. If an infinite length of waveform is available, spectral analysis can be performed to infinite resolution but as the size of the window reduces, so too does the resolution of the frequency analysis. Intuitively it is clear that discrimination between two adjacent frequencies is easier if more cycles of both are available. In sampled systems, reducing the window size reduces the number of samples and so must reduce the number of discrete frequencies in the transform. Thus for good frequency resolution the window should be as large as possible. However, with large windows the time between updates of the spectrum is longer and so it is harder to locate events on the time axis. Figure 2.34(a) shows the effect of two window sizes in a conventional

Figure 2.33 In (a) a continuous audio signal can be cut into blocks which are wrapped to make

them appear periodic for the purposes of the Fourier transform. A better approach is to use overlapping windows to avoid discontinuities as in (b).

Figure 2.34 (a) In transforms greater certainty in the time domain leads to less certainty in

the frequency domain and vice versa. Some transform coders split the spectrum as in (b) and use different window lengths in the two bands. In the recently developed wavelet transform the window length is inversely proportional to the frequency, giving the advantageous time/frequency characteristic shown in (c).

STFT and illustrates the principle of uncertainty also known as the Heisenberg inequality.

According to the uncertainty theory one can trade off time resolution against frequency resolution. In most program material, the time resolution required falls with frequency whereas the time (or spatial) resolution required rises with frequency. Fourier-based compression systems using transforms sometimes split the signal into a number of frequency bands in which different window sizes are available as in Figure 2.34(b). Some have variable length windows which are selected according to the program material. The Sony ATRAC system of the MiniDisc (see Chapter 11) uses these principles. Stationary material such as steady tones are transformed with long windows whereas transients are transformed with short windows.

The recently developed wavelet transform is one in which the window length is inversely proportional to the frequency. This automatically gives the advantageous time/frequency resolution characteristic shown in (c). The wavelet transform is considered in more detail in Section 2.19.

Although compression uses transforms, the transform itself does not result in any data reduction, as there are usually as many coefficients as input samples. Paradoxically the transform increases the amount of data because the coef- ficient multiplications result in wordlength extension. Thus it is incorrect to refer to transform compression; instead the term transform-based compression should be used.

In document MANUAL DE CONVIVENCIA (página 36-47)

Documento similar