rex icon indicating copy to clipboard operation
rex copied to clipboard

Info from Pioneer XDJ 1000MK1

Open juliu-s opened this issue 1 year ago • 23 comments

Hi there,

I saw your posts at https://github.com/xsco/libdjinterop/issues/15 and https://github.com/mixxxdj/mixxx/issues/9463 and I tested your work.

I don't know what the goal of the project is (if there is any) but I think it would be awesome if I could create folders (like playlists) on an USB stick and analyze the tracks inside and get the big waveforms like here.

So, below is my "process". If you want me to test something for you, please let me know.

Build

I used the golang container for building the application.

$ podman run --rm -it -v /run/media/julius/TEST:/opt/USB docker.io/golang:1.20.3 bash
root@af7bfc594118:/go# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
..snip..
root@af7bfc594118:/go# apt update && apt -y install ffmpeg
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
..snip..
root@af7bfc594118:/go# cd /opt
root@af7bfc594118:/opt# git clone https://github.com/ambientsound/rex.git
Cloning into 'rex'...
..snip..
Resolving deltas: 100% (6/6), done.
root@af7bfc594118:/opt# cd rex/
root@af7bfc594118:/opt/rex# go build -o rex cmd/rex/main.go
go: downloading github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40
go: downloading golang.org/x/text v0.5.0
root@af7bfc594118:/opt/rex# go build -o analyze cmd/analyze/main.go
root@af7bfc594118:/opt/rex# ./rex -h
Usage of ./rex:
  -f	Overwrite export file if it exists
  -root string
    	Root path of USB drive (default "./")
  -scan string
    	Path to music files, scanned recursively. Must only contain MP3 files. (default "./")
root@af7bfc594118:/opt/rex# ls -l /opt/USB/
total 4
drwxr-xr-x 2 root root 4096 Apr 30 11:00 tracks
root@af7bfc594118:/opt/rex# ls -l /opt/USB/tracks/
total 52628
-rw-r--r-- 1 root root 14554413 Aug 17  2022 'Caim - Lagom.mp3'
-rw-r--r-- 1 root root 21252223 Aug  7  2022 'Janeret - Rear.mp3'
-rw-r--r-- 1 root root 18075967 Aug 17  2022 'Per Hammar - Inter City.mp3'

Scan and analyze

root@af7bfc594118:/opt/rex# ./rex -root /opt/USB -scan /opt/USB/tracks 
Add "/opt/USB/tracks/Caim - Lagom.mp3"
Add "/opt/USB/tracks/Janeret - Rear.mp3"
Add "/opt/USB/tracks/Per Hammar - Inter City.mp3"
Wrote /opt/USB/PIONEER/rekordbox/export.pdb
root@af7bfc594118:/opt/rex# ./analyze -index -rows /opt/USB/PIONEER/rekordbox/export.pdb
PIONEER DJ DeviceSQL file
tables=20, tx=11
Table: "Tracks"
  Meta: u1=1fff u2=1fff numentries=00
  Tracks Page: idx=02 rows=  3 deleted=  0 used= 728 free=3292 large=0000000000 tx=0006 flags=34 u3=0060 u4=0000 u5=0001
    RowSet: bitmask=0000000000000111 lastwrite=0000000000000100
      Track: heap=0000 id=0001 shift=00 exists=true  path="/tracks/Caim - Lagom.mp3"
      Track: heap=00e8 id=0002 shift=20 exists=true  path="/tracks/Janeret - Rear.mp3"
      Track: heap=01d4 id=0003 shift=40 exists=true  path="/tracks/Per Hammar - Inter City.mp3"
  Table summary: records=3 deleted=0 total=3 rowsets=1
fatal error: seek /opt/USB/PIONEER/rekordbox/export.pdb: invalid argument
root@af7bfc594118:/opt/rex#
root@af7bfc594118:/opt/rex# ./analyze -index -rows -dumb /opt/USB/PIONEER/rekordbox/export.pdb
00000: numtables=20, next_unused_page=32000, sequence=11
Tracks               first=01 last=02 empty_candidate=2d
Genres               first=03 last=03 empty_candidate=04
Artists              first=05 last=06 empty_candidate=2e
Albums               first=07 last=08 empty_candidate=2f
Labels               first=09 last=09 empty_candidate=0a
Keys                 first=0b last=0b empty_candidate=0c
Colors               first=0d last=0e empty_candidate=2c
PlaylistTree         first=0f last=10 empty_candidate=30
PlaylistEntries      first=11 last=12 empty_candidate=29
Unknown9             first=13 last=13 empty_candidate=14
Unknown10            first=15 last=15 empty_candidate=16
HistoryPlaylists     first=17 last=17 empty_candidate=18
HistoryEntries       first=19 last=19 empty_candidate=1a
Artwork              first=1b last=1b empty_candidate=1c
Unknown14            first=1d last=1d empty_candidate=1e
Unknown15            first=1f last=1f empty_candidate=20
Columns              first=21 last=22 empty_candidate=31
Unknown17            first=23 last=24 empty_candidate=2a
Unknown18            first=25 last=26 empty_candidate=2b
History              first=27 last=27 empty_candidate=28
fatal error: binary.Read: invalid type *page.IndexHeader

Results

  • I see a "REX .." playlist when I load the USB into my Pioneer XDJ1000 MK1 where I can find, load and play the MP3 files.
  • The other player can also find, load and play the MP3 files via LINK.
  • There is no waveform like here (I don't know I should expect one)
  • When combining MP3, WAV and AIFF files the player completely freezes :)
  • If I "just" create folders and put tracks in them and do not analyze them in any way the players detect the files and load the small waveform (just above "NEEDLE COUNTDOWN" in the picture here which is not the case if I scan them using REX.

juliu-s avatar Apr 30 '23 11:04 juliu-s