CDJ queries work by finding pieces of music or whole discs which have attributes that match the relationship you specify in your query.
The basic format of a simple query is:
(Field) (Comparison) (Value)
some examples of this format would be
The following fields are supported, along with shorthand equivalents. Expect that many new fields will be added in the future.
Fields |
|||
Name | Shorthand | Data Type | Description |
title | ti | text | title of track |
artist | ar | text | name of artist |
album | al | text | title of album (disc) |
lyrics | ly | text | lyrics of track |
notes | no | text | notes for track / disc |
player | pl | number | number of player on which music resides |
keywords | kw | text | user defined keywords |
playtime | pt | playtime | playing time of music |
timeadded | ta | datetime | date / time the music was added to your collection |
timeplayed | tp | playtime | amount of time this music has been played |
timesplayed | nt | number | number of times this music has been played |
timereleased | tr | datetime | date / time the music was released |
timelastplayed | tl | datetime | date / time the music was last played |
like | -20 to +20 slider rating* | ||
happy | -20 to +20 slider rating* | ||
tempo | -20 to +20 slider rating* | ||
danceable | -20 to +20 slider rating* |
* these names will eventually become user definable
The following types of comparisons are supported.
Comparisons |
|
Symbol | Description |
= | numbers - equals strings - is found within |
== | numbers - equals strings - is identical (not case sensitive) |
> | is greater than (works for strings too) |
< | is less than (works for strings too) |
The following data types are supported.
Data Types |
||
Name | Description | Samples |
text | A text string. If a string contains spaces or characters which could be construed as comparisons or boolean operators, it should be enclosed in quotes. |
|
number | An integer or floating point number |
|
playtime | Time expressed as seconds or in a minutes:seconds format |
|
datetime | Time expressed in one of the following formats
|
|
Absolute - these formats express an absolute time |
|
|
Relative - these formats express time as an
offset to the past from the current time. The default unit is the day, but the following
units are supported:
|
|
CDJ allows you to make boolean queries of unlimited complexity along with some special features to make expressions even more compact. The following boolean operators are supported:
Boolean Operators (in order of precedence) |
||
Symbol | Shorthand | Function |
not | ! | invert the logical sense of the expression to the right |
and | & | expression to the left and right must be true |
or | | | expression to the left or right must be true |
xor | ^ | only one expression to the left or right must be true |
CDJ also allows the use of parentheses to control the order of operations in an expression.
The following is an example of a more advanced query
The CDJ expression syntax also allows you to factorize both fields and values using boolean operators to create queries with less typing.
Instead of saying
You can just say
Likewise, fields can be condensed. Instead of saying
You can just say
Factorizations can be done on both sides simultaneously
is equivalent to
To make things more convenient, if you just type in some text, such as
CDJ will default to interpreting this as