Multiple Frequency Detection - Page 1
Forum section: electronics / projects

author: minibutmany
author_rank: Regular Contributor
timestamp: April 23, 2013, 10:21:23 pm
content: Hello,I have thought about doing a project that would convert a signal from a guitar into MIDI for controlling synths and stuff. There are already plenty of designs out there, mostly just doing basic frequency detection with a micro. The problem is that these are all monophonic, and seem pretty picky about feeding it more than one note at a time. I wanted to know if anyone has a simple solution or knows of some circuits that are already out there. By any chance would it be similar to DTMF decoding?Thanks

author: nctnico
author_rank: Super Contributor
timestamp: April 23, 2013, 11:04:48 pm
content: You'd need some processing power so this is definitely a job for a fast ARM controller. Forget about DTMF decoding. That is something completely different (BTW most algorithms you'll find on the internet actually won't work realiably for decoding DMTF).Your best starting point is FFT to get a frequency spectrum. The problem is that you need to seperate the fundamental tones from the harmonics. If you know the harmonic relationship of a note played on a guitar you can match a frequency response template with the FFT data and try to find the tones. A big problem is that a harmonic from tone 1 can be the fundamental of tone 2.

author: minibutmany
author_rank: Regular Contributor
timestamp: April 23, 2013, 11:47:28 pm
content: Thanks for the reply. Yes, i was afraid of the harmonics, as most would lay on top of other notes fundamentals. I imagine there must be an analog solution considering the world has not always had ARM processors, but i may be wrong. I have seen these converters out on the market as well, but the only easy solution for polyphony was to have a special pick-up in the guitar with six separate outputs.

author: KJDS
author_rank: Super Contributor
timestamp: April 24, 2013, 06:38:45 pm
content: Once upon a time, in a lab long long ago, I worked on an instantaneous frequency meter.I can't remember that much about it, and it's time I went and cooked dinner, but have a google and see if that turns up a useful way of measuring what you want without a huge amount of DSPing.

author: hlavac
author_rank: Frequent Contributor
timestamp: April 24, 2013, 08:38:21 pm
content: Many, many (one per note) narrow tuned band pass filters + envelope detectors?But seriously, this is a job for DSP.

author: JackOfVA
author_rank: Unknown
timestamp: April 24, 2013, 10:09:59 pm
content: Quote from: hlavac on April 24, 2013, 08:38:21 pmI've seen it done, but with coarse resolution, with paralleled input 567 tone decoder chips. Before that, way back in the days before electronics even, things called harmonic analyzers were used, which consisted of a mechanical analog computer made with weights, springs, levers, etc. All fascinating from a historical prospective, but a whole lot more complicated than doing it digitally via an FFT.I have a vague recollection of reading about a simultaneous decoder based on vibrating reeds, each tuned to a different frequency. (Vibrating reeds were commonly used in two-way radio for tone coded squelch in the 1960's and '70's but those were high Q devices in the range 50-300 Hz.)It's nasty to instantaneously decode simultaneous multiple tones with analog hardware.

author: minibutmany
author_rank: Regular Contributor
timestamp: April 24, 2013, 11:52:20 pm
content: Would it be possible to have it scan the audio range looking for only a single frequency at a time? That way it would really only need to decode one frequency, but it would just quickly loop through a really long list.

author: JackOfVA
author_rank: Unknown
timestamp: April 25, 2013, 12:07:40 am
content: Quote from: minibutmany on April 24, 2013, 11:52:20 pmThat's basically a spectrum analyzer of the classic design. Problem is there's a tradeoff of bandwidth and detection speed, so that it may take some seconds to sweep the audio range.

author: Hideki
author_rank: Frequent Contributor
timestamp: April 25, 2013, 01:58:36 am
content: This problem is MUCH harder than you think and has no simple solution. Take look around. Do you see any product on the the market than can do what you want in any sort of reliable way?Using a split hex pickup makes the problem much more manageable, but even then it's very hard to do well. The Fishman TriplePlay is probably the best attempt so far.http://www.fishman.com/tripleplay

author: Rerouter
author_rank: Super Contributor
timestamp: April 25, 2013, 04:16:29 am
content: i suppose it could be done via a micro with no significant code if you could control the signal level, feed your signal into a schmitt trigger, have that feed into a micro's interrupt pin, and then interrupt on state changes, time the state changes, from that you get a basic interference pattern, and with that you can work out the fundamental and the additional tone, (not really multiple tones, that gets complex fast)if there was a way to do it simply in analog i would be very interested in hearing it, as its hard to make a pulse counter that's sensitive to 100mV 0-10Khz signals while ignoring 80Khz 500mV background noise, (yes that is the worst case but i may as-well build for it)

author: Mike Warren
author_rank: Unknown
timestamp: April 25, 2013, 05:40:27 am
content: Not only that, but a guitar string already contains a lot of harmonics and these change with time and how load notes are played. Would be extremely hard to do reliably, even with a powerful DSP.The normal way this is done is with a pickup that has separate detectors for each string. Roland were doing this as far back as the mid 80s with reasonable success.

author: cwalex
author_rank: Frequent Contributor
timestamp: April 25, 2013, 06:00:02 am
content: Quote from: Mike Warren on April 25, 2013, 05:40:27 amA friend of mine bought the roland product where you attach a pickup that has individual string pickup and connects to a unit that you can use for midi output. It was cool to watch him play the guitar and hear piano or trumpet or "you name it" tones come out. He ended up selling it because he never found a practical use for it other than a novelty. But the product was really awesome and did what it said on the tin. Quality was really good too. No idea what hardware was inside the magic box to enable it to do all these cool things though.There are some guitars that have the special pickups built in and the output cable from the guitar is an RJ45 connector from memory. I don't think it is a really common kit in most musicians collections though, I could be wrong.