Controlling frequency with slider in MSP

Oct 6, 2009 at 9:42pm

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

#45754
Oct 6, 2009 at 9:47pm

I think that [mtof] will be your friend. It will turn midi values into the related frequencies in hertz.

lh

#164981
Oct 6, 2009 at 9:52pm

#164982
Oct 7, 2009 at 12:31am

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

#164983

You must be logged in to reply to this topic.