PHY-2464 Physical Basis of Music PHY -

advertisement
PHY2464 - The Physical Basis of Music
4/18/2005
PHY
-2464
PHY-2464
Physical Basis of Music
Presentation
Presentation 26
26
Sound
Sound Reproduction
Reproduction and
and Synthesis:
Synthesis:
Digital
Digital Reproduction
Reproduction
Adapted
Adapted in
in substantial
substantial part
part from
from
Sam
Matteson’s
Unit
4
Session
Sam Matteson’s Unit 4 Session 40
40 &
& 41
41
Sam
Sam Trickey
Trickey
April
April 18,
18, 2005
2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Lay of the land •
•
•
•
•
•
Digital recording uses the states of electronic switches to
encode the amplitude of the waveform in a binary
representation.
This approach → spectral sampling
In digital recording a waveform is digitized by an analoganalogtoto-digital converter (ADC) – a digital transducer.
The digital data are stored on magnetic tape (DAT) or
compact optical disk (CD) in coded form.
Playback occurs via a digitaldigital-to analog converter (DAC) –
Notice transducer reciprocity.
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Write the number “five.”
Did you write “5”?
You could have written “V”.
What about
?
If you were Babylonian or Sumerian you
might have written:
Pres. 26 Sound Reproduction & Synthesis – Digital
A number is a quantity; the “How many?” of
something.
A numeral is a graphic representation of the
number.
“V” is the Roman Numeral for
five.
The Babylonians used clay and a
stylus to record words and
symbols in “wedge writing,”
cuneiform.
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
There are ten “Arabic” numerals in our system
of representing numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
How do we count higher than 9?
Place value!
12034 = 1 x 104 + 2 x 103
+ 0 x 102 + 3 x 101 + 4 x 100
The Babylonians had a
sexagesimal (base 60) system
Pres. 26 Sound Reproduction & Synthesis – Digital
Binary representation:
• There are 10 kinds of people:
Those who understand binary representation,
And those who don’t.
4/18/2005
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Binary representation:
• In binary (base two) representation there are only
two numerals: 0 and 1.
• The place value is a power of two:
[101101]2 = 1 x 25 +0 x 24 +1 x 23 +
1 x 22 + 0 x 21 + 1 x 20
= 32 + 0 + 8 + 4 + 0 + 1 = 45
The number “Forty-five”.
Fourteen
What number is represented by [1110]2?
Write the binary representation for thirteen.
[1101]2
Pres. 26 Sound Reproduction & Synthesis – Digital
The secret of digital electronics:
Very clever arrangements of very dumb switches.
A simple switch has two “states” only:
On – represented by “1”
Off – represented by “0”
+3 Volts
0011
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
A binary numeral can be represented by an
arrangement of switches on =1, (high); off = 0 (low).
10:
8:
2: [0010]
[1000]22
[1010]
0
1
Voltage
Most Significant Bit (MSB)
00
01
0
Least Significant Bit (LSB)
Pres. 26 Sound Reproduction & Synthesis – Digital
Digitization: the process of converting a
waveform into a series of binary numerals
that represent the amplitude of the signal at
equal intervals of time.
Digitized Waveform
Pressure
Analog Waveform
Binary Coded Data
[1000]2
[0100]2
[0010]2
[0001]2
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Digitization fidelity depends upon
•
•
Precision –the binary “word length.
length.”
Sampling rate –the number of encoding
measurements per second.
Word Length
+3 -4+54+5-5+65+6-5+45+4-4+3+14+3+1-3-2+22+2-1-2-2 –1 -0 -0 -1
Sign bit 23 22 21 20
[11010]2
10011
00100
10011
00101
10101
00101
10100
00100
10011
10001
00011
00010
10010
00001
00100
00100
00001
00000
00000
00001
=+(8+0+2+0)=+10
Pres. 26 Sound Reproduction & Synthesis – Digital
Digitization fidelity depends upon
•
•
Precision –the binary “word length.
ength.”
Sampling rate –the number of encoding
measurements per second.
Word Length
+1 -2+32+3-2+32+3-2+22+2-2+12+1-0-2-0+10+1-0-1-1 –0 -0 -0 -0
Sign bit 22 21 20
[1010]2
1001
0010
1011
0010
1011
0011
1010
0011
1001
0000
1011
0000
1001
0000
0001
0001
0000
0000
0000
0000
0000
=+(0+2+0)=+2
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Digitization fidelity depends upon
•
•
Precision –the binary “word length.”
length.”
Sampling rate –the number of encoding
measurements per second.
10011
00100
10011
00101
10101
00101
10100
00100
10011
10001
00011
00010
10010
00001
00100
00100
00001
00000
00000
00001
Sampling Rate
+3 -4+54+5-5+65+6-5+45+4-4+3+14+3+1-3-2+22+2-1-2-2 –1 -0 -0 -1
Pres. 26 Sound Reproduction & Synthesis – Digital
Digitization fidelity depends upon
•
•
Precision –the binary “word length.”
length.”
Sampling rate –the number of encoding
measurements per second.
Sampling Rate
00000
00001
00010
10010
00011
10011
10100
10110
10101
10011
+3 …+5…+6…+4…+3……+5…+6…+4…+3…-3…+2…3…+2…-2… –1… -0
Nyquist Criterion:
The maximum
frequency that can be
represented is ½ the
sampling rate.
fmax = ½ R
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Nyquist Criterion:
The maximum frequency that can be represented is ½ the
sampling rate.
fmax = ½ R
The Standard Sampling Rate for CDs is 44.1 kHz.
kHz.
What is the maximum audio frequency that can be
recorded according to the Nyquist Criterion?
fmax = ½ R
= ½ (44.1 kHz) = 22.05 kHz
Pres. 26 Sound Reproduction & Synthesis – Digital
Fast, inexpensive, reliable Analog to Digital Converters
are now available.
ADC Integrated Circuit
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
The digitized signal is stored as states of a solid state
memory:
FlipFlip-Flop
1
0
0
1
Pres. 26 Sound Reproduction & Synthesis – Digital
The digitized signal is stored as states of an array of
“FlipFlip-Flops.”
Flops.”
Parallel
Serial
C
C
1
1
C
0
0
C
0
0
C
1
1
c = clock
C
C
C
1
0
1
0
0
1
1
0
0
1
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
Much of the “real estate” on a microprocessor chip is
used for solid state memory.
Pres. 26 Sound Reproduction & Synthesis – Digital
Much of the “real estate” on a microprocessor chip is
used for solid state memory.
4/18/2005
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
Compact Disks store binary data in a “non“non-volatile”
form—
—
pits—
—
that
are
optically
readable
using a
form pits
laser.
Pres. 26 Sound Reproduction & Synthesis – Digital
In CDs the digitized waveform is stored along with a
label that includes timing information in “phase”
coding: a “1” is recorded whenever there is a
change in the binary data stream. Compare LtoR:
LtoR:
[1001100111101110]2→ [1001010100011001]phase
[1 0 1 0 1 0 1 0]
4/18/2005
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
A laser “reads” the pits: a pit scatters the light and the
signal from a photodiode drops.
Pit scatters light
Lands reflect light
into photodiode
Pres. 26 Sound Reproduction & Synthesis – Digital
In Digital Theater Sound (DTS TM) a digital code
(SMPTE time stamp) synchronizes the film with an
audio CD. (SMPTE: Society of Motion Picture and
Television Engineers)
SMPTE time stamp
Synchronization
Audio CD
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Compact Disk:
The CD is read multiple times (over(over-sampled) and read
errors are corrected.
The data are read in quickly and stored in a “buffer,”
then “clocked out” at the audio standard sampling
rate of 44.1 kHz into a DAC for playback.
Digital
Input
Input Buffer
DigitalDigital-toto-Analog
Converter (DAC)
Phase Converter
Analog output
Pres. 26 Sound Reproduction & Synthesis – Digital
Digital to Analog Conversion (DAC)
1
2
4
8
0001
0010
0100
1000
DAC (Concept)
0011
1010
1101
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Electronic Digital-to-Analog Conversion
10
0
10
10
1
Input Number
Output Voltage
Pres. 26 Sound Reproduction & Synthesis – Digital
Electronic Digital-to-Analog Conversion
10
0
10
10
1
Input Number
Output Voltage
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
Electronic Digital-to-Analog Conversion
10
0
10
10
1
Input Number
Output Voltage
Pres. 26 Sound Reproduction & Synthesis – Digital
MDI
• Acronym for “Musical Instrument Digital
Interface.”
• MIDI is a control protocol that uses binary codes
to remotely control electronic musical
instruments.
• MIDI uses a current loop to communicate in
which current flowing means “0” and no current
means “1.”
• The Electronic wind instrument (EWI), Electronic
Valve Instrument (EVI) and Electronic String
Instrument (ESI) use MIDI for control.
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI (1982) sends, not a digitized wave form,
but rather a binary coded performance
message to control electronic instruments
(synthesizers) & conventional ones (organs).
Primary
MIDI Out
MIDI In
Secondary
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI—Physical:
A five pin connector labeled “MIDI Out,”
“MIDI In,” or “MIDI Thru.”
Communication is via current.
MIDI Out
MIDI In
Communication via current:
current = 0, no current = 1
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI—Physical:
A five pin connector labeled “MIDI Out,”
“MIDI In,” or “MIDI Thru.”
Communication is via current.
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Physical:
A MIDI chain can be assembled with up to
64 channels: [0000]2 to [1111]2.
MIDI Out MIDI Thru
Channel
00
01
02
03
04
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Coding:
A MIDI command is a word of three 8-bit
bytes — status byte and 2 data bytes.
Example:
Status
Data
Data
[10010100] [00111100] [011111111]:
{09, 04}
Note on,
Channel 04
{060}
C4
{255}
Speed 255,
(hardest)
100101 00 001111 0001111
0001111 1111
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI command - a binary code that follows a
prescribed syntax and grammar.
Example:
Status
Data
{08, 04}
Note off,
Channel 04
{060}
C4
Data
[10000100] [00111100] [011111111]:
{xxx}
Irrelevant
100001 00 001111 0001111
0001111 1111
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Instruments:
Electronic Wind Instrument (EWI; Nyle Steiner)
originally analog. Sax fingering
MIDI signals:
Note, pressure, lip,
touch
http://www.patchmanmusic
.com/NyleSteinerHomepage
NyleSteinerHomepage.html
.html
http://www.patchmanmusic.com/
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Instruments:
Electronic Valve Instrument (EVI); also Steiner
4/18/2005
PHY2464 - The Physical Basis of Music
4/18/2005
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Instruments:
Electronic String Instrument (ESI)
Janos
Warren Bond—
Bond— Electric Strad
http://www.electronicstrad
.co.uk
uk
http://www.electronicstrad.co.
Pres. 26 Sound Reproduction & Synthesis – Digital
MIDI Instruments:
Gesture Instruments (GI)h
“The Glove”
Prof. Butch Rovan
(U. N. Texas)
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
Summary:
•
•
•
•
Digital recording uses the states of electronic
switches to encode the amplitude of the
waveform in a binary representation.
In digital recording a waveform is digitized by
an analog-to-digital converter (ADC).
The digital data are stored on magnetic tape
(DAT) or compact optical disk (CD) in a coded
form.
Playback occurs via a digital-to-analog
conversion (DAC).
Pres. 26 Sound Reproduction & Synthesis – Digital
Summary (continued):
•
The two most important parameters for
precision of digital encoding are word length
and sampling rate.
•
The maximum frequency that can be digitized is
equal to ½ the sampling rate.
•
Digital data can be processed serially, i.e. one
bit after the other, or parallel, a word at a time.
4/18/2005
PHY2464 - The Physical Basis of Music
Pres. 26 Sound Reproduction & Synthesis – Digital
Summary (concluded):
•
MIDI is the acronym for “Musical Instrument
Digital Interface.”
•
MIDI is a control protocol that uses binary
codes to control musical instruments remotely
•
A current loop is used to communicate
•
The Electronic wind instrument (EWI),
Electronic Valve Instrument (EVI) and
Electronic String Instrument (ESI) use MIDI
for control. Conventional instruments can be
controlled as well.
4/18/2005
Download