Using Monitor objects to display Bank Patch etc

Discuss Lemur and share techniques.
Post Reply
rishi
Newbie
Posts: 9
Joined: 08 May 2012 12:22

Using Monitor objects to display Bank Patch etc

Post by rishi »

I am using the Monitor object to display Program Change Number / Patch number. I control this with a fader and / or buttons. (Name= programc)

I would like to split the monitor object into 3 components to reflect the display on my Virus. My Monitor objects would be called:
Bank (Bank=1 or 2 Patch# / 64)
GRoup (8 Groups per Bank: Patch# / Bank.value / 8)
Patch (8 patches per group: programc.x*127. Remainder of Patch# / Bank# / Group# )

8 Groups with 8 Patches

So it looks something like
BANK GROUP PATCH
1 4 6
2 3 7

To do this I need to be able to do integer division and get a remainder. Is that possible? How do I do that?

Doing division in the properties value field with things like (programc.x*127)/Bank.value doesnt seem to yield the expected results.

Any help much appreciated.

Thanks
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Using Monitor objects to display Bank Patch etc

Post by Softcore »

the modulo arithmetic operator "%" maybe is what you are looking for (Lemur manual page 135).

a%b returns the remaining integer after dividing a with b.

For example

127%8 = 7

if the division is complete, of course it returns 0. So for example 8%2 = 0
rishi
Newbie
Posts: 9
Joined: 08 May 2012 12:22

Re: Using Monitor objects to display Bank Patch etc

Post by rishi »

awesome I will give that a try

Thanks
Post Reply