Part three, and a discussion of how the CMI samples a sound and why its own particular sampling techniques are employed. Jim Grant

At last we've covered enough of the CMI basics to concentrate on the more interesting sound creation Pages. Now, the single feature that characterises the Fairlight in many people's minds is its ability to sample natural sounds: this aspect is dealt with by Page 8, and is surprisingly simple to use.
At the rear of the CMI lies a selection of line and mic inputs to suit most applications. That about takes care of the hardware, because everything else is dealt with by software. Typing 'S' or touching 'Sample' with the lightpen initiates the sampling process. After a second or so, the Display box shows the sound envelope for quick monitoring of input levels (see Figure 1). If all is well with the Keyboard Maps on Page 3, the sampled sound will be playable on the music keyboard.

So far so good. But what are the other functions for? Well, some of them are self-explanatory. Sample Level is a software-based volume control and can be used to attenuate signals that exceed the input range of the Fairlight. Unwanted frequencies can be rejected by using digitally-controlled high-pass and low-pass filters: their cutoff points are set by Filter High and Filter Low. The actual circuitry lives on the ubiquitous Master Card, and takes the form of switched resistor networks using the much-loved CMOS 4051 chip.
Whenever a signal is converted to a stream of digital numbers, it's necessary to bandlimit it to one half, or less, of the Sample Rate. Stated simply, this means that we must have at least two sample values of the input signal's amplitude for the highest frequency present. If this condition is not met, the information that the sampling process has captured is not sufficient to reconstruct the original signal without frequency distortion. This type of distortion is known as 'aliasing' and is both extremely noticeable and rather unpleasant. The CMI guards against 'aliasing' by incorporating tracking filters controlled by the Sample Rate.

Sample Rate
Although sampling itself is very simple, and impressive results can be obtained very quickly, it's well worth the trouble spending some time adjusting the Sample Rate to a value that suits the pitch of the input signal. The sound as played on the keyboard will only be in tune if one cycle of the resulting sampled waveform fits exactly into one segment of waveform RAM. (Remember, one segment is 128 bytes.) This is achieved when the Sample Rate equals the frequency of the input signal multiplied by 128, ie. 128 samples per cycle. Since we can adjust the tuning of the voices on Page 3, an out-of-tune sample is not in itself a problem. However, there is one more important aspect of the CMI that obliges us to pay attention to the correct sample rate.
The number of original samples taken is fixed and equals the length of the waveform RAM, ie. 16384. The faster these samples are taken, the shorter the duration of the sound becomes (although the fidelity increases). This results in a short sound when the sample is played on the keyboard, and this becomes shorter as we ascend the octaves. To overcome this, the Fairlight allows sections of the waveform RAM to be read out repeatedly (or looped) as the key is held down, thus sustaining the sound. The smallest section of RAM than can be looped is known as a Segment.

Here lies the crux of choosing a suitable Sample Rate. If we attempt to loop a Segment or group of segments that doesn't contain a whole number of cycles, the 'ends' of the loop won't join up without causing a sudden jump in amplitude. Choosing an inappropriate sample rate results in a dreadful glitch which increases at a rate proportional to the pitch played on the keyboard. If the sample rate is almost right, a one-segment loop produces a sudden slight pitch shift, and waveform crests and troughs 'drift' laterally through a Page D display. This is shown in Figures 2 and 3, where a drift to the right (sharp) is caused by the sample being set too high and a drift to the left (flat) by it being too low.
Figure 4 shows a sound which is in tune with the system and therefore loops perfectly. At the other end of the scale, if the sample rate is totally wrong the display becomes a hopeless jumble (Figure 5). The relationship between a whole number of cycles and each segment of waveform RAM is also the relationship required for a visually coherent display. Thus samples that look good will inevitably sound good, too.

Now, if all this sounds rather complicated and you're beginning to wonder how anyone gets anywhere near choosing the correct sample rate, then take heart. It's all in the help pages for Page 8 - see Figure 6. A useful sample rate table is included, and with a little practice it becomes quite easy to arrive at the correct setting within the space of a few trial samples.
ADC
The actual analogue-to-digital conversion is accomplished by a 10-bit converter, even though the CMI is an eight-bit machine. Only the top eight bits of the sample values are stored, while the two LSBs (Least Significant Bits) are ignored. This improves the linearity of the conversion, which means that the signal step size required to cause a conversion value to change by one LSB is fairly constant over the range of the ADC.

The relationship between the amplitude of the input signal and the sample values generated is linear. When the signal level changes by a given amount irrespective of the absolute value the conversion code always changes by the same amount. This is where the Fairlight differs from most other sampling machines such as the Emulator. That uses a non-linear conversion method (called 'companding') which allows more codes to be generated for small signal values than for large ones. Whenever a signal is represented by a finite range of numbers - in this case 0-255 (eight bits) - two things suffer: noise and dynamic range. The noise is only heard when a sampled sound is actually being played through a DAC, ie. the ADC and DAC are not in themselves inherently noisy. Making sure that the peak of the input signal causes the maximum ADC code to be generated ensures that most of the noise is masked by the volume of the signal on playback.
The Display box in Figure 1 is an invaluable aid in this respect.
Dynamic range, on the other hand, is a measure of the range of different amplitude values that the ADC can handle. In a linear system, this is directly related to the number of bits used in the process and, roughly speaking, the dynamic range of the sampled signal is 6dB times the number of conversion bits. Since the Fairlight uses eight bits, this gives 8 x 6dB = 48dB dynamic range. Companding techniques result in a larger dynamic range (about 70dB) for the same number of bits used, but at the expense of greater noise at low signal amplitudes. The reasons for Fairlight's choice of a linear converter will become more apparent when we look at the functions on Page 6.
The actual sample rate is very cleverly generated on Channel card 1. Normally, the onboard circuitry is used to generate the correct clocking rates required for digital-to-analogue conversion when a keyboard note is pressed. However, for the duration of the sampling period the CPU grabs Channel 1, and forces it to produce a stream of pulses at a frequency of 128 times the sample rate shown on Page 8. This is supplied to the ADC, which resides on the Master card, and once the sampling process is finished the CPU restores Channel 1 to its original task.
Trigger Level is the amplitude threshold at which the sampling process is triggered to begin. When the Sample command is given, the system waits until this level is reached before proceeding. Once the threshold has been exceeded, it's possible to delay the conversion by using the Trigger Delay, which has a range of 0-65533 milliseconds. This can be especially useful when sampling from tape, for example, as a tone burst can be recorded shortly before the signal to be sampled and used instead of the signal itself to trigger the sampling process. Trigger Delay can then be used to define the precise point at which sampling will actually begin. This is extremely useful for sounds with a gentle attack such as slow strings.
Lastly, the Compressor is a software switch which controls a hardware option. Basically, this turns the conversion process into a nonlinear system, thus enhancing the dynamic range. The electronics use the same type of circuitry as that in many analogue companding systems. However, very few Fairlights are fitted with this option as it can have a strange effect on the commands on Page 6.
Well, that about wraps it up for Page 8. There isn't room this month for a discussion on Page 7, so we'll have to leave that for next month.