Hi,
I need to take a sysex input and use part of it as a variable.
The issue I’m having is I also need to process it in decimal, but without the prior automatic conversion from hex when its defined as a variable.
For example, in the sysex there is a value “32” that I’m defining as a variable.
In Rules I need to be able to process that “32” as a decimal value, without it being automatically converted from hex to decimal (which would make it 50).
Specifically, I need to subtract 30 from the “32” so I end up with 2.
The answer will be correct but displayed in decimal. The rules will original show as written but if you save and reopen the project file the same line will read:
pp=50-48
If you want to display the results in hex you can do this
pp=0x32-30
Log "pp= 0x%02x pp%"
If I’m doing bitmap arithmetic, I usually us the Log rule to display my variables in hex as it is easier to visualize what is happening.
In addition, I often use Windows programmers calculator to help with hex to decimal conversion and back if I need to do something more outside of Bome MIDI Translator Pro . You can also use google search
If you want to dump global variables in hex instead of decimal, you can hold the control key (command key on mac) down and click on dump variables in the log window.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
Also, I just saw an older post of yours which made me realise the hex I’m working with appears to be ascii codes! So, when subtracting 30 I’m actually extracting the numerical symbol.