Author Topic: Multiple Frequency Detection  (Read 4152 times)

0 Members and 1 Guest are viewing this topic.

Offline minibutmanyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Multiple Frequency Detection
« on: April 23, 2013, 10:21:23 pm »
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
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: Multiple Frequency Detection
« Reply #1 on: April 23, 2013, 11:04:48 pm »
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.
« Last Edit: April 23, 2013, 11:15:17 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline minibutmanyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Re: Multiple Frequency Detection
« Reply #2 on: April 23, 2013, 11:47:28 pm »
 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.
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Multiple Frequency Detection
« Reply #3 on: April 24, 2013, 06:38:45 pm »
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.

Offline hlavac

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: cz
Re: Multiple Frequency Detection
« Reply #4 on: April 24, 2013, 08:38:21 pm »
Many, many (one per note) narrow tuned band pass filters + envelope detectors? :)

But seriously, this is a job for DSP.
« Last Edit: April 24, 2013, 08:40:46 pm by hlavac »
Good enough is the enemy of the best.
 

Offline JackOfVA

  • Supporter
  • ****
  • Posts: 350
  • Country: us
Re: Multiple Frequency Detection
« Reply #5 on: April 24, 2013, 10:09:59 pm »
Many, many (one per note) narrow tuned band pass filters + envelope detectors? :)

But seriously, this is a job for DSP.

I'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.

 

Offline minibutmanyTopic starter

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Re: Multiple Frequency Detection
« Reply #6 on: April 24, 2013, 11:52:20 pm »
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.
 

Offline JackOfVA

  • Supporter
  • ****
  • Posts: 350
  • Country: us
Re: Multiple Frequency Detection
« Reply #7 on: April 25, 2013, 12:07:40 am »
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.

That'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.
 

Offline Hideki

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: no
Re: Multiple Frequency Detection
« Reply #8 on: April 25, 2013, 01:58:36 am »
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
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Multiple Frequency Detection
« Reply #9 on: April 25, 2013, 04:16:29 am »
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)
 

Offline Mike Warren

  • Supporter
  • ****
  • Posts: 437
  • Country: au
    • Personal Website
Re: Multiple Frequency Detection
« Reply #10 on: April 25, 2013, 05:40:27 am »
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.
 

Offline cwalex

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: au
Re: Multiple Frequency Detection
« Reply #11 on: April 25, 2013, 06:00:02 am »
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.

A 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf