Subj : Re: Beginner needs help with MSB/LSB and 7bit bytes To : comp.programming From : Duane Bozarth Date : Thu Sep 29 2005 03:46 pm Rich wrote: > > Hey All, > > I am trying to get my head around a particular concept. I want to write > an editor/librarian program for my midi guitar amplifier. I have a > description of the data pactets from the manufacturer, but I need some > help with how the MSB affects the value of the data. Below is a bit of > the explination from the manufacturer (This is midi sysex, which uses 7 > bit bytes): > > 5E - Packed most significant bits for subsequent 7 bytes (x101 1110) > > 24 - Reverb Time (6.7) using MSB 1 > > 56 - Reverb Dwell (4.0) using MSB 0 > > 7F - Reverb Diffusion (9.9) using MSB 1 > > 5D - Reverb Tone (8.7) using MSB 1 > > 5D - Modulation FX Parameter 1 (8.7) using MSB 1 > > 21 - Modulation FX Parameter 2 (6.6) using MSB 1 > > 79 - Modulation FX Parameter 3 (5.2) using MSB 0 > > 1D - Packed most significant bits for subsequent 7 bytes (x001 1101) > > 7F - Modulation FX Parameter 4 (5.4) using MSB 0 > > 61 - Delay Time (510 ms) using MSB 0 > > I can grasp that the line saying "Packed most significant bits for > subsequent 7 bytes" means that from right to left, the bit is the MSB > for that byte, as they list next to byte with "using MSB 0" > > But I cannot understand how the hex value 61, as in the last line can > get to a value of 510. I mean I can translate it to binary (x110 0001), > but I just can't see how they get 510 out of that. > > remember, Im just a beginner, so I am sure I just don't understand. Any > help would be appreciated. > Looks like there's an additional level of encoding of units/encoded value? Seems like there needs to be another piece to the puzzle. .