820 likes | 958 Vues
User controls. Music source. Design Problem - Digital Band. Build a digital system that can create music of any style, with any performers, whenever we want to hear it. Outline. Music, Sound, and Signals Making Music from Sines and Cosines Improving the Design - Making Different Instruments.
E N D
User controls Music source Design Problem - Digital Band • Build a digital system that can create music of any style, with any performers, whenever we want to hear it
Outline • Music, Sound, and Signals • Making Music from Sines and Cosines • Improving the Design - Making Different Instruments
All systems that make music Have a musical source Have a way to read music information Convert musical information to sound Create sound waves in air Ways to Make Music • The result: A soundsignal - but what is it?
Signals are Everywhere • Signal: A pattern or variation that contains information
Sound Signals • Sound Signal: A pattern or variation in molecules that a sound makes • Sound has a speed that is different for different materials
Making Sounds Using Signals • Amazing Fact: Any sound can be created, stored, and played using signals! • Microphones and loudspeakers enable us to record and play sounds • We only need one signal to represent any one sound
time (sec) time (sec) time (sec) Exercise: Plotting Signals • Plot the signals s(t) = 2 t + 3 s(t) = 0.3 cos(3 t) s(t) = 6 t2 - 4 • Which one of these looks like a musical signal?
Manipulating Signals Three musically-useful ways: • Amplitude scaling: Changing its height x(t) = A • s(t) • Time shifting: Moving left or right y(t) = s(t + d) • Time scaling: Stretching or shrinking the time axis z(t) = s(c • t)
p(t+T) p(t) time (sec) Musical Signals and Period • Observation: The simplest musical signals are periodic; they have shapes that repeat • Period: The repeating interval T of a periodic signal in units of time (seconds, milliseconds.) • For any periodic signal p(t), p(t) = p(t + T). Example: T = 0.0038 sec = 3.8 msec
Pitch and Fundamental Frequency • Pitch: how high or low a periodic signal sounds. Can we be more precise? • Yes! Use fundamental frequency, given by f = 1/T • Units of frequency: cycles per second or Hertz (Hz)
Determine the fundamental frequencies of the sounds shown Sinusoidal Signal Saxophone Signal time time Problem: Fundamental Frequency and Period Solution: Both have periods of 0.0038 sec. Therefore, f=1/0.0038 f = 263Hz (middle C)
A Little Musical Notation The y-axis is frequency The x-axis is time • Each note on a page of sheet music corresponds to a signal with a particular frequency and duration…
The Key to Reading Music • When a musical score is played, each note becomes a signal with a fundamental frequency • The type of note determines its duration
p(t) Making Musical Sounds • Signals that have a pitch are periodic • A periodic signal repeats over and over • Therefore, to make a single note from a musical instrument, we need to create one period of its sound and play it over and over.
Loudspeaker Translate notes to fundamental frequencies and durations Sound Waves Single period of instrument signal Our First Digital Band Design
Refining the Design • How do we get the musical information to our digital band? • How do we specify each instrument’s signal shape? • How do we make several instrument sounds and play them simultaneously?
Specifying the Musical Score • Traditionally, music has been written on paper • Portable and easy for humans to read • Destructible and a little hard for digital devices to read • Is there a more convenient format for our musical information?
MIDI specifies (a) note on/off time stamps and (b) note frequencies Convenient digital format A standard in widespread use Translate notes to fundamental frequencies and time stamps Musical Instrument Digital Interface (MIDI)
Specifying the Shape of the Musical Instrument Sound • Most musical instrument signals have complicated shapes • We shall start with simple periodic signals - the sine and cosine functions
Turning a Sine or Cosine into a Sinusoid • To make a sound from a sine or cosine function, make the angle a function of time s(t) = A cos(2 π t / T) [angle units: radians] A = {Amplitude} , T = {Period} • Can show: s(t) = s(t + T) is periodic People can’t hear the difference between sines and cosines! Example: A = 3.1 T = 2.5 msec
time (sec) time (sec) Saxophone Sinusoid time (sec) time (sec) Making Simple Melodies
Cosine generator Translate notes to fundamental frequencies and time stamps Our Second Digital Band Design How do we extend this system to play Different instruments? (b) Multiple notes simultaneously? This system allows us to play simple single-note melodies with a simple (sinusoidal) instrument sound.
MIDI Information: Cosine generator Block Diagram: Translate notes to period values and time stamps Cosine generator Making More than One Note at a Time • To play two notes simultaneously, add their signals together
Example Problem: Adding Two Signals Together time (sec) time (sec)
Example: Adding Two Sinusoids Together • This problem is hard to do by hand… • …but easy to do digitally!
Reverse-Engineering the Musical Score • Spectrum: A plot of a signal’s frequency content over a specified window • “Spikes” in the spectrum correspond to sinusoids • Spectrum Analysis: A procedure for computing the spectrum Spectrum Analysis is also easy to do digitally!