frequency to pitch

Dorothy Hindman's icon

Any way to convert frequencies to pitches to the nearest quarter tone in Max?

Max Gardener's icon

Perhaps you'd find the "pitch detection" tab for the retune~ help file to be one place to start.

Roman Thilenius's icon

Hz
[ftom]
[* 2.]
[round]
[* 0.5]
nearest quarter tone

Dorothy Hindman's icon

I'm looking for the actual name of the pitch, as in C or B, rather than the midi note number. Thanks for the help so far. Will check out the retune object.

Dorothy Hindman's icon

I don't seem to have the retune~ object?

Wetterberg's icon

>I don’t seem to have the retune~ object?
Then you're not in max7.

>I’m looking for the actual name of the pitch, as in C or B, rather than the midi note number.
Max supports converting from a midi pitch into whatever you want it to be called. There are no turnkey solutions to anything, though.

Evan's icon

[% 12] will get you the note degree. Then just translate that to pitches using a dict or coll something else.

Wil's icon

i just did it in 2 minutes using fzero~.
going to spend some time with retune~ see if that is any more accurate.

Max Patch
Copy patch and select New From Clipboard in Max.

(look in the inspector of the integer box > appearance > display format .. you can change it to display midi pitch after you convert ftom.

Wil's icon
Max Patch
Copy patch and select New From Clipboard in Max.

here it is using retune.

stringtapper's icon

Did the OP say she was trying to pitch track incoming audio?

If you just want to show MIDI pitch names then the number box object set to "MIDI" in the "format" portion of the Inspector is the way to go.

Wil's icon

the original question assumes pitch tracking.

Evan's icon

@Wil - "the original question assumes pitch tracking."

No it doesn't. If you read it literally, which you should, he just wants to translate frequencies in Hz, to note names. No mention of pitch tracking. Assuming anything on the internet is a bad practice.

Wil's icon

@Evan . please don't be condescending. you could have offered an alternative solution that proves why converting hz to pitch name might be necessary without an incoming signal like for giving an exam for class or to make some sort of reference chart.

Max Patch
Copy patch and select New From Clipboard in Max.

`