hello everyone,
a little help needed here for a newbie in scripting. I want to define the value's range of any of the balls in the multiball object let say from - 1 to 1. I guess i have to enter and expression/script in the object, but i'm king of loss, and my google researched remained poor!
thanks a lot in advance for the help!
multiball range scripting
Re: multiball range scripting
Hi
Lots of ways to do it - heres a few tips . .
Chuck a MultiBall and a Monitor on screen - Put MultiBall.x in the Monitor to see what you get, hmm 0 -1 - Standard Lemur values . . .
You want -1 to 1 : a range of 2. So if you get a range of 0-2 and take off 1 - What does that do? Try MultiBall.x*2-1 . . .
To make it a bit easier define new variable say and then you can map that .. . .
Hope that helps
Lots of ways to do it - heres a few tips . .
Chuck a MultiBall and a Monitor on screen - Put MultiBall.x in the Monitor to see what you get, hmm 0 -1 - Standard Lemur values . . .
You want -1 to 1 : a range of 2. So if you get a range of 0-2 and take off 1 - What does that do? Try MultiBall.x*2-1 . . .
To make it a bit easier define new variable say
Code: Select all
scale_x = x*2-1
Hope that helps
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: multiball range scripting
Hey, as an advanced way you can also route the output of an axis to an range object, as done here: http://liine.net/en/community/user-library/view/5/
This would give you the possibility to dynamically change the output. ...there are really lots of ways to transform the output of an object on lemur
cheers*mat
This would give you the possibility to dynamically change the output. ...there are really lots of ways to transform the output of an object on lemur
cheers*mat
Lemur modules and sequencer: http://music-interface.com
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Re: multiball range scripting
Yep ,
There a lots of ways of achieving similar things in Lemur . . .
So a few more tips . . .
Lets see, you want to change the 'range' of a value . . . lets have a look in the manual for something (no, not the Range object) . . .
or even better a quick peek at the Internal functions list in the Project panel - hey, theres a range(a,min,max) function in the Arithmetic section . . .
So if we stick with the x value example, we can use range(x,-1,1) - which will return -1 to 1 …. and use that as need
You could also factor that out into its own script by making a one line function - bipolar(x) ~ range(x,1,1) then use it as needed. i.e. bipolar(Fader.x) etc . .
You could also make vars for the lo and hi val (lo / hi) and then set them as needed and make your maths or scripts reference them i.e. range(x,lo,hi) etc . .
It can depend on so many things - it can be hard-coded, allow for easy editor setup, be scripted for enduser setup; can use explicit maths, built-in/user functions, constants / variables, etc etc
Hope that helps
MM
There a lots of ways of achieving similar things in Lemur . . .
So a few more tips . . .
Lets see, you want to change the 'range' of a value . . . lets have a look in the manual for something (no, not the Range object) . . .
or even better a quick peek at the Internal functions list in the Project panel - hey, theres a range(a,min,max) function in the Arithmetic section . . .
So if we stick with the x value example, we can use range(x,-1,1) - which will return -1 to 1 …. and use that as need
You could also factor that out into its own script by making a one line function - bipolar(x) ~ range(x,1,1) then use it as needed. i.e. bipolar(Fader.x) etc . .
You could also make vars for the lo and hi val (lo / hi) and then set them as needed and make your maths or scripts reference them i.e. range(x,lo,hi) etc . .
It can depend on so many things - it can be hard-coded, allow for easy editor setup, be scripted for enduser setup; can use explicit maths, built-in/user functions, constants / variables, etc etc
Hope that helps
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]