Library interaction
Controlling the left rows
It is possible to send library data to the CDJ by directly sending strings to the CDJ which are then displayed at their appropriate places. This is done by using a extended header packet (to allow the data to be fragmented over multiple packets). It follows a comparatively simple format which allows to send strings to the nine library rows:
Each zone can be controlled using a row-struct:
R
indicates the row number while I
indicates an the ID of the optional Icon
(which the CDJ will prefix before the string)
as well as whether the row in question is currently selected.
C
controls the color of the text in the current row.
The String is encoded as UTF-16LE and terminate with a null-byte (or rather two
0x00
bytes since the string is encoded as UTF-16). The information in the I
byte stores whether the row in question is currently selected as well as the icon
ID in the following bitfield:
If the "S" bit is set, then that row is currently selected. If multiple row-structs have this bit set, the CDJ will use the very first row where this occurs and ignores the bit on all rows after.
Code | Color | Notes |
---|---|---|
|
White |
Adjusted for contrast when selected |
|
Gray |
Adjusted for contrast when selected |
|
Green |
Adjusted for contrast when selected |
|
Dark Green / Olive |
Adjusted for contrast when selected |
|
Magenta |
|
|
Red |
|
|
Orange |
|
|
Yellow |
|
|
Green |
|
|
Cyan |
|
|
Blue |
|
|
Purple |
ID | Icon/Description | Name/Notes |
---|---|---|
|
— |
Don’t prefix any Icon |
|
use empty icon (text uses the same offset as with an icon but without displaying an actual icon) |
|
|
|
Folder (depending on whether entry is selected or not) |
|
Album |
|
|
Musical 8th Note (used to indicate entry is a track) |
|
|
|
Open Folder / Genre (depending on whether entry is selected) |
|
Artist |
|
|
Document / Playlist / Fallback |
|
|
Same as |
|
|
Time |
|
|
Similar to the picture, but it displays a C instead of an H |
|
|
BPM |
|
|
Label |
|
|
Original Artist |
|
|
Remixer |
|
|
Similar to the picture, but its instead a black playbutton on a green box. |
|
|
Registered in Tag-list (but the checkmark is red instead of white) |
|
|
Button 1 |
|
|
Button 2 |
|
|
Button 3 |
|
|
Button 4 |
|
|
Key |
|
|
Bitrate |
|
|
Year |
|
|
Document / File |
|
|
Comment |
|
|
Search |
|
|
DJ Play Count |
|
|
Cosine wave depicted from 0 to 3π radians |
|
|
Date Library Added |
|
|
Color White |
|
|
Color Magenta |
|
|
Color Red |
|
|
Color Orange |
|
|
Color Yellow |
|
|
Color Green |
|
|
Color Cyan |
|
|
Color Blue |
|
|
Color Purple |
These known Icon ID’s were collected from a CDJ-2000NXS2 with firmware
version 1.85. Even though there are 0x7F
=128 possible icons, it seems like
the library-view of the CDJ is only carrying 39 icons.
These row-structs are then collected in a buffer and sent out using an extended header packet (so you might have to break up the buffer)
The CDJ accepts row-structs in any order. When it receives a row struct with an out-of-bounds number, it will stop processing the instructions immediately, thus leaving every unprocessed line blank. The CDJ ignores any icon instruction when the provided text for that row is empty.
Sending Album Art
Sending Album art is accomplished via a fragmented header but overall pretty straightforward:
The "Length" field denotes size of the JPG Data in Bytes. It seems like the CDJ only accepts images in jpg form. Since the "Length" field is a ushort, the upper limit for the jpg buffersize is Bytes. It has also been discovered, that the CDJ can have trouble with certain metadata and rejects the image when encountering them. Thus it is advisable to strip the jpg of as much metadata as possible not only to counteract this behavior, but also to reduce the buffersize and save bandwidth.