Package org.deepsymmetry.beatlink
A library for synchronizing with beats from Pioneer DJ Link equipment, and finding out details about the tracks that are playing.
Overview and installation instructions are found on the Project page on GitHub.
This top level package provides classes for finding a DJ Link network, watching for devices to appear and
disappear on it, and creating a VirtualCdj
which can obtain more detailed
information about what other players are doing, like their current tempo, pitch, playback state, which player is
the current tempo master, and the source and database ID of the currently-loaded rekordbox track. See the
CdjStatus
class for more details.
The classes in the org.deepsymmetry.beatlink.data
package can augment this low-level information with
rich details about the track metadata, including album art, cue point locations, beat grid, and waveforms, both
the whole-track preview, and full detailed waveform for scrolling through. The
MetadataFinder
is the main coordinator for obtaining and caching this
information, and it keeps track of the track metadata for all tracks loaded on decks, either for current playback,
or as hot cues.
The metadata queries are performed with the help of the org.deepsymmetry.beatlink.dbserver
package,
which knows how to locate and communicate with the database servers running on the players.
For shows in which four players are in use, the dbserver interface cannot be relied on, since we are not able
to use a real player number ourselves. The CrateDigger
class allows us to
still obtain metadata in those situations, by downloading entire rekordbox database export files from the players
using their NFSv2 servers, which do not care about player numbers. By parsing the database it can also find and
download the files containing track analysis information like waveforms, beat grids, artwork, etc.
Background
This project is based on research performed with dysentery, and the protocol analysis resulting from that project.
Raw database access is provided by the Crate Digger project.
An good example of an application built using this library is Beat Link Trigger.
- Author:
- James Elliott
-
Interface Summary Interface Description BeatListener The listener interface for receiving beat announcements.DeviceAnnouncementListener The listener interface for receiving device announcements.DeviceUpdateListener The listener interface for receiving detailed updates from all devices.FaderStartListener The listener interface for receiving fader start commands.LifecycleListener The listener interface for receiving updates when a Beat Link component is started or stopped.MasterHandoffListener The listener interface for receiving tempo master handoff messages.MasterListener The listener interface for receiving updates about changes to tempo master state.MediaDetailsListener The listener interface for receiving media detail responses when theVirtualCdj
has been told to ask for information about what is in a player’s media slot.OnAirListener The listener interface for receiving on-air status messages.PrecisePositionListener The listener interface for receiving precise position announcements.SyncListener The listener interface for receiving sync control messages. -
Class Summary Class Description Beat A device update that announces the start of a new beat on a DJ Link network.BeatFinder Watches for devices to report new beats by broadcasting beat packets on port 50001, and passes them on to registered listeners.CdjStatus Represents a status update sent by a CDJ (or perhaps other player) on a DJ Link network.DeviceAnnouncement Represents a device announcement seen on a DJ Link network.DeviceAnnouncementAdapter An abstract adapter class for receiving device announcements.DeviceFinder Watches for devices to report their presence by broadcasting announcement packets on port 50000, and keeps a list of the devices that have been seen, and the network address on which they were seen.DeviceReference Uniquely identifies a device on the network.DeviceUpdate Represents a device status update seen on a DJ Link network.LifecycleParticipant Provides the abstract skeleton for all the classes that can be started and stopped in Beat Link, and for which other classes may have a need to know when they start or stop.MasterAdapter An abstract adapter class for receiving updates related to the tempo master.MediaDetails Represents information about the media mounted in a player's slot; returned in response to a media query packet.MixerStatus Represents a status update sent by a mixer on a DJ Link network.PlayerSettings Encapsulates the “My Settings” configuration parameters that can be applied to a player over the network.PrecisePosition A device update that reports the exact playback position of a CDJ-3000 (or newer?) player, even if it is not currently playing.Util Provides utility functions.VirtualCdj Provides the ability to create a virtual CDJ device that can lurk on a DJ Link network and receive packets sent to players, monitoring the detailed state of the other devices.VirtualRekordbox Provides the ability to emulate the Rekordbox lighting application which causes devices to share their player state and PSSI (track phrase data). -
Enum Summary Enum Description CdjStatus.PlayState1 The possible values of the first play state found in the packet, labeled P1 in the Packet Analysis document.CdjStatus.PlayState2 The possible values of the second play state found in the packet, labeled P2 in the Packet Analysis document.CdjStatus.PlayState3 The possible values of the third play state found in the packet, labeled P3 in the Packet Analysis document.CdjStatus.TrackSourceSlot The possible values describing from where the track was loaded, labeled Sr in the Packet Analysis document.CdjStatus.TrackType The possible values describing the track type, labeled tr in the Packet Analysis document.PlayerSettings.AutoCueLevel The options for establishing an automatic cue point when loading a track.PlayerSettings.AutoLoadMode The options for whether to autoload hot cues when loading a track.PlayerSettings.Illumination The brightness choices for optional illumination (for example of the jog ring or disc slot).PlayerSettings.JogMode The options for how the jog wheel affects playback.PlayerSettings.JogWheelDisplay The options for what to display in the jog wheel display screens.PlayerSettings.Language The options for the player user interface language.PlayerSettings.LcdBrightness The brightness options for the player's LCD screen.PlayerSettings.PadButtonBrightness The brightness options for the player's performance pads and buttons.PlayerSettings.PhaseMeterType The options for the phase meter type.PlayerSettings.PlayMode The options for whether to keep playing when a track ends.PlayerSettings.QuantizeMode The options the quantization size.PlayerSettings.TempoRange The options for tempo range limits.PlayerSettings.TimeDisplayMode The options for how time is displayed on the player.PlayerSettings.Toggle A standard on/off choice which is used in many settings.PlayerSettings.VinylSpeedAdjust The options for the vinyl speed adjust mode.Util.PacketType The known packet types used in the protocol, along with the byte values which identify them, and the names by which we describe them, and the port on which they are received.