Nibblized data byte - help?
Community Forums/General Help/Nibblized data byte - help?
| ||
I am in the process of writing a SysEx Bulk Dump librarian for my Roland A-33 Midi Controller Keyboard. I have successfully managed to receive and store the dump data and have identified the 2 bytes used for storing patch settings. The Roland A-33 SysEx dump specification states that "The two data bytes represent one A-30 PATCH data byte nibblized". Can anyone please explain how I convert them to 1 "un-nibblized" byte? Once I have the 2-bytes stored as 1, I then need to perform bitwise operations on them to determine the settings. I understand from reading topics on here how to do that - but am unclear if a byte="10000110" as to which bit=bit-7 and which bit=bit-0? |
| ||
It's a rarely seen term, but nibble ( sometimes spelled nybble ) is four bits. So it looks like a patch data byte has been split into two 4-bit values, each of which is then stored in one data byte. You need to look at the contents of such bytes. Do they always hold values in the range 0 to 15 as I would expect for "nibble" values"? As to the other question, bit 0 is the least significant bit, i.e. the bit that represents 1. The next bit represents 2, then 4 etc. In the "10000110" the rightmost bit, which is 0, is bit zero. |
| ||
Both bytes do have a value of 15 or less yes - great, now I know what to do with them! Many thanks - and thanks also for the MSB/LSB explanation :o) |
| ||
Ok - it seems that I don't understand how bitwise operations work after all... The Roland specification states that byte 14 contains the following information: LowerVolume Bit: 7-4 Value: 0=127 UpperVolume Bit: 3-0 Value: 0=127How is it possible to have a value range of 0-127 from only 4 bits? [edit] Don't worry - this must be an error in the manual, since bytes 15-16 are also similarly described. The manual for the A33 keyboard's predecessor (the A30), however, correctly specifies a possible value range of 0-15 for all three bytes. |