incr or decr by an amount other than 1

Discuss problems and solutions.

incr or decr by an amount other than 1

Postby 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
Imza
Newbie
 
Posts: 39
Joined: 13 Apr 2012 00:37
Location: St. Louis, MO

Re: incr or decr by an amount other than 1

Postby 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[*]
Macciza
Regular
 
Posts: 1325
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 4 guests

cron