Skip to main content

Build Status PyPI - Python Version PyPi version PyPI - License Read the Docs Codecov CodeFactor Code style: black

Overview

This Python module decodes part of the StageLinQ protocol used by Denon DJ equipment. In its current state it is possible to read out information like track information, fader position (Crossfader, channel volume, pitchfader), BPM etc. The project also includes a description of how StageLinQ works taking from my findings as well as other code available.

This module can be used to receive this information from a device via a callback when data is available.

There is also a Wireshark Dissector that I made during my trials.

Status

An initial implementation of parts of the protocol has been done, but there is still much left to do. As the code should be at least somewhat functional I've decided to release this as is and add functionality along the way. Since I'm unsure where this is heading there is a possibility that there will be a future (major) version that will reimagine the functions completely.

The next few versions will probably be patched to bring the documentation up to date.

Documentation

Documentation is available on readthedocs.io

Installation

pip install PyStageLinQ

Issue tracking

If you find an issue, please report check known issues, and if the issue is not mentioned please report it here

Example usage

Here follow an example of how PyStageLinQ can be used:

from PyStageLinQ import EngineServices, PyStageLinQ
PrimeGo = None

# Callback for when PyStageLinQ as found a StageLinQ device. This will print out information about the found device
# and if lets the user decide if they want to subscribe to a service or not.

def new_device_found_callback(ip, discovery_frame, service_list):
    # Print device info and supplied services
    print(
        f"Found new Device on ip {ip}: Device name: {discovery_frame.device_name}, ConnectionType: {discovery_frame.connection_type}, SwName: {discovery_frame.sw_name}, "
        f"SwVersion: {discovery_frame.sw_version}, port: {discovery_frame.Port}")

    if len(service_list) > 0:
        print("Services found in device:")
    else:
        print("No services found")

    for service in service_list:
         print(f"\t{service.service} on port {service.port}")


    # Request StateMap service
    for service in service_list:
        if service.service == "StateMap":
            PrimeGo.subscribe_to_statemap(service, EngineServices.prime_go, state_map_data_print)

            
# Callback for when data has arrived from a StageLinQ device. It is up to the user what to do with this information.
            
def state_map_data_print(data):
    for message in data:
        print(message)

# Example main function, starting PyStageLinQ.
if __name__ == "__main__":
    global PrimeGo
    
    # Run PyStageLinQ on all available network interfaces
    PrimeGo = PyStageLinQ.PyStageLinQ(new_device_found_callback, name="Jaxcie StagelinQ")
    PrimeGo.start()

Wireshark dissector

When I developed this code I made a WireShark Dissector, it is included in this repo. Do note that this dissector isn't properly tested and may cause unexpected issues. As this file is not part of the Pythoncode in PyStageLinQ it can be found on GitHub

Compatability

PyStageLinQ has been tested with a Denon DJ Prime Go on Windows 10 and Linux (Mint 20.3) with Python 3.10.

Acknowledgements

Big thanks to icedream for his implementation of StageLinQ in go: https://github.com/icedream/go-stagelinq

Release files for PyStageLinQ 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyStageLinQ 0.2.1
File Size Uploaded
pystagelinq-0.2.1.tar.gz 36.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyStageLinQ 0.2.1
File Interpreter ABI Platform
pystagelinq-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / pystagelinq-0.2.1.tar.gz

Download URL pystagelinq-0.2.1.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11bc030dfd1f25b2dcf76d7203e5f5e28fe68270e9caa2c79435b185193d95ae
BLAKE2b-256 checksum
How to use checksums
f6e3f1f434e934a6cdbb141d71ed4e4b7b9d2a9eba37557585aaf65d033b28c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.2

Release files / pystagelinq-0.2.1-py3-none-any.whl

Download URL pystagelinq-0.2.1-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39ea5e47a8746e1cc82e47caa3aea2adcd8916d7f8f538b36fb2b5381e71b2a4
BLAKE2b-256 checksum
How to use checksums
df38787e3baa2db1edd71ec0de0bbf0c8fd254247a4618b578be5db66cbd6e50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page