Controlling frequency with slider in MSP
Hi,
I'm working on a modular-synth build in MAX/MSP. I want to control frequency with a knob or slider and am trying to find a way to constrain the values similar to the relative amplitude calculation used in Tutorial Four that changes integers from the slider into decibals. The slider only gives values from 1 to 127 and I want to convert to Hertz. Any ideas on this would be great.
If anyone else is working on any sort of synth builds in MSP, I would be interested in messaging with them.
Regards,
tortuga
I think that [mtof] will be your friend. It will turn midi values into the related frequencies in hertz.
lh
0. - 1. to frequency:
[* 127]
[mtof]
or:
[expr (440.*exp(0.057762265*(($f1*127)-69.)))]
0. - 1. to db/A:
[expr max((log10($f1)*20),-90.)]
numberfully yours
-110