Sunday, 6 March 2011

Representing Sound

Analogue: This can be any value (it is continuous)
Digital: This has only certain values (discrete values)

Signal: This is the electrical version of data, propagated in a non-electrical way (physical e.g. water or air)
We use a transducer to convert between electrical and non-electrical. (e.g. a microphone).
Getting the sound wave into an analogue electrical signal is a start – but computers can only work on digital signals.
...ADC!
Step 1: The continuous (analogue) sound signal is sampled at regular intervals. This is called Pulse Amplitude Modulation (PAM)
Step2: Each value is then rounded down to an approximate value dawn from a range of possible discrete (digital) values.
Step3: The value is then stored as a binary digit
Step4: The technical term for approximating a sound sample to the closest digital value is quantisation
            Each quantised number represents a Pulse Code Modulation (PCM)
            Each individual PCM (binary number representing one sample from the sound) is stored in sequence        in a file to record the sound in a digital, binary file

Because of this quantisation causes there to be lose in data as it is rounded to the nearest figure. This means quality will be lost. 
... Nyquist's theorem :D
Nyquist’s theorem states that: “We must sample at a frequency at least twice the rate of the highest frequency in the signal”

Common file formats for sound:
•WAV: 1min = 2.5Mb
•MPEG (used in .mp2, .mp3, .mp4) removes any frequencies the ear/brain cannot deal with.
•Which makes the file about 10% of the original. 1 min = 0.25Mb

Synthesisers: These use MIDI (Music Information Digital Interface) 
These don't save the data for the sound, it actually stores the notes used, which instruments and duration etc. for which can be played differently on a synthesiser by changing small parts of information e.g. which instrument it's played on.

Streaming Music:
•The server sends the sounds bit by bit
•The client buffers it and plays it when it has enough to keep going whilst buffering more
Advantages include:
•No need to download the file – just start playing as you buffer
•No need to save any files
•Digital Rights Management (DRM) - Can't be easily copied without recording manuely
Disadvantages include:
•Not being able to access these without being c
•Internet lag can cause music to cut off.

1 comment:

  1. Excellent summary - I don't feel the need to add anything to this post

    ReplyDelete