sysex messages and MD

Midiot

2009-02-12 21:56:07

Hello, I hope you can help me solve this, although I know you are midi translators, I hope you peeps have good knowledge of sysex.
What happened is this: I was trying to send a sysex global time (tempo) message to my machinedrum. The range is 30-260 or so.
Sysex string:
F0....IDs etc....DV 01 01 00 00 11 00 10 00 F7 (I only wrote part of sysex after IDs/Command/Midi.ch)
DV=Data Value- need for variable command
Green=binary =hex 80
Red=binary=hex 200
I was trying to set the time sweep btwn 80-2oo bpm, but I got a crazy result like 1-600bpm...?? :shock:
I had to put these in binary, because my remote 25 has no higher input then 127/7F....
What did I do wrong?
TIA

florian

2009-02-23 11:46:46

Sorry for the late reply!

I don't know this particular MIDI message. In general though, any hex number you put inside a sys ex message (in between F0 and F7) must be in the range 0..127 (i.e. hex: 00..7F). There are different ways to encode higher numbers than 127, but the most common is to use combine several 7 bit numbers like this:
F0 ... HI LO ... F7
Now the number that HI LO represents is this:
(128 * HI) + LO

Say, you want to encode 204, you need to calculate it like this:
HI = 204 / 128 = 1 = 01 hex
LO = 204 % 128 = 76 = 4C hex

So you'd put in
F0 ... 01 4C ... F7

As a verification:
hex (01 * 128) + 4C
= (1 * 128) + 76
= 204

Hope that makes sense!
Florian

Midiot

2009-02-24 11:58:17

Thank you Florian for reply,
better later then never, I appreciate you take in the time and clearing it for me.
It does make sence what you're saying, I am still puzzeled with that range I got :shock:.... (MD is capable of 30-260BPM)
Normaly I put in hex numbers, but knowing that 200 is out of 127 range I put everything in binary and got that result...strangely, when I changed one of the 2 binary ##s I got useless value, it would jump to 5 BPM and stay there...
I will try your simplyfied version...
Cheers and thanx again :)