Electronic Guitar Tuners

I am being asked to design a gadget that has some special features, but also includes a guitar tuner. I have looked at the web a bit, but not found any good references that show exactly how a tuner works. One paper I found talked about a rather complex "constant Q transform". I just don't think the $10 tuner I have uses anything that complex. I'm thinking they are doing a PLL sync to the input or something more like that.

One reference I found talks about using a peak detect to measure period rather than frequency like an FFT. I would think the FFT has too little resolution unless it is very long.

Anyone know how the commercial low end gadgets really work? Maybe I'll take mine apart, but my bet is they are using chip on board with the die under a dab of black goo.

Rick

Reply to
rickman
Loading thread data ...

I think you're generally right. It has to be very simple, and since the proper frequencies of the notes are deterministic and reasonably spaced it allows some simplifying assumptions.

That said, by far my favorite type of guitar tuner is an LED optical tuner:

formatting link

That's even simpler to build and has a number of advantages, like you can use it in a noisy environment. I've also found that I can tune more accurately with one of these than a chromatic tuner.

If your application allows that sort of thing it might be worth considering.

Eric Jacobsen Anchor Hill Communications

formatting link

Reply to
Eric Jacobsen

Interesting idea. By optical I assume it means this is a stroboscope. The description talks about the "two out-of-phase LED light beams", but I assume that is just for brightness or do you think they are doing something fancy with timing? Are the two LEDs the same color? I guess if you pulse one LED at the fundamental and another at 1/3 the fundamental a 2x or 4x harmonic string will be fuzzy while just using the fundamental will also look right for any harmonic strings. It also doesn't require picking just one string. I may have to build this just for my own curiosity!

I don't think the customer will go for this, but I can't say until I talk to them about it. It won't work in really bright light, but I don't know if this is a problem.

Thanks,

Rick

Reply to
rickman

I always thought that they did zero-cross detection, but never looked inside. For the price, it has to be a microprocessor with very little analog circuitry. Maybe a digital version of a PLL, but I doubt an analog one.

$10 tuner, minus store markup, doesn't give much to buy the parts with.

-- glen

Reply to
glen herrmannsfeldt

Two red LEDs, and I *think* they just strobe at the expected fundamental freq. They're separated in space over about 1/4" when projected onto a string, so you see the beat motion of the string when the rates don't match and the two illuminated parts of the string are still when the rates match (i.e., it is in tune).

For six bucks you can buy one and play with it.

I bought a bunch of them on sale once, and haven't used any other type of tuner since (for guitars, anyway).

Eric Jacobsen Anchor Hill Communications

formatting link

Reply to
Eric Jacobsen

Update: If you search YouTube for PlanetWaves SOS Tuner you'll find a few vids, but this one seems to have the best view of how it looks on a string:

formatting link

Eric Jacobsen Anchor Hill Communications

formatting link

Reply to
Eric Jacobsen

e

There's a whole sub-culture of there of DIY guitar players - making their own stompboxes etc. So using the almighty google and searching "DIY guitar tuner" gives some useful results. You can take a look at the circuitry in some of these links to see what they're using:

formatting link

formatting link

formatting link

formatting link
/?ALLSTEPS

Cheers, Dave

Reply to
Dave

AFAIAA, the algorithm generally works on cross correlation between the input and a reference frequency, which would be the intended frequency of the string. That's the way I'd do it.

The guitarists I know generally use phone apps nowadays.

Reply to
Bruce Varley

Since you are interested only on the fundamental frequency, not the harmonic content, my first crude attempt would be to low-pass filter, amplify, clip and measure the period.

No, I don't know how they do it either. If I find it, I may vivisect the tuner I have *somwhere* at home.

-- Roberto Waltman

[ Please reply to the group, return address is invalid ]
Reply to
Roberto Waltman

Thanks, Eric. That makes the whole thing dead-obvious as to how it works. And it illustrates how to use electronics to supplement and augment the human brain and anatomy to produce something cheap and effective and appropriate all in one go.

I just love stuff like that.

Damn easy to do. I could punch one out in short order right now, just seeing that. (Kind of like Galileo just hearing about the invention of the telescope and from that and nothing else knowing what needed to be done to make one. hehe. Though I'm no where near as smart.)

Jon

Reply to
Jon Kirwan

e

I've always assumed, (maybe wrongly) that they basically amplify and clip to one bit, and something like a simple IQ demod

-Lasse

Reply to
langwadt

That is a pretty good illustration of how it works. I would not have thought about using the two LEDs to in essence do the same thing as quadrature sampling. I think I'll push the customer to use this.

Since you are familiar with the unit, I assume it doesn't get washed out if the room is brightly lit? I would think it wouldn't work so well outside. Of course the other downside is that you have to tell the unit what the note is, so it only works for a fixed set of notes. Actually I could come up with something that would sample the note to control the LED rate rather than use a control.

Actually, for the other functions, the unit has to be plugged into the guitar so the customer might not like this, but it is worth a try. It is definitely the inexpensive option, both recurring and non-recurring costs.

Rick

Reply to
rickman

The fundamental is not necessarily the strongest. Often the second harmonic is stronger... or first harmonic depending on your terminology (0/1 based). I have done similar things, but not where I didn't know the input freq. Here you have to first figure out which string is being played.

The cross corr will give you a number. I'm not sure it tells you much about the frequency. If you sweep the ref freq, you can get a function of frequency which should give a peak at the fundamental... once you know where to look. I guess trial and error of the six basic notes would work for most situations.

There's no accounting for taste! This is one function of a multi-function device. I didn't even know they wanted it to do the tuner part until an email yesterday.

I have some ideas now to try. I like sweeping the cross corr. A quick sweep will give the note. Then sweep around the note with progressively slower passes to refine the frequency. An NCO will do a good job of that with very high resolution.

Rick

Reply to
rickman

(snip)

The ones I know of don't tell you which octave, only which note. So the second harmonic is just as good.

-- glen

Reply to
glen herrmannsfeldt

Except that for stringed instruments the harmonics aren't at exact multiples of the fundamental, so tuning to a harmonic may put the fundamental at a slightly different frequency.

People tune guitars accurately by ear using the harmonics (sort of) all the time, though, so it could be that the difference isn't significant.

Eric Jacobsen Anchor Hill Communications

formatting link

Reply to
Eric Jacobsen

i think the error to be first concerned about is not that the harmonics are slightly sharp of their integer-multiple value (relative to the fundamental). it's that just intonation (which is what you get when tuning strictly with the harmonics and nodal points) is not the same as equal temperament.

specifically: 2^(5/12) is not exactly the same as 4/3 .

--
r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."
 Click to see the full signature
Reply to
robert bristow-johnson

(snip, I wrote)

That is true, but for most they aren't so far apart. The piano bass strings use copper wire wrapped steel to add more mass, but not so much more stiffness. (It is stiffness that shifts the harmonics.)

If you want to get that close, then you have to worry about the difference between well-tempered and equal-tempered, and most people don't do that. The ear is especially sensitive to beats, but not so sensitive (compared to a frequency counter) to absolute pitch. Also, if a higher harmonic is louder, then that is likely the one you will hear.

Though the tuners I know about aren't specifically for guitars. They are used for flutes, violins, and many other instruments, though those could still have significant harmonics.

-- glen

Reply to
glen herrmannsfeldt

That will bias you towards Just or even Pythagorean temperament. Might be a problem, might not be.

-- Les Cargill

Reply to
Les Cargill

formatting link

Thanks, I did that and found a few dozen myself. I learned a lot from a wikipedia page on commercial products including some that are high end and strobe based. That might be a useful way to go. I just have to find something that isn't too much work.

Rick

Reply to
rickman

formatting link

do you think auto-correlation is too much work?

--
r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."
 Click to see the full signature
Reply to
robert bristow-johnson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.