Biquad cut off frequency – midi control

Mar 12, 2011 at 3:52pm

Biquad cut off frequency – midi control

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

#55496
Mar 12, 2011 at 4:48pm

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

#199673
Mar 12, 2011 at 4:57pm

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

#199674
Mar 12, 2011 at 5:25pm

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

#199675
Mar 12, 2011 at 5:32pm

Thats great, Thank you very much for your help!

James

#199676
Mar 12, 2011 at 5:33pm

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

#199677
Mar 12, 2011 at 6:14pm

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. –
#199678
Mar 12, 2011 at 7:22pm

psychoacoustic reasons? :) or godwins law.

the solution is [mtof], btw.

#199679
Mar 12, 2011 at 8:13pm

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

#199680
Mar 12, 2011 at 8:20pm

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

#199681
Mar 12, 2011 at 8:21pm

“gain sliders”

just the example I was grasping for…

#199682
Mar 12, 2011 at 8:23pm

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.

#199683

You must be logged in to reply to this topic.