From Rosetta Code
This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Capabilities characterize abstract requirements of tasks and abilities of languages and libraries.
Browse this capability's properties.

Some tasks require being able to make the computer make a noise of some kind, be it a bleep, a sound effect, play some music, etc.

The capabilities of a computer or game console depend on its sound hardware. Most computers have a dedicated "sound chip" that can recieve instructions. The sound chip is either controlled by the main CPU, or a coprocessor. In the case of a coprocessor, the main CPU needs to give commands to the coprocessor, which it can then read, send those commands to the sound chip, and report back to the main CPU. This allows music and sound effects to occur in parallel with the main program logic.


Sounds that are generated by the computer tend to be simple waveforms and are usually named for the shapes they make. Some examples include square wave, triangle wave, and sawtooth. Each has a characteristic sound. A sample, on the other hand, is a computer approximation of a real-life sound, which is created by taking multiple points on the sound wave and interpolating the values in between. This technique is commonly used in 16-bit hardware such as the Super Nintendo, MS-DOS, and Neo Geo.


DPCM stands for Delta Pulse Channel Modulation, which a computer or game console historically used to create sampled sounds. They took up much more disk space than a sound generated by the sound hardware, so were used sparingly. These days, their file size is trivially small.