SLR 13 - coding sound and music Flashcards
How does digital to analogue conversion work?
- you use a digital to analogue converter
the device reads a bit pattern representing an analogue signal - it outputs an alternating, analogue electrical current
What’s the difference between analogue and digital data?
analogue is continuous (smooth curves) whereas whereas digital is discrete (sharp edges and vertical drops)
What can analogue sound waves do?
can take ay values and can change as frequently as required
What can digital sound waves do?
must always take one of a specified range of values and can only change value at specified intervals
How does analogue to digital conversion work?
- sensors (temp sensors and microphone) output an analogue signal
- Computers use ADCs convert them
- the device samples the analogue signal at regular intervals
What is frequency?
- given in Hertz
- it determines the number samples taken per second
What does a larger number of frequencies mean?
Better reproduction of an analogue signal
How do computers represent sound?
as a sequence of samples, each taking a discrete digital value
What is sampling rate and what is it measured in?
the number of samples per second (hertz)
What is sample resolution?
the number of bits allocated to each sample
A higher sample resolution means…
greater audio quality and increased file size
What is Nyquist’s theorem?
the sampling rate of a digital audio file must be at least twice the frequency of the sound so that the sound may be accurately represented
What does MIDI stand for?
Musical Instrument Digital Interface
What is MIDI used with?
electronic musical instruments which can be connected to computers
What does MIDI store instead of sound samples?
a series of event messages, each representing an event in a piece of music
What information could event messages contain?
- the duration of a note
- the instrument with which the note is played
- the volume of the note
- if a note should be sustained
Ads of MIDI?
- allows for easy manipulation of music without a loss of quality
- the duration of notes can be changed and they can be transposed
- MIDI have smaller file sizes and lossless (no info lost)
Disads of MIDI?
MIDI can’t be used for storing speech and sometimes results in a less realistic sound
What are the two types of compression?
lossy and lossless
What is lossy compression?
some information is lost to reduce the file size
could be by reducing the resolution or lowering sample resolution in an audio file
What is lossless compression?
there is no loss of information when using lossless compression
reduces file size without reducing quality
What are two types of lossless compression?
- run length encoding
- dictionary-based methods
What is RLE (run length encoding)
reduces the size of the file by removing repeated information and replacing it with one occurrence of the repeated info followed by the number of times it is to be repeated
What is dictionary based lossless compression?
a dictionary containing repeated data is appended to a file
How does dictionary based lossless compression effect file size?
- should result in a significant reduction to file size
- but the dictionary used to compress the data has to be present in the file, which will increase the file size
What is encryption?
the process of scrambling data so that it cannot be understood if intercepted to keep it secure during transmission
What is unencrypted information known as ?
plaintext
What is encrypted information known as ?
ciphertext
What is a cipher?
A type of encryption method
How would you decrypt ciphertext?
- the encryption method
- the key
How do Caesar ciphers encrypt information?
- by replacing characters
- one character is always replaced by the same character
What are the two types of cipher?
- shift cipher
- substitution cipher
How do shift ciphers work?
All the letters in the alphabet are shifted by the same amount
How do substitution ciphers work?
the letters are randomly replaced
Cons of a Caesar cipher:
- Caesar ciphers are easily cracked
- once you discover one character the shift cipher can be completely cracked and a key found
What is a vernam cipher?
An example of a one-time pad cipher - each key should only ever be used once
What are two requirements of the Vernam Cipher?
- random
-at least as long as the plaintext that is to be encrypted
How does a Vernam cipher work?
- aligning the characters o the plaintext and then the key
2.Converting each character to binary (using an information coding system) - Apply a logical OR when
Converting the rest back to a character
When do Vernam ciphers offer perfect security?
- the encryption key is qual to or longer than the plain text message
- the key is truly random
- the key is used only once and then destroyed
What makes a scheme computationally secure?
if it cannot be cracked in a reasonable time