Mysterious tuning

mimi2000's icon

This is probably something really obvious, but when I set the base frequency in mtof to anything other than 440hz, when I play an octave on my keyboard, cycle~ is out of tune (the scale wavers).
The further away I set the base frequency from 440hz the worse the problem gets. At 400Hz when I play an octave on my keyboard the audio does not even resemble a musical octave. It seems that the only time the keyboard is correctly callibrated is when the base frequency is set to 440Hz.

I need to be able to tune the base freq and keep the scale across the keyboard correctly callibrated musically.

Can anyone advise how to do this?

Any help appreciated.

snth1.maxpat
Max Patch
Wetterberg's icon

huh. That does sound like a bug.

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

you can always do the offset *before* the mtof - mtof accepts floats no problem:

mimi2000's icon

Thanks Wetterberg - I have tried what I think you mean (I am relatively new to Max and wasn't overly clear on your patch). When I play A3 on my keyboard it is OK, but across octaves it is not working as it should do calibration wise. Would it be rude to ask if you could modify the patch I posted above to demonstrate what you mean? Thanks

Wetterberg's icon

you need to include the synth voice poly file, too. Otherwise I can't test anything.

mimi2000's icon

Patch attached. Thanks so much for looking at it.

synth_voice.maxpat
Max Patch
Wetterberg's icon

just put the offset between the unpack and the mtof.

mimi2000's icon

Thanks Wetterberg. I tried what you suggest, but I am still confused.

The offset you refer to does not (to me) seem to relate to frequency, and I can see no obvious correlation between the mtof offset and the resulting frequency.
If you have a keyboard handy you'll know what I mean.

Cheers again.

Wetterberg's icon

I'm wondering how that offset could *not* relate to frequency... it's literally directly connected to the MidiTOFrequency object...

mimi2000's icon

What I mean is there does not, to me, appear to be an obvious correlation between the unit of offset and frequency - ie 1Hz does not relate to 1 incremental offset unit. Do you know the correct calibration formula so that this will be in tune?

stringtapper's icon

Forgive me, but I don't see any offset being applied to the pitch in the initial patch (i.e. the patch doesn't actually demonstrate the problem you say you're having).

Roman Thilenius's icon

what stringtapper said.

Wetterberg's icon

yeah, I'm not getting it either. Perhaps try building something that works for you without a poly environment, and then add that in later on? I know I was able to test octave accuracy with mtof after an offset in a matter of seconds.

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

Agreed. Changing the base frequency in mtof does not appear to cause any inaccuracies.

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

Here's a little tutorial patch for experimenting with equal-tempered tunings.

mimi2000's icon

Thank you so much for your help. It's working fine now. It turns out that I had not linked to the ammended and saved synth voice patch in the inspector.