Sound basics
From a physical point of view, sound is a wave of air density changing, which propagates in the space from the sound source to our ears. In computers and other digital devices, a sound is represented as an array of numbers which describe the sound wave amplitude at discrete moments in time. These numbers are called digital audio samples.
Tip
Digital sound representation using audio samples is called Pulse Code Modulation (PCM). It is a historical term, meaning that we code the amplitudes using digital numbers.
An array of audio samples with additional information such as its discretization time step and number of channels (mono, stereo, and so on) is called a sound sample. Sound samples can be used as the elementary bricks for construction of sound and music. The most notable example is hip-hop music, which is based on samples. Many computer games also use samples for sounding player actions.
openFrameworks has good capabilities for playing samples. So using samples is a simple...