General Instrument AY-3-8910 - Uses

Uses

Although the chip wasn't designed to handle raw PCM data (digital sound), the effect could be simulated. The chip used a simple OR based mixing function for combining noise and tone on its three channels and could be persuaded to produce a level non-zero wave. By altering the volume this level wave could be shaped into a waveform. Obviously, this involved more CPU usage than chips designed for this purpose (such as the MOS Technology 8364 "Paula" as used in the Commodore Amiga), but it was nevertheless a technique widely used on platforms such as the Atari ST and less frequently the Amstrad CPC to play sampled music, and on the ZX Spectrum 128 and MSX to play short audio samples, in some games.

Doing the same thing fewer times per second (in the order of a hundred per second) can replace the limited envelope functionality (any envelope you can think of), and last but not least works with each of the three channels individually. This takes negligible CPU power (provided there is some timer interrupt or vertical blank interrupt) and can be used in games.

In turn, the now useless envelope functionality can be set to very high frequency, actually generating a waveform that is not the usual squarewave. The granularity by which high frequencies can be set however is low, and so music composed for the chip generally uses this technique only for bass lines.

Another method was to set one channel output to idle high, then use the volume control as a simple logarithmic 4-bit Digital-to-Analog Converter. This however resulted in poor audio quality, because it only had 16 output levels and these were logarithmically spaced.

A more sophisticated method was to use all three channels wired together, and exploit the non-linearity of the mixing to produce many intermediate output levels. Having modeled the non-linearity of the three channels, developers had to find suitable values by exhaustive search. Having done so, they produced an 8-bit to 3×4-bit lookup table. This allowed 8-bit audio samples to be played fairly adequately, though not as well as a real 8-bit D/A converter. The problem of this technique is that the player cannot change the volume of the three channels as a single operation. This implies unwanted output levels between two successive samples.

In 2006 two MSX developers created an advanced encoder that converts a wave file to optimal PSG channel transitions using Viterbi search. They replayed a 44.1 kHz wave file on a 23 year old MSX with higher SNR than an 8-bit DAC. The Viterbi search is rather CPU intensive so even though it would have been theoretically possible to use this method already in the 80's, there were no computers powerful enough to perform the analysis required.

The AY chip has been used by a number of groups, such as the AY Riders (see external link below). Some of the works by such groups are in the style of computer game music from the era, while others are art music in their own right.

Some programs have been created specifically for writing AY chip music, such as Vortex Tracker.

Read more about this topic:  General Instrument AY-3-8910