# Manual: Glossary

amplitude

Amplitude defines a range of values, but can also be thought of as representing volume. In Minim, sample values range between -1 and 1. If a sample exceeds the value of 1 or drops below -1, you will hear clipping in the signal when it is played back. When talking about the amplitude of a signal that is being sythesized, like a sine wave, if you said a sine wave had an amplitude of 0.2, then that would mean its sample values would range between-0.2 and 0.2. When played back, this would sound less loud than a sine wave with an amplitude of 0.8, whose sample values would range between -0.8 and 0.8. It is important to distinguish amplitude from gain, which is a scaling value applied to a signal after it has been generated.

bit depth

Bit depth refers to how many bits are used to represent the value of each sample. Fewer bits means a smaller range of values, which translates to poorer quality audio. In practice, you shouldn’t need to worry about it as you will almost always be working with 16 bit audio.

clipping

In Minim, clipping occurs when the value of a sample exceeds the range of [-1, 1]. In less serious cases it can be heard as pops in the audio (though these can also be caused by discontinuities in the waveform) and in more serious cases results is gross sounding distortion.

RMS amplitude

RMS amplitude is a calculation that can be made on a sample buffer to describe its relative loudness. RMS stands for root-mean-squared and refers to the calculation that is performed: square all the samples, find the average (mean) of all the samples, and then take the square root of that average.

sample

In the computer, audio is stored as a series of numbers, these numbers can be used to reproduce the sound they represent by feeding them to a DAC (digital-to-analog converter). Each number is a sample, a measurement of the state of the analog signal at a discrete moment in time. In Minim, samples are represented as floating point values between -1 and 1.

sample buffer

A sample buffer is simply an array of contiguous samples from a signal. Its length is typically user defined and need not have any relation to the length of the full signal. Lengths that are a power of two are often used so that the buffers can be analyzed by an FFT.

sample frame

A sample frame is a chunk of data that represents one sample from every channel of an audio signal. Typically, audio files interleave the samples of the different channels. So if you are looking at a stereo file you would see that there is a sample for the left channel followed by a sample for the right channel. These two samples together represent one sample frame.

sample rate

When converting an analog (continuous) signal into a digital (discrete) signal, the analog signal must be measured at a steady rate. This is called sampling the signal. The sample rate is how often the signal is measured and is often expressed in Hertz (Hz), which is the same as times-per-second. CD quality audio has a sample rate of 44100 Hz, which means that it represents audio that was sampled 44100 times per second at regular intervals. One important consequence of choosing a sample rate is that it limits the maximum frequency that the digital signal can represent. This frequency is called the Nyquist frequency and is equal to half of the sample rate. So the highest frequency that audio recorded with a 44100 sample rate can represent is 22050 Hz.