Measuring signal frequency?
Ratatoskr
Posts: 12
Hey, it's me again with the silly questions.
We're trying to connect a guitar to a Basic Stamp (then the stamp to a computer), so we need a way to get the dominant frequency (pitch) of each signal from 6 pickups (1 on each string). Basically what we need to make is a frequency meter (or 6) that can handle the kind of mixed signal a guitar will output. Given that we're currently stuck on how to make a basic frequency meter, let alone how to make it read only the strongest frequency present, we're in need of some ideas. I've found a bunch of tutorials on how to make frequency meters, but they all focus on digital displays and not the actual vital components.
Alternatively, we could try to construct a light pickup using LEDs and photodiodes, though it would have to be pretty precise to not give complete junk.
EDIT: we finally found that parallax makes a/d converters, so we might be okay on that front. The issue is that for this project we would then have to run multiple a/d converters on a single Stamp, while also sending data to the computer. Is this even possible, is there a fast way to turn the sumbers from the a/d into a frequency number, and is there a better way to do this?
Post Edited (Ratatoskr) : 5/20/2008 3:18:12 PM GMT
We're trying to connect a guitar to a Basic Stamp (then the stamp to a computer), so we need a way to get the dominant frequency (pitch) of each signal from 6 pickups (1 on each string). Basically what we need to make is a frequency meter (or 6) that can handle the kind of mixed signal a guitar will output. Given that we're currently stuck on how to make a basic frequency meter, let alone how to make it read only the strongest frequency present, we're in need of some ideas. I've found a bunch of tutorials on how to make frequency meters, but they all focus on digital displays and not the actual vital components.
Alternatively, we could try to construct a light pickup using LEDs and photodiodes, though it would have to be pretty precise to not give complete junk.
EDIT: we finally found that parallax makes a/d converters, so we might be okay on that front. The issue is that for this project we would then have to run multiple a/d converters on a single Stamp, while also sending data to the computer. Is this even possible, is there a fast way to turn the sumbers from the a/d into a frequency number, and is there a better way to do this?
Post Edited (Ratatoskr) : 5/20/2008 3:18:12 PM GMT
Comments
Having sampled the sound, you then run a Fast Fourier Transform on the data to pull out the Frequency components. Again, no way in the world can the BS2 run a fast fourier transform.
People DO make specialized chips,·called "DSP" or "Digital Signal Processor"·for this purpose, which is what most people use for this kind of application.
40 kHz really? I thought you had to sample at twice the freq., so about 8 kHz max?
http://sensorsportal.com/HTML/E-SHOP/PRODUCTS_4/UFDC_1.htm
http://www.sensorsportal.com/DOWNLOADS/UFDC_1.pdf
·
Do a web search for "zero crossing detector" for some sample input circuits. You could handle six channels with a Propeller, but not with a Stamp.
-putting the signal directly into the computer and dealing with it there with an oscilloscope program
-using a stock Roland synth setup and translating MIDI for our purposes
-counting light beam interruptions
-abandoning accurate readings/compromising realism to just put buttons on the fretboard
None of which (except the buttons) I have a clue how to do, but we're not out of the game yet.
EDIT: I like this zero crossing detector, but I don't think the Propeller is an option at this point, time constraints are the issue.
EDIT again: We may be changing our priorities to favor coolness over completion, so the Propeller+crossing detector could be a solid option. We'd have to get a fairly clean signal to get the crossing detector to come up with the fundamental frequency, no?
Post Edited (Ratatoskr) : 5/20/2008 6:09:26 PM GMT