On Thu, 25 Nov 2004, Niklas Saers wrote:
I'm relatively new to the Pd community so I'm not quite sure where would be a good place to announce this, so I guessed that this would be a good place: I have written an external object that takes a float with amount of Hz a sound is and determines the note of this tone. I.e, 440 is A, 415 is a 1¢ low Ab with a 0.174 Hz error (thus not quite as low as 1¢, but almost 1¢).
Candid question: what's the advantage of that over the builtin [mtof] class?...
Then it's easy to postprocess the result of mtof to split it into:
(Hz) | [mtof] | [expr int($f1+0.5); $f1-int($f1+0.5)] | | [expr int($f1/12); $f1%12] | | | | (octave) (note) (cents)
(caveat: ideally, % and int would be replaced by mod and floor, but the latter aren't in pd afaik)
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju