General
How to change linear fader behaviour to logarithmic?
Started by grillo on .
Sign in or create an account to join the conversation.
Hi all
it s a beginner question but i don t know how to change linear fader behaviour to a logarithmic behaviour?
I use osc lemur line.
Thank in advance
G
it s a beginner question but i don t know how to change linear fader behaviour to a logarithmic behaviour?
I use osc lemur line.
Thank in advance
G
Hi
Basic answer is you can't, there is no linear/log option as such . . .
But there are built-in functions for log() & log10() that give you natural (e) or common (10) logs . . .
Oh and also the pow() function . . .
These can be used in various ways in scripts, functions etc
Hope that helps, What exactly are you wanting to do?
MM
Basic answer is you can't, there is no linear/log option as such . . .
But there are built-in functions for log() & log10() that give you natural (e) or common (10) logs . . .
Oh and also the pow() function . . .
These can be used in various ways in scripts, functions etc
Hope that helps, What exactly are you wanting to do?
MM
I'm also interested in this question. In my case it is a softsynth that has logarithmic faders. I tried with the functions you mentioned, but failed to make it work. I should try again, invest more time and brain. Shouldn't be that difficult.
Thank you for the answer.Macciza wrote:Hi
Basic answer is you can't, there is no linear/log option as such . . .
But there are built-in functions for log() & log10() that give you natural (e) or common (10) logs . . .
Oh and also the pow() function . . .
These can be used in various ways in scripts, functions etc
Hope that helps, What exactly are you wanting to do?
MM
I need to use a log fader to control a duration knob, in a (Usine Hollyhock) granulation patch. In the granulation pach, this knob must be in a log mod. the scale is 2ms to 750 ms, and if i use linear fader to control this duration knob, it isn t sound good.
G
So
can you explain to me how to use this log () function?
i imagine that i have to write it in a script.
G
can you explain to me how to use this log () function?
i imagine that i have to write it in a script.
G
Hmm, I'm not a maths geek particularly . . .
It really depends on what exactly you want to do . . . (as always . . )
If you are using midi mapping type stuff to control things you are use values from 0-127 . . .
Things can interpret this differently to span various ranges in various ways . . .
Getting values to match up can be somewhat difficult in many cases . . .
Some specifics - first, Granulation can 'not sound good' quite easily depending on lots of variables....
Had a quick look a Usine H and the Granulator patch it also has a section that lets you alter its response
It looks like the Mapping pane lets you change how it responds to incoming midi from say a MultiBall in Lemur
This can give you a more linear response if that is what you are after - halfway across multiball is halfway through range
the other option would be to get Lemur to send its midi in a log/exp manner as needed . . .
Really need more info of what control or response you are after . . .
I'll see if I can do up some examples
It really depends on what exactly you want to do . . . (as always . . )
If you are using midi mapping type stuff to control things you are use values from 0-127 . . .
Things can interpret this differently to span various ranges in various ways . . .
Getting values to match up can be somewhat difficult in many cases . . .
Some specifics - first, Granulation can 'not sound good' quite easily depending on lots of variables....
Had a quick look a Usine H and the Granulator patch it also has a section that lets you alter its response
It looks like the Mapping pane lets you change how it responds to incoming midi from say a MultiBall in Lemur
This can give you a more linear response if that is what you are after - halfway across multiball is halfway through range
the other option would be to get Lemur to send its midi in a log/exp manner as needed . . .
Really need more info of what control or response you are after . . .
I'll see if I can do up some examples
Hi Macciza:
Anyway i will try to be as clear as possible:
I need to use a log curve fader to control a grain duration knob, in a (Usine Hollyhock) granulation patch.
The scale is 2ms to 750 ms and i wish prefer a log curve to control this values.
Thank a lot if you can answer
G
It s certainly because my english is so bad.Macciza wrote:Hmm, I'm not a maths geek particularly . . .
It really depends on what exactly you want to do . . . (as always . . ):
Anyway i will try to be as clear as possible:
I need to use a log curve fader to control a grain duration knob, in a (Usine Hollyhock) granulation patch.
The scale is 2ms to 750 ms and i wish prefer a log curve to control this values.
I Know that,"Some specifics - first, Granulation can 'not sound good' quite easily depending on lots of variables...."
Thank a lot if you can answer
G
I'm working on it I'll have a answer very soon
LogFader.zip
Not sure if this is right or not , it certainly appears to act like a log pot you can also scale its max and min values
Not sure if this is right or not , it certainly appears to act like a log pot you can also scale its max and min values
nice one!
Although in my case, I need exactly the contrary. This logfader makes the softsynth's faders behave even worse. But it's a good start. I guess I need an exponential fader that starts slowly from 0 and ends quickly to 127. The math I haven't found yet, I admit that it's a bit too much right now.
And then I'd need the feedback from the softsynth, which will be another task. I think it's not worth the effort. It's not such an important softsynth for me. Rather some kind of challenge.
But I hope this logfader will be of good use for others.
Although in my case, I need exactly the contrary. This logfader makes the softsynth's faders behave even worse. But it's a good start. I guess I need an exponential fader that starts slowly from 0 and ends quickly to 127. The math I haven't found yet, I admit that it's a bit too much right now.
And then I'd need the feedback from the softsynth, which will be another task. I think it's not worth the effort. It's not such an important softsynth for me. Rather some kind of challenge.
But I hope this logfader will be of good use for others.
wul wrote:LogFader.zip
Not sure if this is right or not , it certainly appears to act like a log pot you can also scale its max and min values
Thank you very much Wu!!
I hoped that it was more easy to develop this script. I can see it s not the case.
I m surprised there is no basic "ready" script in Lemur to easily change the scale of a Knob or a fader with log or exp scale.
Great job anyway
G
Should be easy enough to reverse the action , it can be made easier without the script and min max constants by putting the a?b:c logic in the value field of the fader
Hi All
I should pull some bits out of my test project and post them but here are some basics
Exponential fader can be done by creating a variable under the Fader xExp = pow(x, 2) then set its midi CC and scale 0 to 127.
For a basic log you could do the same ie xLog = pow(x,0.5) and similarly scale 0 to127
You can also invert the first one pretty by doing 1-pow(x-1, 2) to reflect it across x=y i.e. linear
You can also increase or decrease the numbers as needed to get different slopes . . .
Ultimately I guess you could use the log/log10 functions to get the values for particular ranges of output perhaps . . .
Hope that helps....
Also re the Usine request - Have a look at Usine H and the Granulator patch - It also has a section that lets you alter its response to incoming midi
I should pull some bits out of my test project and post them but here are some basics
Exponential fader can be done by creating a variable under the Fader xExp = pow(x, 2) then set its midi CC and scale 0 to 127.
For a basic log you could do the same ie xLog = pow(x,0.5) and similarly scale 0 to127
You can also invert the first one pretty by doing 1-pow(x-1, 2) to reflect it across x=y i.e. linear
You can also increase or decrease the numbers as needed to get different slopes . . .
Ultimately I guess you could use the log/log10 functions to get the values for particular ranges of output perhaps . . .
Hope that helps....
Also re the Usine request - Have a look at Usine H and the Granulator patch - It also has a section that lets you alter its response to incoming midi
Nice one macciza, yep thats much easier