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:

CDJ library diagram

Each zone can be controlled using a row-struct:

RIC00UTF-16LE String0010i+00

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:

76543210Sicon ID

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.

Table 1. Row Textcolor codes
Code Color Notes

0x00

White

Adjusted for contrast when selected

0x01

Gray

Adjusted for contrast when selected

0x02

Green

Adjusted for contrast when selected

0x03

Dark Green / Olive

Adjusted for contrast when selected

0x04

Magenta

0x05

Red

0x06

Orange

0x07

Yellow

0x08

Green

0x09

Cyan

0x0a

Blue

0x0b

Purple

Table 2. Known Icon IDs
ID Icon/Description Name/Notes

0x00

 — 

Don’t prefix any Icon

0x01

use empty icon (text uses the same offset as with an icon but without displaying an actual icon)

0x02

closed folder open folder

Folder (depending on whether entry is selected or not)

0x03

album

Album

0x04

track / filename

Musical 8th Note (used to indicate entry is a track)

0x05

open folder genre

Open Folder / Genre (depending on whether entry is selected)

0x06

artist

Artist

0x07

playlist icon

Document / Playlist / Fallback

0x08

playlist icon

Same as 0x08?

0x09

time

Time

0x0A

hotcue

Similar to the picture, but it displays a C instead of an H

0x0B

bpm

BPM

0x0C

label

Label

0x0D

original artist

Original Artist

0x0E

remixer

Remixer

0x0F

playing

Similar to the picture, but its instead a black playbutton on a green box.

0x10

registered in tag list

Registered in Tag-list (but the checkmark is red instead of white)

0x11

button 1

Button 1

0x12

button 2

Button 2

0x13

button 3

Button 3

0x14

button 4

Button 4

0x15

key

Key

0x16

bitrate

Bitrate

0x17

year

Year

0x18

file

Document / File

0x19

comment

Comment

0x1A

search

Search

0x1B

dj play count

DJ Play Count

0x1C

cosine wave

Cosine wave depicted from 0 to 3π radians

0x1D

date library added

Date Library Added

0x1E

color white

Color White

0x1F

color magenta

Color Magenta

0x20

color red

Color Red

0x21

color orange

Color Orange

0x22

color yellow

Color Yellow

0x23

color green

Color Green

0x24

color cyan

Color Cyan

0x25

color blue

Color Blue

0x26

color purple

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)

0123456789abcdef002aIL00IconC00String01IconC000010String02IconC00String03IconC00String04Icon20C00String05IconC00String06IconC00String3007IconC00String08IconC00String00000000

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

CDJ library view album

Sending Album art is accomplished via a fragmented header but overall pretty straightforward:

0123456789abcdef002bILLengthJPG Data0010i+00

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.