Piano Tuning Patch assistance please

LMomrelle's icon

I'm having some trouble creating a Piano tuner in Max MSP using the "ftom" and "ftom~" objects. the problem is the values these objects are returning (which should be a midi value) keep on changing as if it is including harmonics or something. does anyone know how to get past this problem?

woyteg's icon

yes thats right, it simply takes a value in Herz and translates this to midi note. To my understanding these objects are not thought for fundamental or pitch detection.
I think there should be at least two on maxobjects.com
good luck!

Mike S's icon

Yes, [pitch~] would be a good place to start.

Home Surgery's icon

If you get this done, please post it. It would be very interesting.

Do you think you can make it accurate. Tuning pianos isn't exactly easy.

john.baq's icon

It would be interresting to hear how it worked out.

Nau's icon

Piano tuning is a very complicated challenge.
It deals with psychoacoustics besides "well tempered scaling" ;-)!
I mean that your ear connected to your brain doesn't perceives the objective pitch but reelaborates it in function of the context (chords,upper or lower register,...). Furthermore what would be your definition of a pitch ? As notes played on a piano are never strictly harmonic the 'basic' definition of pitch cannot be relyied on ...

Good work anyway ...

Gregory Taylor's icon

My first thought was, "Wow. This *must* be some kind of project assignment. No one who really tunes pianos seriously would be likely to consider some kind of automation (a la guitar tuners) for doing the work.... :-)

Gregory Taylor's icon

Now, a Max patch that you could use to do the temperament bit? That would um... be interesting!

mudang's icon

All of the FFT-based frequency estimators [fiddle~], [pitch~], [sigmund~] won't be accurate enough for tuning (a piano) - especially in the low register.

I'd rather use a time-domain algorithm. For example [gbr.yin] from the FTM lib or [mbc.pitch~] from Mark Cartwright's LPC Toolkit - both use the Yin algorithm based on autocorrelation.

Or maybe max6's new wavelet pitch detector - haven't tried that one yet...

ch's icon

An interesting paper about piano tuning :

mzed's icon

fzero~ has fine resolution in the low frequencies, but it might not be great at piano. This would be especially true if some of the strings are detuned.

The Yin algorithm is probably the best bet.

roger.carruthers's icon

Anyone care to take a bet on how long it will take for the bot formerly known as ndrewoods to spam this thread ;) ?
Cheers
Roger

Roman Thilenius's icon

110 minutes.