Forums > MaxMSP

Biquad cut off frequency – midi control

March 12, 2011 | 3:52 pm

Hi,

Im trying to control the cut off frequency of the biquad with a midi control but as midi is 0 127 and the frequency is 20-20000hz when using the scale object it jumps when it reaches around 600hz as its not a smooth scale.

This is probably a very simple solution to this but i can seem to find any information on it.

Any help would be appreciated.

Thanks


March 12, 2011 | 4:48 pm

I’m not sure what you mean exactly by "it jumps"; but I would ask [slider] to output float values, then multiply that value by 100. You know you can add an exponential value to [scale] as a fifth argument, c. 1.02 – 1.06 usually works. Post a patch for math-phobes like me….

Brendan


March 12, 2011 | 4:57 pm

Sorry for the poor description!

A patch is attached. basically when you move the top dial (which represents a midi input as it moves between 0 – 127) you will see it wont smoothly control the filter cut off.

Thanks


March 12, 2011 | 5:25 pm

I see

filter cutoff values are scaled to be non-linear, probably for psycho-acoustic reasons beyond me – however, you can address this by doing what i suggested in my first response; add the value 1.08 or 1.09 to the [scale] arguments and you’ll get a more linear response in the low-mid region:

– Pasted Max Patch, click to expand. –

Brendan


March 12, 2011 | 5:32 pm

Thats great, Thank you very much for your help!

James


March 12, 2011 | 5:33 pm

Look at the [expr] helpfile too, for more maths fun!


March 12, 2011 | 6:14 pm

Here’s an example where the incoming MIDI control value (0 to 127) can be scaled to cover any desired pitch range (in terms of MIDI pitch number), and that pitch range is then converted to frequency in Hertz.

– Pasted Max Patch, click to expand. –

March 12, 2011 | 7:22 pm

psychoacoustic reasons? :) or godwins law.

the solution is [mtof], btw.


March 12, 2011 | 8:13 pm

filter cutoff values are scaled exponentially in the upper and lower extremities, as human hearing tends to centre around the critical midrange, and deteriorates at those reaches. Or so I’m led to believe. Someone back me up? Fletcher-Munson?

Godwin? Hardly applicable here.

:-)

Brendan


March 12, 2011 | 8:20 pm

if you really want that, they are scaled somehow, i agree. just as with gain sliders.

but i guess his question was the result of him using the linear input as is, without
any conversion from linear to frequency.

and in lesson 2 we should tell him about interpolation.

fletcher munson? that is frequency to gain … i think we only need the bose-einstein
mtof trick. :D


March 12, 2011 | 8:21 pm

"gain sliders"

just the example I was grasping for…


March 12, 2011 | 8:23 pm

yeah. there was someone talking about gainsliders here at the forums like 6
months ago or so … i remember me googling for an industry standard in
order to make an abstraction, but there seems to be none.


Viewing 12 posts - 1 through 12 (of 12 total)