Representing Sound
- Sound is a type of analog signal that is captured and converted into digital form to be processed by a computer.
- To convert sound into digital form, a process called sampling is used. This involves taking measurements of the sound wave at regular intervals and converting these measurements into binary data
- The quality of the digital sound depends on the sample rate, which is the number of samples taken per second. A higher sample rate results in a more accurate representation of the original sound wave, but also increases the file size of the digital sound
- E.g. A typical CD-quality digital sound has a sample rate of 44.1 kHz, which means that 44,100 samples are taken per second
- The sample resolution is another factor that affects the quality of the digital sound. This refers to the number of bits per sample, which determines the level of detail and accuracy of each sample
- A higher sample resolution results in a more accurate representation of the sound wave, but also increases the file size of the digital sound
- E.g. A CD-quality digital sound typically has a sample resolution of 16 bits, which means that each sample is represented by a 16-bit binary number
- It's important to choose the appropriate sample rate and resolution based on the specific requirements of the digital sound application. E.g. A high-quality music recording may require a higher sample rate and resolution than a voice recording for a podcast
- Two examples of sound files are:
- MIDI
- Musical Instrument Digital Interface (file)
- Stores a set of instructions (for how the sound should be played)
- It does not store the actual sounds
- Data in the file has been recorded using digital instruments
- Specifies the note to be played
- Specifies when each note plays and stops playing
- Specifies the duration of the note
- Specifies the volume of the note
- Specifies the tempo
- Specifies the type of instrument
- Individual notes can be edited
- MP3
- MP3 is a format for digital audio
- MP3 is an actual recording of the sound
- MP3 is a (lossy) compression format
- It is recorded using a microphone
- MIDI