DIGITAL GUITAR AUTO-TUNER PROJECT

Apparently, the very high and very low notes on pianos are tuned with a larger than 2:1 octave. The ratio can be up to 2.025:1. The claim(1) is that that this is caused by beat matching, trying to match the fundamental to the 2nd harmonic, which is slightly off due to the stiffness of the strings.

Thus, it may not make sense to do precise electronic tuning on stringed instruments. I always find that my guitar sounds better when I match the harmonic on the 5th fret of the bottom string to the top string, and then interpolate. That makes the high E somewhat sharp (but not nearly as sharp as a piano, due to the lower string tension.)

(1) Musical Acoustics, Donald Hall, pg 188.

--
Regards,
  Bob Monsen
Reply to
Bob Monsen
Loading thread data ...

Yes indeed.

Use a 32 or 64 point FFT (with about 10 Hz bins) to detect the lowest frequency. This can be done in a few hundred milliseconds.

After this decision, you are within about 10 Hz of the actual frequency. If you have enough memory, buffer the first tap on the string and rescan the samples to determine the frequency error.

If no data memory is available, analyze the next tap on the string to determine the frequency error.

Paul

Reply to
Paul Keinanen

The Fourier analysis assumes that you have a constant amplitude _repeatable_ waveform, unfortunately a string instrument does not generate such signals, so you have to analyze some part after the initial transient.

Paul

Reply to
Paul Keinanen

I know. I was just giving an example that was guitar-specific in response to a point that someone else made that equal temperament was bad.

Reply to
Jon Harris

Even though I have no idea what s.e.d. stands for, I doubt you can implement selectable intonation without getting into the firmware. In a YDP-233, one can chose among equal temperament (the default), or pure major, pure minor, Pythagorean, mean tone, Werkmeister, and Kirnberger, all with any base note. You can also transpose any number of half tones and pull the pitch of A440 in about .2 Hz increments from 427 to 453. It doesn't sound like the Steinway it replaced (my daughter has that now), but it's fun to play with as well as on. It will record two tracks and has a MIDI interface. More than I need.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

A piano's "stretch" over its 7.5 octaves is the better part of a semitone. By attaching discrete weights to the strings, most of the inharmonicity can be removed. (The windings on the low strings end well short of the bridges, reducing inharmonicity of the second partial.) A piano so doctored is tuned without stretch. It sounds awful!

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

I agree. One point of quibble: even if the overtones were frequency locked, the wave shape would still change with time. Different overtones have different decay rates.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

I read in sci.electronics.design that Jerry Avins wrote (in ) about 'DIGITAL GUITAR AUTO-TUNER PROJECT', on Mon, 25 Apr 2005:

It stands for a very great deal, and it's the newsgroup you are participating in.

--
Regards, John Woodgate, OOO - Own Opinions Only.
There are two sides to every question, except
'What is a Moebius strip?'
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
Reply to
John Woodgate

...

Winding adds far more mass than stiffness, making the string more harmonic. Some materials are better than others. Fine silver is used for violins and cellos. Gold is be better. :-)

There was a guy around Princeton who tuned pianos for concertos and quintets that almost changed the character of the music. It would soar. I can't remember more, and the one guy I could have asked is no longer around.

Yeh. :-(

Mine comes and goes.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

Thank you for the thorough explanation!

The tuners I've been using seem to be able to guess the tone within one half, i.e. 5.9% in frequency. This seems to work pretty well, even though the detection is sometimes inconviniently slo.

However, I've always suspected the tuner measures the frequency directly and after that finds the nearest note from a LUT and then calculates the remainder. There is a LED bar display to show which note (A, A#, B, C, ...) is playing and then an analog meter to show the deviation from the even temperament (+-50 cents).

The tuner is quite fine with violins, flutes, and even piccolo flutes, but not very good with cellos, double basses, bass viols or other low instruments. It does find the correct note, but the detection is then very sensitive to higher-frequency noise.

But wouldn't a combination of an AGC and a hysteretic comparator be still better? The saturating stage does give some false zero crossings even though it filters out a lot. But shouldn't hysteresis filter all false crossings out, if the sum of amplitudes of harmonics is smaller than the hysteresis?

--
PLL, anyone? DPLL? In a way a PLL would be the right way to do this,
as the frequency under measurement changes slowly. Locking is,
as usual, a big challenge.
Reply to
Ville Voipio

I've agreed so far, but not here. The zero crossings of the comparator's input and output had better coincide in time (with offset allowed for hysteresis). Those squiggles away from the crossings will be suppressed, but they don't matter anyway.

Some wouldn't even call it DSP, but I processed many signals that way for many years.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

s.e.d. = sci.electronics.design. I think this was a joke, playing off the word "temperament". Get it?

Reply to
Jon Harris

Depends on the fretted instrument. The idea of fixed frets is a new one, older instruments tend to have movable frets. My viol (viola da gamba) has tied frets, and I really have to move them depending on the temperament. Actually, the deviation from even temperament is very visible (some frets are closer to each other than others). And talking about bending... some of the frets are actually non-horizontal to give better temperament.

Pianos are sometimes tuned in even temperament. Sometimes not, many tuners like to make them slightly tempered some way or another. It is a common misconception that the even temperament was invented by J.S.Bach (Wohl-temperierte Klavier). The even temperament was well known in the baroque era -- well known to be a bad compromise. What Bach discovered was yet another temperament system which allowed him to play in all keys. The keys sound fine but different.

I want to make it clear that I don't have any golden ears, which would be able to detect the frequency down to microhertz. But the fact is that I have to tune my frets to suit the needs and temperament of the rest of the band. In that task a tuner makes life much easier (without the golden ears I can only say something is wrong :)

I know it sounds a bit odd, but early music (especially baroque) players use auto-tuners a lot. For example, tuning a harpsichord without a tuner takes much longer. It is still possible with some experience on listening to the weak harmonic beats, but slower. Or, keeping a viol consort in tune during a longer concert is much easier with some fixed frequncy reference.

Yes, I know him (not personally, though). No, I am nowhere near that level.

(I just wonder if there was anything not off-topic in this posting?)

- Ville

--
Ville Voipio, Dr.Tech., M.Sc. (EE)
Reply to
Ville Voipio

I read in sci.electronics.design that Jerry Avins wrote (in ) about 'DIGITAL GUITAR AUTO-TUNER PROJECT', on Mon, 25 Apr 2005:

Why would gold be better? If it's density, depleted uranium should be even better!

--
Regards, John Woodgate, OOO - Own Opinions Only.
There are two sides to every question, except
'What is a Moebius strip?'
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
Reply to
John Woodgate

The numbers I saw last time I looked at were only an RCH apart at ~19.3 gm/cm^3 (along with tungsten). Osmium, rhenium, iridium and platinum are a fair bit higher; plutonium a bit higher.

formatting link

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

That is interesting. The book I referenced mentioned another possibility for why the stretch occurs. The human ear has far less ability to discriminate pitch at low and high frequencies than it does in the middle range. The other possibility was that the extra bit was required to overcome this inability, forcing the ear to hear an octave. However, the text also states that studies by Backus indicate that the mechanism of string inharmonicity accounts for most of the stretching..

I guess you have listened to these pianos. Do the high strings sound flat?

--
Regards,
  Bob Monsen
Reply to
Bob Monsen

I have a friend who claims to have had perfect pitch until her 55th birthday or thereabouts, at which point her perfect pitch started to go low (or high, I can't remember which). Anyway, it disturbed her quite a lot, because it made her favorite recordings seem out of pitch. I guess it would be like having all your green things suddenly turn yellow. You might get used to it, but it would be disconcerting.

Regards, Bob Monsen

Reply to
Bob Monsen

Ah! I'm subscribed to comp.dsp. Ain't cross posting fun?

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

Ahh but Jerry(and others)lurk(s) on comp.dsp ;) The joys of cross posted threads ;}

Reply to
Richard Owlett

I do now. It's a pretty good one for off the cuff, as it were.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

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.