Converting Numbers
Decimal<->Hex<->Binary<->Note

It has been some time since I have put this up on my site and in that time I have made a few 'improvements'. Here is the new version - let me know what you think and if there is anything that needs to be added.

Just type a number in one the various boxes and it will convert as you type. Notes
0 to 127 is the Midi note range. the bottom note 0 is C
What is middle C... 5 x 12 = 60
There are many views about what octave middle C is (note 60). I have opted for C4 = 60 as that is what Roland and Yamaha use. This makes 0 the note C-1

14 Bit Midi Numbers
As data in Midi System Exclusive messages must be less than 80H (hex), the biggest number in a byte is 7FH (127).
(bits 0 to 6 are used and bit 7 is always 0)
Combining 2 bytes still means that each of them has to be less than 80H so the max number in two bytes is 7F7F.
So when a number goes above 80H (127) the 1 that would normally be in bit 7 is moved to bit 0 in the next byte.
0000 0000 0111 1111 = 127 (007F 14 bit)
0000 0001 0000 0000 = 128 (0100 14 bit) instead of 0000 0000 1000 0000 (0080)
0000 0001 0000 0001 = 129 (0101 14 bit)

So 7F7F in 14bit HEX is really 3FFF 16 bit HEX or 16,383 decimal.

I don't know about you, but I often find 14 bit HEX confusing, so this program will calculate to and from 14bit values for you.
That is, the lowest 7 bits are placed in the low byte and the next 7 bits go to the high byte.

There is a display of both the 16 bit and 14 bit values in Binary (zeros and ones) - have a look at the difference.

You can enter the decimal or the HEX value of the two bytes in the 14bit number
(Labels will turn to RED when it's value is out of range.) Negative Numbers
You can even enter negative numbers (only in the 16 bit decimal box) ...
(Note that -1 has all the possible bits set to 1 (FFFF in 16 bit HEX or 7F7F in 14bit and is the maximum number possible. Weird but that's just how computers work.) Checksum
The only other slightly tricky bit is the checksum calculation.
There are a number of ways to calculate a checksum and different synth makers had their favourites.

To calculate the Roland checksum, take all the bytes starting at the address after the command byte (usually 12H) up to the last data byte. Recent Roland gear used 4 address bytes and 4 data bytes.

Imagine the message is just pasted and you have changed some of the data values. The old check sum was 23 but the freshly calculated one is 64. You can use copy and past from MidiOx or the Roland editors for some idea of the sysex messages and
change them to something useful.

F0 41 7F 00 10 11 3A 2A 1A 0A 3D 2D 1D 0D 23 F7
F0 ..... F7 system exclusive
41 Roland
7F Device ID
00 10 XV synths
11 Command (Request data RQ1)
3D 2D 1D 0D made up Data. 3D is the most significant data byte
23 Wrong check sum

If you press the "Replace CS" button the checksum will be written over the second last byte in the sysex message and the sysex text will be copied into the clipboard ready for pasting.  To download this copyright software you must agree not sell it or to distribute it in any way.
You must agree not to reverse engineer it in any way.
That being said, you may link here www.bwalk.com.au quite freely.