Skip to content

Commit

Permalink
Initial support for nxs2 players.
Browse files Browse the repository at this point in the history
Thanks to captures and screen shots from @drummerclint and Markus
Krooked!
  • Loading branch information
brunchboy committed Jul 4, 2016
1 parent 76bb96e commit 3c0731b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ This change log follows the conventions of

## [Unreleased][unreleased]

Nothing so far.

## [0.1.5] - 2016-07-04

### Added

- Initial support for nxs2 players, thanks to captures and screen
shots from @drummerclint and Markus Krooked. Existing fields seem to
work again, but we have not yet learned how to read any of the new
features that might be found in the larger status packets.
- Discovered how to find rekordbox track IDs and database location
information in the CDJ status packets.
- Discovered how to ask a CDJ for track metadata given a database
Expand Down Expand Up @@ -81,7 +89,8 @@ This change log follows the conventions of
- Intial early release.


[unreleased]: https:/brunchboy/dysentery/compare/v0.1.4...HEAD
[unreleased]: https:/brunchboy/dysentery/compare/v0.1.5...HEAD
[0.1.5]: https:/brunchboy/dysentery/compare/v0.1.4...v0.1.5
[0.1.4]: https:/brunchboy/dysentery/compare/v0.1.3...v0.1.4
[0.1.3]: https:/brunchboy/dysentery/compare/v0.1.2...v0.1.3
[0.1.2]: https:/brunchboy/dysentery/compare/v0.1.1...v0.1.2
Expand Down
Binary file modified doc/Analysis.pdf
Binary file not shown.
12 changes: 7 additions & 5 deletions doc/Analysis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,13 @@ \subsection{CDJ Status Packets}
\end{figure}

Byte~139, labeled $P_2$ seems to be another play state indicator,
having the value 122 when playing and 126 when stopped. When the CDJ
is trying to play, but is being held in place by the DJ holding down
on the jog wheel, $P_1$ considers it to be playing (value 3), while
$P_2$ considers it to be stopped (value 126). Non-nexus players seem
to use the value 106 when playing and 110 when stopped, so this may be
having the value 122 ({\tt 0x7a}) when playing and 126 ({\tt 0x7e})
when stopped. When the CDJ is trying to play, but is being held in
place by the DJ holding down on the jog wheel, $P_1$ considers it to
be playing (value 3), while $P_2$ considers it to be stopped (value
126). Non-nexus players seem to use the value 106 ({\tt 0x6a}) when
playing and 110 ({\tt 0x6e}) when stopped, while nxs2 players use the
values 250 and 254 ({\tt 0xfa} and {\tt 0xfe}) so this seems to be
another bit field like $F$.

There are four different places where pitch information appears in
Expand Down
12 changes: 7 additions & 5 deletions src/dysentery/view.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
(let [current-type (get packet 10)]
(if (= current-type expected-type)
(case expected-type
0x0a (correct-length? packet #{208 212})
0x0a (correct-length? packet #{208 212 284})
0x29 (correct-length? packet #{56})
(timbre/warn "Received packet with unrecognized type:" current-type))
(timbre/warn "Expecting packet of type" expected-type "but received type" current-type))))
Expand Down Expand Up @@ -236,10 +236,12 @@
17 "Ended"
"???")
:p-2 (case (get packet 139)
106 "Play"
110 "Stop"
122 "nxs Play"
126 "nxs Stop"
0x6a "Play"
0x6e "Stop"
0x7a "nxs Play"
0x7e "nxs Stop"
0xfa "nxs2 Play"
0xfe "nxs2 Stop"
"???")
:p-3 (case (get packet 157)
0 "No Track"
Expand Down

0 comments on commit 3c0731b

Please sign in to comment.