4. Digital Representation of Sound Flashcards
Nyquist’s Theorem
The sample rate should be at a frequency which is at least twice the value of the highest frequency in the sampled signal.
So that it captures peaks and troughs of the sounds.
Analogue and Digital
Analogue - Data that varies in a continuous manner
Digital - Data that takes the form of discrete values
Sampling Rate
The number of samples taken per second measured in Hz or kHz
(44Hz = 44 samples/s | 44kHz = 44,000 samples/s)
a.k.a Sampling Frequency
Sampling Resolution
The number of bits assigned to each sample, the higher the sample resolution, the higher range of volumes can be produced and higher file size.
a.k.a Sample Size or Bit Depth
File Size (Equation)
Sample Rate x Sample Resolution x Time
Lossless Compression
Doesn’t lose any accuracy and can be decompressed into identical copy of the original audio data
e.g. FLAC files, Zip Files
Lossy Compression
Compression loses file accuracy, generally compresses the files more than Lossless hence reducing the file size but a more significant amount.
e.g. MP3
Explain briefly how sound is stored.
- The original sound wave is a continuous set of points
- ADC converts sound into digital data by sampling at regular intervals and discrete values are stored.
What happens when the sampling rate is too low or too high?
Too Low - The sound recorded will not be an accurate depiction of the original sound produced.
Too High - The file size will increase.
Run Length Encoding
Silent areas take up a large part of the file, they are abstracted by just stating how many there are in a row, massively reducing file size.
e.g.
00000032130000000001256
could be encoded to:
(6-0)3213(9-0)1256
Dictionary Based Compression
Works on the basis that, within text, there are common strings of characters. Instead of rewriting, they can be coded in some way.
e.g. ‘station’, ‘nation’, ‘creation’ all end in ‘tion’ it would be simpler to assign a token to ‘tion’ and the prefixed on other assemble words.
MIDI
-Musical Information Digital Interface
A way of representing sounds made by an instrument.
Information is stored about each musical note, such as volume, instrument, or length of note.
Why use MIDI?
It is very compact and flexible for many purposes. It is easy to transpose into a different key, play on different instruments and synthise musical notation from it.
ADC
Analogue to Digital Converter
Converts analogue sound into digital signals that can be stored on a computer.
DAC
Digital to Analogue Converter
Converts digital signals stored into analogue sound that can be played through output devices such as speakers.