frequency to musical pitch dials?

alexmilo11's icon

hello guys, im making a subtractive synthesizer, learning maxMSP along the the way. i have a selection of oscillators some of which i would like to tune up or down in musical steps, as signal is 0-1 and the frequency gap of a step changes along frequency range, how would i do this?

also once the dial has its range set ie. -24 to 24 how would i set 0 as the default position of the dial, would i have to use a preset and select it every time the patcher is opened? or is there an better way?

sorry am new to this but any help would be much apreciated!
thanks

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

Not sure I understand your exact question or goal, but this example might help. Notice the "Range" and "Minimum" settings in the Inspector of the [dial] object, and notice the usage of [loadbang] to set initial values.

alexmilo11's icon

thank you that settles the default problem!

what i mean by tuning is:
the gap between C2 and C#2 is 4.89Hz (69.296 ‐ 64.406), whereas the gap between C4
and C#4 is 15.55Hz (277.18 ‐ 261.63)
so frequency cant be used to create a tuning dial as there isn't a set gap between the two notes and i need a dial that can tune + or - 24 semitones or 2 octaves so the tuning is musically relevant.
sorry if this isnt making any sense, thanks for the help!

alexmilo11's icon

which ive just realized your patch does! thank you!

alexmilo11's icon

if i was to chord an incoming frequency to the patch to be tuned, would this patch be able to do that or is it just the set frequency of 440? because i need it to work out the corresponding pitch of any frequency sent through it..?