Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Standard text messaging rates apply

Digital Tuner

696
views

Published on

1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
696
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
7
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript

• 1. EE 113D Fall 2008 Patrick Lundquist Ryan Wong http://weep.wikidot.com/
• 2.
• The notes in the music are distinguished by their frequency
• The note of each octave is twice the frequency of the same note in the previous octave.
• Ex: C = 32.7 Hz, 65.4 Hz, 130.8 Hz, 261.6 Hz, 523.2 Hz â€¦ etc.
EE 113D Fall 2008
• 3.
• The frequencies of the C notes are actually 32.7 Hz, 65.4 Hz, 130.8 Hz, 261.6 Hzâ€¦ etc.
• But we use C = 2 x Hz, where X = 5, 6, 7, 8, 9â€¦ for the sake of simplicity.
EE 113D Fall 2008
• 4. Output signal magnitude generation is exponential: |2 x -2 x+a |, -0.5<a<0.5 Since notes are base 2 logarithmic, not linear C â€“ 7 th octave C â€“ 8 th octave C â€“ 6 th octave Our output signal varies exponentially with the input signalâ€™s relative distance from the tuning frequency. EE 113D Fall 2008
• 5.
• A tuner can be aplied to anything that can be measured on a specturm analyzer
• Ex: instruments, function generator, human voice.
• We can start testing our finished product with a function generator and then move onto the more complicated human voice.
EE 113D Fall 2008
• 6.
• Human vocal range: 80-1100 Hz
• Piano note frequency range: 27.5 â€“ 4186 Hz
• Human hearing 20 Hz â€“ 20 KHz
EE 113D Fall 2008
• 7.
• Tuning to C (32 Hz, 64 Hzâ€¦ etc.)
• We wish to output high if the input is very close to a C in frequency
• Output will be low if input is anything else.
• The sampling frequency of the tuner will be 8000 Hz.
• We chose this frequency because it is twice the maximum frequency of most instruments.
EE 113D Fall 2008
• 8.
• Since we are dealing with frequencies, we know a Fourier Transform will be involved.
• The rest is just manipulation to get the correct output from various inputs
• The result of the Fourier Transform is a delta function at a memory index.
• We calculate frequency based on this index: A/B x F = frequency of signal where F is the sampling frequency, A is the index location B is the total number of indices
EE 113D Fall 2008
• 9. EE 113D Fall 2008
• 10. Simulation: generated a sine wave Testing: generated sine wave from function generator Real Life: microphone signal input EE 113D Fall 2008
• 11. Simulation: generated a sine wave Testing: sample.asm from lab EE 113D Fall 2008
• 12. Simulation: FFT function in matlab Testing: RFFT.asm files from experiment 5. Uses a Radix-2, DIT EE 113D Fall 2008
• 13. Simulation: Loop through array find max frequency Testing: getfreq.asm file uses finds max frequency index and converts it EE 113D Fall 2008
• 14. Simulation: Scaling max frequency to known scale: ~16khz Testing: thold.asm file performs a series of bitwise shifts to scale to reference freq. EE 113D Fall 2008
• 15. Simulation: Compare to tuning key and output ratio Testing: thold.asm implements lookup table for comparison and lookup table for result EE 113D Fall 2008
• 16. Simulation: Scaling max frequency to known scale: ~16khz Testing: thold.asm file EE 113D Fall 2008
• 17. Sampled signal EE 113D Fall 2008
• 18. RFFT graphed output EE 113D Fall 2008
• 19.
• Integrate all modules into one continuous program.
• Timing issues and assembly syntax problems
• Also, nops and @ operator provided initial trouble.
• Optimizing program to run in real time.
• FFT is a time expensive process that reduces the potential for real time tuning.
• Difficult to determine when FFT is finished running.
EE 113D Fall 2008
• 20.
• Tune to multiple notes
• Tune to a wider input frequency
• Record matches to memory or output file
• Convert output to sheet music
• Play sheet music
EE 113D Fall 2008
• 21.
• Questions?
EE 113D Fall 2008