incr or decr by an amount other than 1

Discuss problems and solutions.
Post Reply
Imza
Newbie
Posts:39
Joined:13 Apr 2012 00:37
Location:St. Louis, MO
Contact:
incr or decr by an amount other than 1

Post by Imza » 18 Nov 2017 19:06

Hey all. I have a slider with an OSC range of 1 to 10,000 and I have set a hidden fader to capture this range, and a monitor for it. I want to increment x by .0001 instead of by 1. How do I tell it to do this?
Fader.x+.0001; does not work
lightlabstl.com

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: incr or decr by an amount other than 1

Post by Macciza » 22 Nov 2017 10:54

Try this for size ...
Forget the capture fader, just use the monitor object
make a script in the monitor executing On_OSC with address as needed...
value = OSC_ARGS*0.0001;

this makes the 'value of the Monitor show the incoming OSC value times 0.0001
Adjust the 'Precision' (number of decimal values) as needed

Cheers
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]

Post Reply