Welcome to %s forums

BrainModular Users Forum

Login Register

linear to log/exp function for Hz

I need help on a Patch
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 14 Mar 2015, 15:47

this should be pretty simple maths and i feel ashamed to not be able to solve this.:rolleyes:


anyone knows what is the math or script code to convert a 'linear' input value to a exponential or log one, and what is the best to use for Hz .frequencies?
you know like equalizers have a typical log representation. tried log and exp but not sure the way to do..

I dlike kind of the same thing as the mapper curve module effect, with a 0-1 range 'linear' array on input that would output a frequency response according to min/max freq.,
or output a 0-1 range that i multiply by max freq.

or exactly the curve when you got a 0-1 fader swiched to log scale .

plz help!

Clearscreen
Member
Posts: 482
Location: Australia
Contact:

Unread post by Clearscreen » 16 Mar 2015, 03:09

I'm interested in this at the moment as well - anybody got any suggestions?

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 16 Mar 2015, 08:06

use the module power.
try various B coeff for example 5 or 1/5 depending of the scale conversion

with B = 5 we have

Freq(Hz) = 20000*power(ValueLinear,5)
ValueLinear = power(Freq(Hz)/20000,1/5)

choose the B coeff as you want ie 3,4,5,6


senso++

Fléau
Member
Posts: 99
Contact:

Unread post by Fléau » 16 Mar 2015, 11:41

For equalization purpose,
if we consider that 640Hz is the half value,
5 is the right coeff.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 16 Mar 2015, 21:19

thanks a lot for the help olivier!!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests