Page 1 of 1

round to even integer

Posted: 06 Jun 2014 23:44
by Phil999
a sample library rounds values to even integers, and I would like to display these values in Lemur. In C+ there are some solutions, but is this possible in Lemur?

Re: round to even integer

Posted: 07 Jun 2014 02:47
by oldgearguy
here's a quick one that rounds whole numbers to even integers.

Re: round to even integer

Posted: 07 Jun 2014 12:57
by Phil999
brilliant, simple solution. Thank you very much.

Re: round to even integer

Posted: 07 Jun 2014 21:58
by oldgearguy
you're welcome. I like these types of challenges. :)
I wasn't too fancy with the names, but I figured if I showed the raw and the rounded in 2 monitor windows you'd be able to understand it.

It could pretty much be a full time (or more!) job, sitting on the Lemur forum working out examples, solving problems, and coming up with scripting solutions to people's questions. There's so much to be learned from worked examples that isn't covered in the basic manual.

Sure, if all you want to do is throw up a page of buttons and sliders and send basic CC/note stuff out, it's not so bad. Once you start pushing the envelope though, you're kind of left to yourself to figure things out.

Re: round to even integer

Posted: 08 Jun 2014 20:39
by Softcore
Nice one! I was thinking it would have to incorporate modulo.