U-M ENGR 100 - Music Signal Processing

Unformatted text preview:

Eng. 100: Music Signal Processing F14 J. FesslerProject 1: Tone synthesizer/transcriber1 AbstractThis project teaches you the Matlab Graphical User Interface (GUI) tools that you will use in subsequentprojects. It also demonstrates some issues you will face dur ing the proj ects. The goals of this project are:(1) to write a Matlab program for a tone sy nthesizer with an on-screen mouse-activated keypad; (2) to writea Matlab program for a tone trans cr iber th at produces a Matlab stem plot similar to musical staff n otationfrom a pure tonal signal. The second p roject will do the same thing for telephone touch-tones; the thirdproject will do the same th ing for synthesized musical instruments. This project will help you do both.2 Backgr oundIn Lab 2 you learned the frequencies used in a pur e tonal version of “The Victors.” In this project you w illapply that knowledge to build a tone synthesizer and transcriber. You need to learn some musical notationand nomenclature, and some graphical Matlab commands. These topics are covered next.3 Basics of musical staff notation3.1 Results from Lab 2In Lab 2 you learned that the musical tones used in “The Victors” had the following frequencies: 392, 440, 494,523, 587, 659 Hz (rounded to the nearest integer). You also inferred that there were “missing” frequ encies:415, 466, 554, 622 Hz. You also deduced that these notes are related to each other not by common differences,but by a common ratio of 1.06 (actually 1.0595).In fact 1.0595 is the 12th root of 2, i.e., 21/12. That f actor suggests that there is a basic set of 12 notes that“repeat” with their frequ encies multiplied by integer powers (positive and negative) of two. This is indeed thecase. This is the modern 12-tone or chromatic musical scale; most Western music is b ased on it, but severalnon-Western musical genres use other scales.The repetitions of the 12 frequencies are called octaves, because for any 8 notes that make up a major scale,the highest note has twice the frequency of the lowest note. An 8-note major scale consists of two half stepsand 5 whole steps so the ratio of the highest to lower note frequency is (21/12)2(22/12)5= 212/12= 2. So 880 Hzis on e octave above 440 Hz, and 220 Hz is one octave below 440 Hz. We will focus on th e octave spanned bythe frequencies in “The Victors,” because many musical compositions use this octave.The 88 keys of a full-sized piano keyboard span more than 7 octaves:• (21/12)88−1= 27.25• Rightmost piano key: 4186 Hz is 3 octaves above 523 Hz (4186/23≈ 523)• Leftmost piano key: 27.5 Hz is 4 octaves below 440 Hz (440/24≈ 27.5).3.2 MIDI frequency notationThe information above is enough to create one kind of notation for most Western music. The MusicalInstrument Digital Interface (MIDI) notation represents musical frequencies using integers from 0 to 127based the formulaMIDI = 69 + 12 log2(F/440),1where F denotes frequency in Hertz. In MIDI notation, frequencies of “The Victors” are represented as thefollowing sequence of integers:71, 67, 69, 71, 67, 69, 71, 72, 69, 71, 72, 69, 71, 72, 74, 76, 71, 71 , 72, 67, 69, 71, 74, 71, 69, 67.MIDI data also includes information about amplitude, duration, and some other things. This “notation” iswell-suited for communicating music between digital devices, but is not very visually intuitive for humans.3.3 Musical staff notationMusical staff notation (the musical notation you usually see) is m ore complicated. The reason is that Westernmusic uses the frequencies used in “The Victors” more commonly than the “missing” frequencies from Lab 2(that’s why they were missing).• The 7 tones in “The Victors” are called naturals and are designated with letters: A, B, C, D, E , F, G.• The 5 “missing” tones in a single octave are called accidentals or sharps and flats, and they are designatedby “♯” and “♭” respectively.• Some sharps and flats are equivalent: A♯ =B♭, C♯ =D♭, D♯ =E♭, F♯ =G♭, G♯ =A♭These are pronounced “A-sharp” and “B-flat,” etc.• B♭ is below B (between A and B) and C♯ is above C (between C and D); A♯ is th e same as B♭, etc.• A 12-note chromatic scale can be written as either of the following lists:{A, A♯, B, C, C♯, D, D♯, E, F, F♯, G, G♯ } or {A, B♭, B, C, D♭, D, E♭, E, F, G♭, G, A♭ }These ch romatic scales include the naturals and all the accidentals.• On a standard piano keyboard, the naturals are the white keys and the accidentals (sharps and flats) arethe black keys.Certain combinations of notes occur together more frequently in music traditionally. Why? Because theysound “more harmonious” because the ratios between their frequencies are very close to ratios of small integers.For example, A is 440 Hz and E is 659 Hz, almost exactly a 3:2 ratio. Indeed, early Western music was basedon using these ratios of small integers, rather than the equally-spaced logarithms of frequencies used today.Proposals to us e the 21/12ratio date back to the 16th century, but the more wid espread change occurredaround when J.S. Bach composed “The Well-Tempered Clavier” in 1722. These two books had compositionsin all 12 keys, so an “equal tempered” scale (like we use today) would sound equally good (but perhap s notperfect) for all the pieces. In contrast, other tu ning methods (based on small integer ratios) might sound go odfor some keys but not for others (“The Ill-Tempered Clavier”?).The following table summarizes the similarities of the integer ratios and the powers of 21/12.Notes A A♯ B C C♯ D D♯ E F F♯ G G♯FREQ440 Hz20/1221/1222/1223/1224/1225/1226/1227/1228/1229/12210/12211/12Hertz 440 466.2 493.9 523.3 554.4 587.3 622.3 659.3 698.5 740.0 784.0 830.6Ratio 1:1 none 9:8 6:5 5:4 4:3 none 3:2 8:5 5:3 16:9 15:8440 ? 495 528 550 586.¯6 ? 660 704 733.¯3 782.¯2 825One need not always start with A. Starting with G, C and A and looking mostly at naturals, we haveG A B C D E F♯ G1:1 9:8 5:4 4:3 3:2 5:3 15:8 2:1DO RE MI FA SO LA TI DONatural C Major: C,D,E,F,G,A,B,CNotes Interval: 1,1,12,1,1,1,12Only A Minor: A,B,C,D,E,F,G,ADO-RE-MI-FA-SO-LA-TI-DO will be familiar to anyone who has seen the movie The Sound of Music.2A musical staff consists of 5 parallel horizontal lines with circles (notes) on it. Horizontal position denotestime (read left to right) and ver tical position denotes note frequency. Both the lines themselves, and thespaces between lines, are


View Full Document

U-M ENGR 100 - Music Signal Processing

Download Music Signal Processing
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Music Signal Processing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Music Signal Processing 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?