This forum is read-only. Please post new topics in our Q&A forum.

## Simple math, please!

**Moderators:** florian, DvlsAdvct

### Simple math, please!

I see from other posts that this has been considered, not sure if you're still planning to add it or not.

I've got a Roland JD800 which has an obscene number of (sysex-sending) sliders, and it works great as a controller via BMT, but the problem is that the sliders only generate a range of 0-96. A simple transform inside bomes (eg, pp x 1.33) would stretch that to 0-127 (admittedly skipping a few values in between, but you can't have everything).

I'd buy the pro version just for this feature!

Thanks,

Gwydi

I've got a Roland JD800 which has an obscene number of (sysex-sending) sliders, and it works great as a controller via BMT, but the problem is that the sliders only generate a range of 0-96. A simple transform inside bomes (eg, pp x 1.33) would stretch that to 0-127 (admittedly skipping a few values in between, but you can't have everything).

I'd buy the pro version just for this feature!

Thanks,

Gwydi

- florian
- Bome Software: Founder
**Posts:**2435**Joined:**Thu Apr 28, 2005 10:09 pm**Location:**Munich, Germany-
**Contact:**

Hi, you're right, floating point numbers are not available, but the variables are 32-bit range, so you can use extend all variables by a factor first, e.g. for a calculation with 2 digits, just multiply all variables with 100 before doing the calculations on them. At last, before sending the variables out the MIDI port, divide the variable by 100. Clumsy, but circumvents some of the problems that we'd run into if we'd allow floating point.

For your case, it's even easier:

If the "resolume" message is caught by this:

INCOMING: MIDI B0 50 pp

Then the following "formula" will do your trick:

pp = (pp * 127) / 100

(where, of course, 1/(127/100) is 0.78 -- which, on a side note, shows, that you'd have to divide by 0.78 to expand the range of pp).

Anyway, to the translator, add these 2 rules for a correct expansion of the range of the pp variable, using the expression above:

1. pp = pp * 127

2. pp = pp / 100

Let us know how it works!

Florian

For your case, it's even easier:

If the "resolume" message is caught by this:

INCOMING: MIDI B0 50 pp

Then the following "formula" will do your trick:

pp = (pp * 127) / 100

(where, of course, 1/(127/100) is 0.78 -- which, on a side note, shows, that you'd have to divide by 0.78 to expand the range of pp).

Anyway, to the translator, add these 2 rules for a correct expansion of the range of the pp variable, using the expression above:

1. pp = pp * 127

2. pp = pp / 100

Let us know how it works!

Florian

### got it!

hey florian!

I think you inverted the expressions, but in the end it worked!

I was understanding all wrong, because of some bad configs on Resolume that messed the outputs, so forget about my initial toughts.

Here´s a tip to make true pitching on Resolume...

We cant assign the real volume on Resolume speed, because the NORMAL speed on video is 30 FPS, but the Resolume speed control go from 0 to 100.

So, when we move the pitch from 0 to 63 (halfway), on Resolume the speed must move from 0 to 30.

When we move the pitch from 64 to 127 (halfway), on Resolume the speed must move from 30 to 100.

Here's what i've done...

> Incoming: B0 0B xx

> Outgoung: B0 0B vv

Rules:

> if xx > 63 then pp=127

> if xx <= 63 then pp=78

> vv = xx * pp

> vv = vv / 127

Translating, it sets pp to the maximum pitch value possible. When pp=127, maximum vv=127. When vv=78, maximum vv=78.

As 127 is the equivalent of 100 on a 0-127 range, half 127 is 50 (normal).

78 is the equivalent of 60 on a 0-127 range, half 78 is 30 fps!

I´m loving this!

thanks!

I think you inverted the expressions, but in the end it worked!

I was understanding all wrong, because of some bad configs on Resolume that messed the outputs, so forget about my initial toughts.

Here´s a tip to make true pitching on Resolume...

We cant assign the real volume on Resolume speed, because the NORMAL speed on video is 30 FPS, but the Resolume speed control go from 0 to 100.

So, when we move the pitch from 0 to 63 (halfway), on Resolume the speed must move from 0 to 30.

When we move the pitch from 64 to 127 (halfway), on Resolume the speed must move from 30 to 100.

Here's what i've done...

> Incoming: B0 0B xx

> Outgoung: B0 0B vv

Rules:

> if xx > 63 then pp=127

> if xx <= 63 then pp=78

> vv = xx * pp

> vv = vv / 127

Translating, it sets pp to the maximum pitch value possible. When pp=127, maximum vv=127. When vv=78, maximum vv=78.

As 127 is the equivalent of 100 on a 0-127 range, half 127 is 50 (normal).

78 is the equivalent of 60 on a 0-127 range, half 78 is 30 fps!

I´m loving this!

thanks!