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

Simple math, please!

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
gwydi
New User
Posts: 1
Joined: Mon Jan 30, 2006 1:52 am

Simple math, please!

Post by gwydi » Mon Jan 30, 2006 2:04 am

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

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

Post by florian » Mon Jan 30, 2006 8:56 am

Hi Gwydi,

yes, this feature is still planned, and currently being implemented, for the planned "Pro" version.

Thanks for voicing your need!
Florian

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

Post by florian » Thu Nov 16, 2006 7:54 pm

Update:
Simple math is available in Midi Translator Pro. It's named "Rules".

Florian

rsodre
New User
Posts: 4
Joined: Sun Nov 19, 2006 7:48 pm
Contact:

Post by rsodre » Sun Nov 19, 2006 7:56 pm

Hey!

We still can't do math with non-integer numbers...

I have a sliders on Resolume that range from 0 to 100, while the controller sliders range from 0 to 127. To properly configure the slider i would have to multiply the value by 0.78, but I cant...

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

Post by florian » Sun Nov 19, 2006 10:56 pm

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

rsodre
New User
Posts: 4
Joined: Sun Nov 19, 2006 7:48 pm
Contact:

got it!

Post by rsodre » Sat Nov 25, 2006 2:23 am

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!

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

Post by florian » Sat Nov 25, 2006 6:35 pm

wow, great to hear that it works. If you like, send me your .bmtp project file, then I can include it with the distribution.

Thanks,
Florian

Post Reply