### Install Documentation Dependencies Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/README.md Run this command in the repository root to install the necessary tools for building the documentation. ```bash npm install ``` -------------------------------- ### Define Query Context Setup Message Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Visualizes the initial setup message required to establish a query context, using a specific type and TxID. ```Clojure include::example$dbserver_shared.edn[] (draw-remotedb-header 0 6) (draw-number-field (text "D" :math [:sub "ours"])) ``` -------------------------------- ### Query context setup response Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc The response message sent by the player after a query context setup request, returning the player number. ```bytefield include::example$dbserver_shared.edn[] (draw-remotedb-header "0 response" 6 6) (draw-number-field 0) (draw-number-field (text "D" :math [:sub "theirs"])) ``` -------------------------------- ### Initialize DJ Link device finder Source: https://context7.com/deep-symmetry/dysentery/llms.txt Starts a background thread to listen for device announcements on UDP port 50000. ```clojure (require '[dysentery.finder :as finder]) ;; Start listening for DJ Link device announcements (finder/start) ;; The finder creates a UDP socket on port 50000 and processes ;; announcement packets in a background thread ;; Wait a moment for devices to announce themselves (Thread/sleep 2000) ``` -------------------------------- ### BPM Value Representation Examples Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/beats.adoc Examples of how BPM values are converted to hexadecimal format for packet storage. ```text 4b2 ``` ```text ffffffff ``` -------------------------------- ### Control Playback and Routing Source: https://context7.com/deep-symmetry/dysentery/llms.txt Emulates mixer fader start functionality and channel on-air status for players on the network. ```clojure (require '[dysentery.vcdj :as vcdj]) ;; Start players 1 and 2, stop player 3 (vcdj/send-fader-start #{1 2} ; players to start #{3}) ; players to stop ;; Just start player 1 (vcdj/send-fader-start #{1} #{}) ``` ```clojure (require '[dysentery.vcdj :as vcdj]) ;; Mark players 1 and 3 as on-air (vcdj/send-on-air #{1 3}) ;; Clear all on-air status (vcdj/send-on-air #{}) ``` -------------------------------- ### Database Connection Setup Packet Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc This packet is sent to the discovered database port to establish a connection. The server responds with the same five bytes. ```edn include::example$dbserver_shared.edn[] (def boxes-per-row 5) (def left-margin 1) (draw-column-headers) (draw-number-field 1) ``` -------------------------------- ### Log Beat Packets Source: https://github.com/deep-symmetry/dysentery/blob/main/README.md Commands to start and stop logging beat data from a specific player to a file. ```clojure (view/log-beats 3 "/Users/james/Desktop/beats.txt") ``` ```clojure (view/log-beats) ``` -------------------------------- ### Define Fader Start Packet Structure Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/mixer_integration.adoc Defines the bytefield layout for the fader start command packet sent to port 50001. ```clojure include::example$status_shared.edn[] (draw-packet-header 0x02) (draw-boxes [(hex-text 0 2 :bold) (text "D" :math)]) (draw-box (text "len" :math [:sub "r"]) {:span 2}) (doseq [i (range 1 5)] (draw-box (text "C" :math [:sub i]))) ``` -------------------------------- ### Start a virtual CDJ device Source: https://context7.com/deep-symmetry/dysentery/llms.txt Registers a virtual CDJ on the network to receive status packets and send commands. Player numbers 1-4 are required for metadata requests. ```clojure (require '[dysentery.vcdj :as vcdj] '[dysentery.finder :as finder]) ;; Find devices and get network configuration (finder/start) (Thread/sleep 2000) (let [device (first (finder/current-dj-link-devices)) [interface address] (finder/find-interface-and-address-for-device device)] ;; Start the virtual CDJ with default settings (player number 5) (vcdj/start interface address) ;; Or customize the device name and player number ;; Note: Player numbers 1-4 are required for metadata requests (vcdj/start interface address :device-name "My Virtual CDJ" :player-number 4)) ``` -------------------------------- ### Request Album Art via Clojure REPL Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Example expression to request album art from a connected player within a Clojure REPL environment. ```clojure (def art (db/request-album-art p2 3 3)) ``` -------------------------------- ### Request 3-Band Waveform Preview Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Send this message to request the 3-band waveform preview of a track. Ensure TxID is incremented and D matches the initial setup. ```EDN (draw-remotedb-header 0x2c04 6 6 6 6) (draw-dmst-field 1) (draw-number-field (text "rekordbox" :math)) (draw-related-boxes [0x11 0x36 0x56 0x57 0x50]) (draw-related-boxes [0x11 0x00 0x58 0x45 0x32]) ``` -------------------------------- ### Build Local Documentation Preview Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/README.md Generates the documentation site locally, which can then be viewed by opening the generated index.html file. ```bash npm run local-docs ``` -------------------------------- ### Build Executable JAR Source: https://github.com/deep-symmetry/dysentery/blob/main/README.md Use Leiningen to compile the project and generate an executable JAR file. ```bash lein uberjar ``` -------------------------------- ### POST /render-menu Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Requests the player to render the current menu of metadata items based on a previously established query context. ```APIDOC ## POST /render-menu ### Description Retrieves the actual metadata entries after a successful track metadata request by specifying an offset and limit. ### Endpoint /render-menu ### Parameters #### Request Body - **DMST** (4-byte field) - Required - Must match the values used in the initial setup packet. - **offset** (number) - Required - The starting index for the menu items. - **limit** (number) - Required - The maximum number of items to return. - **total** (number) - Required - The total number of items expected. ``` -------------------------------- ### Request Waveform Preview in Clojure Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc This Clojure function demonstrates how to request a waveform preview from a player. Replace arguments with your player connection, media slot, and track ID. ```clojure (db/request-waveform-preview p2 3 1060) ``` -------------------------------- ### Connect to player database Source: https://context7.com/deep-symmetry/dysentery/llms.txt Establishes a TCP connection to a player's database server. Requires posing as an unused player number (1-4). ```clojure (require '[dysentery.dbserver :as db] '[dysentery.finder :as finder]) ;; Ensure finder is running (finder/start) (Thread/sleep 2000) ;; Connect to player 2's database server, posing as player 4 (def player (db/connect-to-player 2 4)) ;; => Transaction: 4294967294, message type: 0x4000 (requested data available)... ;; => {:socket #object[...], :input-stream ..., :number 4, :target 2, :counter #atom[1]} ;; Always disconnect when done (db/disconnect player) ``` -------------------------------- ### Connect to Player Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Establishes a connection to a player. Requires the player number to connect to and the local player number to use. ```clojure (def p2 (db/connect-to-player 2 1)) ``` -------------------------------- ### GET Extended Cue Information Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Requests extended cue and loop point data for a specific track identified by its database ID. ```APIDOC ## GET /extended-cue-info ### Description Requests extended cue and loop point data for a track. The request requires device identification, slot information, track type, and the track's database ID. ### Method GET ### Endpoint /extended-cue-info ### Parameters #### Query Parameters - **D** (integer) - Required - Device identifier asking the question. - **Sr** (integer) - Required - Slot in which the track is found. - **Tr** (integer) - Required - Track type. - **rekordbox** (integer) - Required - Database ID of the track. ### Response #### Success Response (200) - **type** (hex) - Message type `4e02`. - **echo** (hex) - Echoes request type `2b04`. - **length** (integer) - Length of the cue/loop blob in bytes. - **blob** (binary) - The actual bytes of cue and loop points (omitted if length is 0). - **num_entries** (integer) - Number of cue point entries found. #### Response Example { "type": "4e02", "echo": "2b04", "length": 128, "num_entries": 2 } ``` -------------------------------- ### Manage Status Broadcasting Source: https://context7.com/deep-symmetry/dysentery/llms.txt Starts or stops the periodic broadcast of status packets to the network. Required for full protocol participation and tempo master features. ```clojure (require '[dysentery.vcdj :as vcdj]) ;; Set initial state (vcdj/set-tempo 128.0) (swap! @#'vcdj/state assoc :playing? true :beat 1 :sync? true) ;; Start broadcasting status (vcdj/start-sending-status) ;; Stop sending status (vcdj/stop-sending-status) ``` -------------------------------- ### Configure Sync Modes Source: https://context7.com/deep-symmetry/dysentery/llms.txt Controls sync functionality for the local virtual CDJ or remote players on the network. ```clojure (require '[dysentery.vcdj :as vcdj]) ;; Enable sync mode (vcdj/set-sync-mode true) ;; Disable sync mode (vcdj/set-sync-mode false) ``` ```clojure (require '[dysentery.vcdj :as vcdj]) ;; Turn on sync for player 2 (vcdj/set-player-sync 2 true) ;; Turn off sync for player 3 (vcdj/set-player-sync 3 false) ``` -------------------------------- ### view/log-beats Source: https://context7.com/deep-symmetry/dysentery/llms.txt Logs detailed beat packet information from a specific player to a file for timing analysis. Can be called with arguments to start logging or without arguments to stop. ```APIDOC ## POST /view/log-beats ### Description Logs detailed beat packet information from a specific player to a file for timing analysis. Call with player ID and filename to start, or without arguments to stop. ### Method POST ### Endpoint /view/log-beats ### Parameters #### Request Body - **player_id** (integer) - Optional - The ID of the player to log beats from. If omitted, logging stops. - **filename** (string) - Optional - The path to the file where beat logs will be saved. Required if player_id is provided. ### Request Example ```json { "player_id": 3, "filename": "/Users/james/Desktop/beats.txt" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates whether logging started or stopped. #### Response Example ```json { "status": "Beat logging started for player 3." } ``` ``` -------------------------------- ### POST /waveform/preview Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Request a monochrome waveform preview for a specific track. ```APIDOC ## POST /waveform/preview ### Description Requests a monochrome waveform preview for a track identified by its rekordbox ID. The request uses message type 2004. ### Method POST ### Parameters #### Request Body - **type** (integer) - Required - Message type, must be 2004. - **D** (integer) - Required - Device identifier (menu location 8). - **Sr** (integer) - Required - Media slot identifier. - **Tr** (integer) - Required - Track type identifier. - **rekordbox** (integer) - Required - The rekordbox ID of the track. ### Response #### Success Response (200) - **type** (integer) - Echoes request type 2004. - **length** (integer) - Length of the waveform preview in bytes. - **blob** (binary) - The actual bytes of the waveform preview (900 bytes total). ``` -------------------------------- ### Waveform Detail Request Message Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc This EDN code constructs a message to request detailed waveform data. Ensure TxID is incremented for each query and D matches the device ID from context setup. ```edn (draw-remotedb-header 0x2c04 6 6 6 6) (draw-dmst-field 1) (draw-number-field (text "rekordbox" :math)) (draw-related-boxes [0x11 0x35 0x56 0x57 0x50]) (draw-related-boxes [0x11 0x00 0x54 0x58 0x45]) ``` -------------------------------- ### Build and Run Dysentery Interactively Source: https://github.com/deep-symmetry/dysentery/blob/main/README.md Clone the repository and use Leiningen to build and run the project interactively in a Clojure REPL. This is for development and exploration of the source code. ```bash lein repl ``` -------------------------------- ### Request Folder Contents Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc To list the contents of a folder, use this function with the player connection, media slot ID, folder ID (e.g., 0 for root), and set the folder flag to true. ```clojure (db/request-playlist p2 3 0 true) ``` -------------------------------- ### Run Custom Antora Configuration Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/README.md Executes Antora using a specific configuration file, useful for local-only overrides. ```bash npx antora --fetch doc/lolo.yml ``` -------------------------------- ### dbserver/connect-to-player Source: https://context7.com/deep-symmetry/dysentery/llms.txt Establishes a TCP connection to a player's database server for metadata queries. Requires posing as an unused player number (1-4). ```APIDOC ## POST /dbserver/connect-to-player ### Description Establishes a TCP connection to a player's database server for metadata queries. Requires posing as an unused player number (1-4). ### Method POST ### Endpoint /dbserver/connect-to-player ### Parameters #### Request Body - **target_player_id** (integer) - Required - The ID of the player to connect to. - **posing_player_id** (integer) - Required - An unused player number (1-4) to pose as for the connection. ### Request Example ```json { "target_player_id": 2, "posing_player_id": 4 } ``` ### Response #### Success Response (200) - **connection_details** (object) - An object containing details of the established connection, including socket, streams, player number, target, and counter. #### Response Example ```json { "connection_details": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 } } ``` ``` -------------------------------- ### vcdj/start-sending-status Source: https://context7.com/deep-symmetry/dysentery/llms.txt Begins sending status packets to all devices on the network at 200ms intervals. ```APIDOC ## vcdj/start-sending-status ### Description Begins sending status packets to all devices on the network at 200ms intervals. This is required for full protocol participation including tempo master functionality. ``` -------------------------------- ### Request waveform preview Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves and displays a waveform preview for a track. ```clojure (require '[dysentery.dbserver :as db]) ;; Request waveform preview for track 42 (db/request-waveform-preview player 3 42) ;; Opens window displaying 400-pixel waveform preview ;; Returns the raw response message ``` -------------------------------- ### Discover DJ Link Devices Source: https://github.com/deep-symmetry/dysentery/blob/main/README.md Use this command in the REPL to scan for and list available DJ Link devices on the network. ```clojure (view/find-devices) ``` -------------------------------- ### Request cue points via dbserver Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves cue point and loop information for a specific track. ```clojure (require '[dysentery.dbserver :as db]) ;; Request cue points for track 42 (db/request-cue-points player 3 42) ;; => Sending > Transaction: 7, message type: 0x2104 (request track cue points)... ;; Returns blob data containing cue point information ``` -------------------------------- ### vcdj/become-master Source: https://context7.com/deep-symmetry/dysentery/llms.txt Attempts to become the tempo master by sending a handoff request to the current master player. ```APIDOC ## vcdj/become-master ### Description Attempts to become the tempo master by sending a handoff request to the current master player. Requires the virtual CDJ to use player number 1-4. ``` -------------------------------- ### dbserver/request-waveform-preview Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves and displays the waveform preview for a track. ```APIDOC ## POST /dbserver/request-waveform-preview ### Description Retrieves and displays the waveform preview for a track. ### Method POST ### Endpoint /dbserver/request-waveform-preview ### Parameters #### Request Body - **connection** (object) - Required - The connection object obtained from `dbserver/connect-to-player`. - **slot_type** (integer) - Required - The type of media slot (1=CD, 2=SD, 3=USB). - **track_id** (integer) - Required - The ID of the track for which to request the waveform preview. ### Request Example ```json { "connection": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 }, "slot_type": 3, "track_id": 42 } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation that the waveform preview has been generated and displayed. #### Response Example ```json { "message": "Waveform preview displayed." } ``` ``` -------------------------------- ### Define vocal configuration data structure Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Visualizes the byte layout for vocal configuration thresholds. ```bytefield (draw-column-headers) (draw-related-boxes (repeat 2 nil)) (draw-box (text "thr" :math [:sub "low"]) {:span 2}) (draw-box (text "thr" :math [:sub "mid"]) {:span 2}) (draw-box (text "thr" :math [:sub "high"]) {:span 2}) ``` -------------------------------- ### dbserver/request-playlist Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves playlist contents or folder structure. ```APIDOC ## POST /dbserver/request-playlist ### Description Retrieves playlist contents or folder structure. ### Method POST ### Endpoint /dbserver/request-playlist ### Parameters #### Request Body - **connection** (object) - Required - The connection object obtained from `dbserver/connect-to-player`. - **slot_type** (integer) - Required - The type of media slot (1=CD, 2=SD, 3=USB). - **folder_id** (integer) - Required - The ID of the folder or playlist to retrieve. - **is_playlist** (boolean) - Required - True if requesting a playlist, false if requesting a folder structure. - **sort_order** (integer) - Optional - The desired sort order. ### Request Example ```json { "connection": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 }, "slot_type": 3, "folder_id": 0, "is_playlist": true, "sort_order": 2 } ``` ### Response #### Success Response (200) - **playlist_data** (array) - Data representing the playlist or folder structure. #### Response Example ```json { "playlist_data": [ { "id": 1, "name": "My Playlist", "type": "playlist" }, { "id": 2, "name": "Another Folder", "type": "folder" } ] } ``` ``` -------------------------------- ### Request track list Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves a list of all tracks in a specified media slot. ```clojure (require '[dysentery.dbserver :as db]) ;; Get all tracks from USB slot, sorted by artist (order 2) (def tracks (db/request-track-list player 3 2)) ;; => Sending > Transaction: 4, message type: 0x1004 (request track menu)... ;; => Received > Transaction: 4, message type: 0x4000 (requested data available)... ;; Returns sequence of track metadata messages ``` -------------------------------- ### Cue/loop point entry format Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Describes the 24-byte entry structure for individual cue or loop points. ```bytefield (draw-column-headers) (draw-box (text "F" :math [:sub "l"])) (draw-box (text "F" :math [:sub "c"])) (draw-box (text "H" :math)) (draw-related-boxes (repeat 9 0)) (draw-box (text "cue" :math) {:span 4}) (draw-box (text "loop" :math) {:span 4}) (draw-related-boxes (repeat 16 0)) ``` -------------------------------- ### Run Dysentery standalone application Source: https://context7.com/deep-symmetry/dysentery/llms.txt Commands for running the packet analyzer or building the project from source. ```bash # Download dysentery.jar from releases page # Run the packet analyzer java -jar dysentery.jar # => Looking for DJ Link devices... # => Found: # => CDJ-2000nexus /172.16.42.4 # => DJM-2000nexus /172.16.42.5 # => CDJ-2000nexus /172.16.42.6 # => # => To communicate create a virtual CDJ with address /172.16.42.2, # => MAC address 3c:15:c2:e7:08:6c, and use broadcast address /172.16.42.255 # => # => Close any Player window to exit. # Build from source using Leiningen lein uberjar # Creates target/dysentery.jar ``` -------------------------------- ### Menu Request Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/menus.adoc Initiates a request for a specific menu type. The player responds with the original menu type and the total number of available entries. ```APIDOC ## Menu Request ### Description Sends a request to retrieve a specific menu structure. The player responds with a packet (type 4000) containing the requested menu type and the total count of available entries. ### Parameters #### Request Body - **type** (integer) - Required - The identifier for the menu type (e.g., 1000 for Root, 1001 for Genre). - **r:m:s:t** (string) - Required - Request parameters. - **sort** (string) - Required - Sorting criteria. - **arguments** (list) - Optional - Additional arguments required for specific menu types (e.g., IDs for filtered menus). ``` -------------------------------- ### vcdj/appoint-master Source: https://context7.com/deep-symmetry/dysentery/llms.txt Instructs another player to take over the tempo master role. ```APIDOC ## vcdj/appoint-master ### Description Instructs another player to take over the tempo master role. ### Parameters #### Request Body - **player-number** (integer) - Required - The target player ID. ``` -------------------------------- ### Load Settings command packet structure Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/loading_tracks.adoc Defines the 116-byte packet structure used to apply 'My Settings' configuration to a target player. ```bytefield include::example$status_shared.edn[] (defattrs :small (eval-attribute-spec [:math {:font-size 14}])) (draw-column-headers) (draw-related-boxes [0x51 0x73 0x70 0x74 0x31 0x57 0x6d 0x4a 0x4f 0x4c (hex-text 0x34 2 :bold)] :bg-green) (draw-box nil [{:span 5} :box-above]) (draw-box (text "Device Name (padded with " :plain [:hex "00"] ")") [{:span 15} :box-below]) (draw-boxes [(hex-text 2 2 :bold) (text "D" :math) (text "D" :math [:sub "s"])]) (draw-box (text "len" :math [:sub "r"]) {:span 2}) (draw-related-boxes [0x12 0x34 0x56 0x78 0x00 0x00 0x00 0x03]) (draw-box (text "OAD" :small)) (draw-box (text "B" :math [:sub "l"])) (draw-box (text "Q" :math)) (draw-box (text "ACL" :small)) (draw-box (text "L" :math)) (draw-box 0x01) (draw-box (text "B" :math [:sub "jr"])) ``` -------------------------------- ### Sync Control Packet Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/sync.adoc Send this packet to a target device to turn Sync mode on or off. The value of 'S' determines the action: 0x10 to turn Sync on, and 0x20 to exit Sync mode. 'D' should be the player number you are pretending to be. ```APIDOC ## POST /api/sync/control ### Description Controls the Sync mode of a player. ### Method POST ### Endpoint /api/sync/control ### Parameters #### Request Body - **D** (byte) - Required - The player number you are pretending to be. - **S** (byte) - Required - `0x10` to turn Sync on, `0x20` to exit Sync mode. ### Request Example ```json { "D": 1, "S": "0x10" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### view/watch-devices Source: https://context7.com/deep-symmetry/dysentery/llms.txt Creates visual windows displaying real-time packet analysis for all DJ Link devices on the network. ```APIDOC ## view/watch-devices ### Description Creates visual windows displaying real-time packet analysis for all DJ Link devices on the network. ### Parameters #### Query Parameters - **device-name** (string) - Optional - Custom name for the virtual CDJ. - **player-number** (integer) - Optional - Player number for the virtual CDJ. ``` -------------------------------- ### Monitor Network Devices Source: https://context7.com/deep-symmetry/dysentery/llms.txt Initializes a visual window for real-time packet analysis of DJ Link devices. Allows customization of the virtual CDJ identity. ```clojure (require '[dysentery.view :as view]) ;; Start watching all devices with default settings (view/watch-devices) ;; => Looking for DJ Link devices... ;; => Found: ;; => CDJ-2000nexus /172.16.42.4 ;; => DJM-2000nexus /172.16.42.5 ;; => To communicate create a virtual CDJ with address /172.16.42.2... ;; Customize the virtual CDJ name and player number (view/watch-devices :device-name "Analyzer" :player-number 4) ``` -------------------------------- ### Request playlist contents Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves playlist folders or specific playlist contents. ```clojure (require '[dysentery.dbserver :as db]) ;; Request root playlist folder (folder ID 0) (db/request-playlist player 3 0 true) ;; Request specific playlist by ID (db/request-playlist player 3 5 false) ;; With sort order (db/request-playlist player 3 5 false 2) ``` -------------------------------- ### vcdj/send-fader-start Source: https://context7.com/deep-symmetry/dysentery/llms.txt Sends fader start/stop messages to control playback on players. ```APIDOC ## vcdj/send-fader-start ### Description Sends fader start/stop messages to control playback on players (emulates mixer fader start functionality). ### Parameters #### Request Body - **start-players** (set) - Required - Set of player IDs to start. - **stop-players** (set) - Required - Set of player IDs to stop. ``` -------------------------------- ### Render Menu Request Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/menus.adoc Used to paginate through menu results after the initial menu request has been made. ```APIDOC ## Render Menu Request ### Description Sends a request (type 3000) to retrieve specific pages of menu entries. The response includes a header (4001), a series of menu items (4101), and a footer (4201). ### Method POST ### Parameters #### Request Body - **type** (integer) - Required - Must be 3000. ``` -------------------------------- ### Request Track List in Clojure Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Functions to request track lists from a player connection, with optional sort order parameters. ```clojure (db/request-track-list p2 3) ``` ```clojure (db/request-track-list p2 3 4) ``` -------------------------------- ### Request beat grid Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves beat timing information for a track. ```clojure (require '[dysentery.dbserver :as db]) ;; Request beat grid for track 42 (def grid (db/request-beat-grid player 3 42)) ;; => [{:beat 0, :time 0} ;; {:beat 1, :time 463} ;; {:beat 2, :time 927} ;; ...] ;; Each entry shows the beat number and its position in milliseconds ``` -------------------------------- ### dbserver/request-metadata Source: https://context7.com/deep-symmetry/dysentery/llms.txt Requests track metadata from a player's database server. ```APIDOC ## POST /dbserver/request-metadata ### Description Requests track metadata from a player's database server. ### Method POST ### Endpoint /dbserver/request-metadata ### Parameters #### Request Body - **connection** (object) - Required - The connection object obtained from `dbserver/connect-to-player`. - **slot_type** (integer) - Required - The type of media slot (1=CD, 2=SD, 3=USB). - **track_id** (integer) - Required - The ID of the track for which to request metadata. ### Request Example ```json { "connection": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 }, "slot_type": 3, "track_id": 42 } ``` ### Response #### Success Response (200) - **metadata** (array) - An array of metadata objects for the requested track, including number, type, and value (e.g., track title, artist name). #### Response Example ```json { "metadata": [ { "number": 42, "type": "numeric", "value": 42 }, { "number": 1, "type": "string", "value": "Track Title" }, { "number": 2, "type": "string", "value": "Artist Name" } ] } ``` ``` -------------------------------- ### Request Waveform Preview Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Use this message type to request a monochrome waveform preview of a track. Ensure TxID is incremented for each query. ```bytefield (draw-remotedb-header 0x2004 6 6 6 6 3) (draw-dmst-field 8) (draw-number-field 4) (draw-number-field (text "rekordbox" :math)) (draw-number-field 0) ``` -------------------------------- ### Watch Devices Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Initiates a watch for DJ Link devices on the network. Specify the player number to use for communication. ```clojure (view/watch-devices :player-number 1) ``` -------------------------------- ### dbserver/search Source: https://context7.com/deep-symmetry/dysentery/llms.txt Performs a substring search across track metadata on a player. ```APIDOC ## dbserver/search ### Description Performs a substring search across track metadata. ### Parameters #### Path Parameters - **player** (object) - Required - The player instance to query. - **slot** (integer) - Required - The media slot index. - **query** (string) - Required - The substring to search for in track metadata. ### Request Example (db/search player 3 "love") ``` -------------------------------- ### dbserver/request-beat-grid Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves beat grid timing information for a track. ```APIDOC ## POST /dbserver/request-beat-grid ### Description Retrieves beat grid timing information for a track. ### Method POST ### Endpoint /dbserver/request-beat-grid ### Parameters #### Request Body - **connection** (object) - Required - The connection object obtained from `dbserver/connect-to-player`. - **slot_type** (integer) - Required - The type of media slot (1=CD, 2=SD, 3=USB). - **track_id** (integer) - Required - The ID of the track for which to request the beat grid. ### Request Example ```json { "connection": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 }, "slot_type": 3, "track_id": 42 } ``` ### Response #### Success Response (200) - **beat_grid** (array) - An array of objects, where each object contains the beat number and its corresponding time in milliseconds. #### Response Example ```json { "beat_grid": [ { "beat": 0, "time": 0 }, { "beat": 1, "time": 463 }, { "beat": 2, "time": 927 } ] } ``` ``` -------------------------------- ### POST /track-list Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Requests a full list of tracks from a media stick, allowing for sorting and metadata caching. ```APIDOC ## POST /track-list ### Description Requests all metadata associated with a media stick. This initiates a menu-based retrieval process where the player reports the number of available items, followed by subsequent 'render menu' requests. ### Method POST ### Parameters #### Request Body - **TxID** (integer) - Required - Transaction ID. - **D** (integer) - Required - Device ID. - **Sr** (integer) - Required - Slot index. - **Tr** (integer) - Required - Track type. - **sort** (integer) - Required - Determines the sort order of the returned tracks (e.g., 0 for title order). ### Response #### Success Response (200) - **type** (hex) - 1004 - **count** (integer) - Number of menu items available for retrieval. ``` -------------------------------- ### Menu Requests Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/menus.adoc These endpoints allow for retrieving various menu-related information such as playlists, folders, and track metadata. ```APIDOC ## Playlist Menu ### Description Retrieves playlist information. ### Method GET ### Endpoint /api/menu/playlist ### Parameters #### Query Parameters - **r:m:s:t** (four-byte number) - Required - Requester, menu location, slot, and type identifier. - **sort** (string) - Optional - Sorting parameters. - **playlist_id** (string) - Required - The ID of the playlist. - **type** (integer) - Required - Type of the item (0: playlist, 1: folder). ### Response #### Success Response (200) - **data** (array) - List of playlist items. ### Response Example ```json { "data": [ { "id": "track123", "title": "Example Track", "artist": "Example Artist" } ] } ``` ``` ```APIDOC ## Folder Menu ### Description Retrieves folder contents. ### Method GET ### Endpoint /api/menu/folder ### Parameters #### Query Parameters - **r:m:s:t** (four-byte number) - Required - Requester, menu location, slot, and type identifier. - **sort** (string) - Optional - Sorting parameters. - **folder_id** (string) - Required - The ID of the folder. - **unknown** (integer) - Required - An unknown parameter, typically 0. ### Response #### Success Response (200) - **data** (array) - List of items within the folder. ### Response Example ```json { "data": [ { "id": "subfolder1", "name": "Subfolder 1" }, { "id": "track456", "title": "Another Track" } ] } ``` ``` -------------------------------- ### Request cue points and loops Source: https://github.com/deep-symmetry/dysentery/blob/main/doc/modules/ROOT/pages/track_metadata.adoc Defines the message structure for requesting standard cue points and loops compatible with original nexus players. ```bytefield include::example$dbserver_shared.edn[] (draw-remotedb-header 0x2104 6 6) (draw-dmst-field 8) (draw-number-field (text "rekordbox" :math)) ``` -------------------------------- ### dbserver/request-track-list Source: https://context7.com/deep-symmetry/dysentery/llms.txt Retrieves the list of all tracks in a media slot, with optional sorting. ```APIDOC ## POST /dbserver/request-track-list ### Description Retrieves the list of all tracks in a media slot, with optional sorting. ### Method POST ### Endpoint /dbserver/request-track-list ### Parameters #### Request Body - **connection** (object) - Required - The connection object obtained from `dbserver/connect-to-player`. - **slot_type** (integer) - Required - The type of media slot (1=CD, 2=SD, 3=USB). - **sort_order** (integer) - Optional - The desired sort order for the track list (e.g., 2 for sorting by artist). ### Request Example ```json { "connection": { "socket": "", "input_stream": "", "number": 4, "target": 2, "counter": 1 }, "slot_type": 3, "sort_order": 2 } ``` ### Response #### Success Response (200) - **tracks** (array) - A sequence of track metadata messages representing the tracks in the specified slot. #### Response Example ```json { "tracks": [ { "track_id": 1, "title": "Song A", "artist": "Artist X" }, { "track_id": 2, "title": "Song B", "artist": "Artist Y" } ] } ``` ```