Transcript ppt
EECS150 - Digital Design
Lecture 13 - Final Project Description
March 7, 2002
John Wawrzynek
Spring 2002
EECS150 - Lec13-proj
Page 1
Project
• Everyone will design, debug, and demonstrate a
Music Synthesizer
• Operation based on principle of waveform synthesis
or sampling.
– Sounds from recordings of real musical instruments are
stored in memory then pitch-shifted and played back in
response to note commands.
• 1 or 2 partners/group
Spring 2002
EECS150 - Lec13-proj
Page 2
Digital Waveforms
• In digital systems waveforms are represented as a
series of numbers, rather than a voltage or current, as
in analog systems.
– Example: sound waveform
Sampling rate: 31.25KHz
16-bits per sample
– Sound can be produced by sending series of numbers to
Digital to Analog converter, then to Amplifier, then to speaker.
– In principle any sound can be produced.
Spring 2002
EECS150 - Lec13-proj
Page 3
Interfaces
• MIDI: Musical
Instrument Digital
Interface.
– Commands are sent
from a keyboard (or
computer) to control
the synthesizer.
• Waveforms are stored
in the ROM (read only
memory).
• Monophonic: one
voice at a time.
Spring 2002
EECS150 - Lec13-proj
Page 4
Theory of Sound and Music
• Air vibrating in the frequency range of 20Hz to 20KHz is
perceived as sound.
• The three important characteristics of perceived sound
are:
– loudness (relates to amplitude)
– pitch (relates to frequency)
– timbre (relates to shape)
• Human hearing is approximately logarithmic in
perceiving loudness and pitch:
– we perceive the loudness as being prop to the log of the sound
wave amplitude
Spring 2002
EECS150 - Lec13-proj
Page 5
Timbre
• tone quality or “color”
• Different instruments have different timbres.
• We perceive timbre based on how a note begins, repeats,
and ends.
• For many instruments a simple model can be used to
represent the shape of the waveform.
– Attack, sustain, release (decay)
[picture]
• Works best for “driven” instruments: woodwinds, brass,
bowed strings.
• Pluck and struck instruments don’t have the “sustain”
Spring 2002
EECS150 - Lec13-proj
Page 6
Pitch
• Pitch:
– 12 semi-tones form the
chromatic scale of the western
scale.
– To move from one up to the
next:
• freqnext = freq * 12th root of 2.
– After 12 such multiplications we
will have doubled the freq and
reached the octave.
• Most people can detect pitch
differences as small as a few
hundreds of a semi-tone (or a
few times the 1200th root of 2)!
Spring 2002
• Middle C has frequency of
261.63Hz.
– MIDI encoding of “60”
• High C (an octave above middle
C) has frequency 523.25Hz
– MIDI encoding of “72”
• Other tones can be produced by
multiplying and dividing the
frequency by factors of 12th root
of 2.
EECS150 - Lec13-proj
Page 7
Spring 2002
EECS150 - Lec13-proj
Page 8
Playing Notes
• ROM used to store notes has limited capacity.
• For notes with “sustain” portion, would like to vary note duration
Spring 2002
EECS150 - Lec13-proj
Page 9
Pitch Shifting
Spring 2002
EECS150 - Lec13-proj
Page 10
Pitch Shifting
Spring 2002
EECS150 - Lec13-proj
Page 11
Linear Interpolation
Spring 2002
EECS150 - Lec13-proj
Page 12
ROM (EEPROM) Layout
• One stored note per instrument
is never enough.
– Timbre varies from note to
note over the range of the
instrument.
• ROM holds directory with one
entry per MIDI note number.
• Entry holds pointer to note
“template” and “step size”.
• Note step sizes are
precomputed (synthesizer
does not need to do 12th root
of 2 calculation.
• One instrument per ROM
(might change this later).
Spring 2002
EECS150 - Lec13-proj
Page 13
Directory Entry Layout
• 20-bit template pointer
Spring 2002
• 12 bits of “step size”
EECS150 - Lec13-proj
Page 14
Template Layout
Spring 2002
EECS150 - Lec13-proj
Page 15
Instrument Template Files
• We will provide you with template files and a program for
converting these to EPROM format.
• We also have programs for taking instrument samples from
standard file formats and converting them to our template
format. You are encouraged to generate your own
template files and EPROMs.
• We might extend the format (and project) to allow for more
than one instrument per EPROM.
– Switch among the instruments either through dip switches or MIDI
commands.
Spring 2002
EECS150 - Lec13-proj
Page 16
High-level Block Diagram
FSM and datapath
for each block.
This is only a suggestion. Your organization is up to you.
Spring 2002
EECS150 - Lec13-proj
Page 17
Checkpoints
3/11
3/18
3/25
4/1
4/1
4/8
4/15
4/22
4/29
5/6
UART Design and Test
ROM Interfacing
Recess
MIDI Interface
Audio Stage
Monotone Notes
Notes of Arbitrary Frequency
Velocity Sensitivity
Spare
Final Checkoff
Spring 2002
• Your are strongly suggested to
work ahead.
• These are only minimum
requirements.
• Completion of checkpoints are
part of your project grade.
• Project spec document online
today.
• All checkpoint write-ups
available in next couple days (in
draft form).
EECS150 - Lec13-proj
Page 18
Extra Credit
• Early Final Checkoff.
• Extra credit only considered for
fully functional designs.
• Point assignment announced
later. Usually in the 15% range.
– 1 week or more
• Low CLB Count.
– “low” quantified later
• Interpolation
– add linear interpolation for
sample lookup
• Polyphony.
– The ability to play multiple keys
at once
• Velocity Sensitive Template
Lookup.
– Index templates not only on key
number but also velocity.
Spring 2002
EECS150 - Lec13-proj
Page 19
Spring 2002
EECS150 - Lec13-proj
Page 20
Connections
Spring 2002
EECS150 - Lec13-proj
Page 21
Spring 2002
EECS150 - Lec13-proj
Page 22
Spring 2002
EECS150 - Lec13-proj
Page 23
Note On
Spring 2002
EECS150 - Lec13-proj
Page 24
Note off
Spring 2002
EECS150 - Lec13-proj
Page 25
Keyboard Mapping
Spring 2002
EECS150 - Lec13-proj
Page 26
Spring 2002
EECS150 - Lec13-proj
Page 27
“Running Status”
• The MIDI standard convention allows a transmitter to
compress the data stream by dropping status bytes.
• A command without a status byte implicitly uses whatever
status byte was most recently sent.
• Therefore a keyboard can send a sequence of note-on and
note-off commands only the first of which having a status
byte.
• Your synthesizer must conform to the running status
convention.
Spring 2002
EECS150 - Lec13-proj
Page 28