Need a circuit to determine if input audio is a single tone or multi-tone.

Thread Starter

Videosplicer

Joined Aug 4, 2025
14
How do you propose to tell the difference between two tones and a single tone with lots of harmonics.
For instance, a guitar note at 100Hz will have harmonics at 200Hz, 300Hz, 400Hz and 500Hz.
What would be the difference between a 100Hz tone with its harmonics and 100Hz and 300Hz tones played simultaneously?
That's a great question, perhaps using a band pass filter or the amplitude of the note vs harmonics?
 

Thread Starter

Videosplicer

Joined Aug 4, 2025
14
I am a musician, guitar player, electronics engineer and MCU programmer. I will explain why multiple band pass filters would not work and FFT is your best solution.

The guitar fret board covers over 72 notes. If we were to focus on just the notes around the open strings, you would need 24 highly tuned filters to cover two octaves from the low E on the 6th string (82 Hz) to E on the 1st string (330 Hz).

Let us look at a classic A major chord on the open string formation.
E 82
A 110
E 165
A 220
C# 278
E 330

A major triad chord has the root, third, and fifth notes. For A-major chord, these notes are A, C#, E.
If we wanted to detect these three notes on the top three strings, we would need to differentiate between the following notes:
A 220
C# 278
E 330

A power chord has the root and fifth notes:
A 220
E 330

Three adjacent notes are:
Ab 208
A 220
A# 233

Hence the band-pass filter for the note A at 220 Hz has to have a bandwidth of 12 Hz (±6 Hz or ±3%). And you would need 24 such filters.

Certainly, FFT on an Arduino is not fast enough. There are faster MCUs, such as STM32 ARM MCUs that are capable of performing FFTs in under 1 ms.

For your reference, here are the notes and frequencies on the guitar.

View attachment 353577

Reference: https://douglasniedt.com/frequency-chart-for-notes-on-the-guitar.html
Thank you for your in depth explanation. FFT is for sure the best way, but as you pointed out, it requires a capable CPU. This is for a guitar project which is already quite complicated hardware wise. I simply want to take a different action if a single note or multiple notes are played, specifically not acting when more than one note is played. I recall the older octave dividers only reliably worked with single notes, and my project is similar so I want it to act differently when more than one note is played. Fortunately, this multi note detector is going to be an optional add on board - so I could conceivably use a dedicated processor on that board to run FFT. Thanks again for your response, I'm going to cut and paste it into a PDF for future reference!
 

MisterBill2

Joined Jan 23, 2018
27,978
I anticipate that "an FFT" will need to be actually several parts of a VERY FAST spectrum analyser.

BUT, then there is also the possible option of amplitude evaluation: Compare the amplitude of the first sensed toe, and compare that with the amplitude of the whole spectrum under consideration. That might be adequate. It could certainly be simpler. Possibly worth a bit of thought, at least.
 

Thread Starter

Videosplicer

Joined Aug 4, 2025
14
Another vote for FFT. The exact tool for the job, it analyzes in the frequency domain instead of the time domain.

But I'm skeptical it (or any tool) can sort out guitar music the way you'd like. It's just too complicated. You might prefer to use something like The Amazing Slow Downer combined with your own hearing.

Maybe if you can elaborate on the big picture of what you want to accomplish?
I use The Amazing Slow Downer to figure out guitar parts, but this is for an electronic project. I don't need to know the frequencies played, just if more than one note is being played at the same time. It's really more of a trigger or not to trigger type thing. The hardware project would take and perform a different action based on the detection type.
 

Thread Starter

Videosplicer

Joined Aug 4, 2025
14
You mean an arpeggio.
What about slurred notes, bends, hammers, double stops?
For my purpose, I would consider slurred notes, bends, and hammers as single notes and the double stops as multi notes ...unless hammering on two or more strings at the same time! Really, I am more interested in finding out when the sound starts if it is one note or more. So my interest is more focused on when the sound starts, not what happens to the note after it is picked (slides, hemmers, etc.) So for example, playing an arpeggio would not be an issue because the trigger is the first string picked, not the rest of the arpeggio. Similarly, a slide or hammer on pull offs are the same - the first note is the trigger, I don't care what the technique used is after the trigger point. However, I do need to know at the trigger point if two notes are being played or not. I guess another way to do what I need is to use a hex pickup and see if multiple stings are being picked?
 
Last edited:

Thread Starter

Videosplicer

Joined Aug 4, 2025
14
Thank you for your in depth explanation. FFT is for sure the best way, but as you pointed out, it requires a capable CPU. This is for a guitar project which is already quite complicated hardware wise. I simply want to take a different action if a single note or multiple notes are played, specifically not acting when more than one note is played. I recall the older octave dividers only reliably worked with single notes, and my project is similar so I want it to act differently when more than one note is played. Fortunately, this multi note detector is going to be an optional add on board - so I could conceivably use a dedicated processor on that board to run FFT. Thanks again for your response, I'm going to cut and paste it into a PDF for future reference!

BTW, I have built Craig Anderton's guitar note picker (from his DEVICE Magazine - 1979) and Ethan Winer's too - both of which work very well. Craig's works well with chords too, I will probably end up using his design.

Ethan Winer's project:
https://audioxpress.com/article/you...olled-synthesizer-input-section-pick-detector
I am a musician, guitar player, electronics engineer and MCU programmer. I will explain why multiple band pass filters would not work and FFT is your best solution.

The guitar fret board covers over 72 notes. If we were to focus on just the notes around the open strings, you would need 24 highly tuned filters to cover two octaves from the low E on the 6th string (82 Hz) to E on the 1st string (330 Hz).

Let us look at a classic A major chord on the open string formation.
E 82
A 110
E 165
A 220
C# 278
E 330

A major triad chord has the root, third, and fifth notes. For A-major chord, these notes are A, C#, E.
If we wanted to detect these three notes on the top three strings, we would need to differentiate between the following notes:
A 220
C# 278
E 330

A power chord has the root and fifth notes:
A 220
E 330

Three adjacent notes are:
Ab 208
A 220
A# 233

Hence the band-pass filter for the note A at 220 Hz has to have a bandwidth of 12 Hz (±6 Hz or ±3%). And you would need 24 such filters.

Certainly, FFT on an Arduino is not fast enough. There are faster MCUs, such as STM32 ARM MCUs that are capable of performing FFTs in under 1 ms.

For your reference, here are the notes and frequencies on the guitar.

View attachment 353577

Reference: https://douglasniedt.com/frequency-chart-for-notes-on-the-guitar.html
BTW, I have built Craig Anderton's guitar note picker (from his 1979 DEVICE Magazine, issue 1) and Ethan Winer's too - both of which work very well. Craig's works well with chords too, I will probably end up using his design.
 

wayneh

Joined Sep 9, 2010
18,133
BTW, I have built Craig Anderton's guitar note picker (from his 1979 DEVICE Magazine, issue 1) and Ethan Winer's too - both of which work very well. Craig's works well with chords too, I will probably end up using his design.
Just wondering if you've had any luck.

What got me thinking is a brief article about "the chord" that opens the Beatle's "Hard Day's Night". It's distinctive and how it was created was a mystery for decades until a spectrum analyzer using AI was able to de-mix it.
 

drjohsmith

Joined Dec 13, 2021
1,630
how accurate are the frequencies of the guitar, ie. do you need to detect in an out of tune guitar ?

there is something called the goertzel algorithum, which is an efficient way to generate a frequency , or to detect a frequency.,

https://en.wikipedia.org/wiki/Goertzel_algorithm

also , if your into arduino, the teensey arduino runs at 100 plus Mhz and has a great set of audio libs that use the dsp features of the chip.

Im wondering , where is this comming from ?
sounds like an assignment
 

MisterBill2

Joined Jan 23, 2018
27,978
I asked specificly about the purpose in post #20 and we got a very general description in post #22, that the application was some sort of processor, which would probably be working in "real time", rather than post-processing the signal..
THAT would require a very rapid determination of chord versus single note. An alternative, simpler scheme would be a pedal for the player to control the application of the function. OR, an interesting alternate concept, if the strings were electrically separated, would be sensing string contact. That would not work for any "Eric Clapton" class of player, though.
 

drjohsmith

Joined Dec 13, 2021
1,630
just wondering what is meant in this case by "real time"

for instance , if you strike a cord , how long does it last ?
thats how long there is to detect it ,
is this to detect a cord mid tune, or stand alone ?

im not a musician , but a stand alone cord is going to be a good few seconds, its whats the shortest mid tune chord you want to detect.

do we know what that minimum time needed to detect a chord is ?

this might be of interest
https://www.pjrc.com/teensy/gui/?info=AudioAnalyzeFFT1024

a 600 Mhz processor
https://www.pjrc.com/store/teensy41.html
 
Last edited:

MrChips

Joined Oct 2, 2009
35,017
There is a PC program that displays notes and chords as they are being played in real-time. It has been a long time ago when I last used it.
I wrote a similar program in MATLAB but again, that was a long time ago.
 

MisterBill2

Joined Jan 23, 2018
27,978
In general, as in my use above, "Real Time" means "as the input/event is occurring", rather than after the event has happened. The term probably originated back in the 1950's era in the IRIG (Inter-Range Instrument Group) doing rocket development projects, to distinguish between recorded data and data that was being analyzed as it was generated. That included computer analysis.
 

MrChips

Joined Oct 2, 2009
35,017
"Real Time" is a misnomer because any type of digital signal processing has to take some time to process. "Real Time" must specify the acceptable delay between the time of event and the processed results.

For recognition of notes on a musical instrument, 100-500 ms delay would be acceptable in my opinion.
 

wayneh

Joined Sep 9, 2010
18,133
For recognition of notes on a musical instrument, 100-500 ms delay would be acceptable in my opinion.
Unless you're trying to make some other instrument play along. Half a second is a long time to be behind the rest of your band!

But the TS said in #1 he wants to distinguish single notes from chords. I have no idea what happens next.
 
Top