Bitpacking; General Bitpacking Method - Lexicon PCM 80 - MIDI IMPLEMENTATION DETAILS Midi Implementation Manual

Midi implementation details
Table of Contents

Advertisement

PCM 80 MIDI Implementation Details

Bitpacking

General Bitpacking Method

All PCM 80 effect control data fields are words from 1-16 bits in length utilizing the minimum number of
bits necessary to represent the full range of the field. The values of these fields are packed into bytes right
justified.
As an example, let us say we have fields a, b, and c which are, respectively, 5, 14, and 9 bits wide.
aaaaa
bbbbbbbbbbbbbb
ccccccccc
. . . . . . . .
Our bitpack bytes would initially be all zeroes and the first several bytes would look like this:
Byte 1
Byte 2
........
........
The first field is loaded right justified into the first byte.
Byte 1
Byte 2
...aaaaa
........
The second field's 3 least significant bits are loaded into the remaining 3 bits of Byte 1...
Byte 1
Byte 2
bbbaaaaa
........
...the next (middle) eight bits are loaded into Byte 2...
Byte 1
Byte 2
bbbaaaaa
bbbbbbbb
...and finally the remaining (most significant) 3 bits of the second field are loaded right justified into Byte
3.
Byte 1
Byte 2
bbbaaaaa
bbbbbbbb
The 5 least significant bits of the third field are loaded into the remaining bits of Byte 3...
Byte 1
Byte 2
bbbaaaaa
bbbbbbbb
...and the remaining (most significant) 4 bits of the third field are loaded right justified into Byte 4.
Byte 1
Byte 2
bbbaaaaa
bbbbbbbb
If the values of those three fields had been 0x1f, 0x2222, 0x147 respectively, the bitpack field would look
like this:
Byte 1
Byte 2
01011111
01010101
If there we only three fields in this effect register, the remaining 4 most significant bits of Byte 4 would be
assigned to zero and the remaining 406 bytes would also be zero filled.
Byte 1
Byte 2
01011111
01010101
18
first field bits
second field bits
third field bits
unused bits
Byte 3
Byte 4
........
.......
Byte 3
Byte 4
........
........
Byte 3
Byte 4
........
.......
Byte 3
Byte 4
........
........
Byte 3
Byte 4
.....bbb
........
Byte 3
Byte 4
cccccbbb
........
Byte 3
Byte 4
cccccbbb
....cccc
Byte 3
Byte 4
00111101
....1010
Byte 3
Byte 4
00111101
00001010
Byte 5
Byte 6
........
........
Byte 5
Byte 6
........
........
Byte 5
Byte 6
.......
........
Byte 5
Byte 6
........
........
Byte 5
Byte 6
........
........
Byte 5
Byte 6
........
........
Byte 5
Byte 6
........
........
Byte 5
Byte 6
........
........
Byte 5
-> Byte 410
00000000
00000000
Lexicon

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pcm 80

Table of Contents