Mixxx Documentation
repository·main·Indexed 27 days ago
https://github.com/mixxxdj/mixxxFree, open-source DJ software for live performance on GNU/Linux, Windows, and macOS. This documentation includes guides for building from source, Flatpak installation, and developer references for internal libraries such as QM-DSP (Digital Signal Processing), SPSCQueue (lock-free communication), and rendergraph shaders. It also provides details on controller script linting and Icecast streaming via libshout.
What's inside Mixxx
- This library provides a C++ implementation of the Kaitai Struct API using the Standard Template Library (STL). It is designed to work with Kaitai Struct, a declarative language used to describe binary data structures such as binary file formats or network stream packet formats.
Use SPSCQueue for single-producer single-consumer communication
mainSPSCQueue is a wait-free and lock-free fixed-size queue designed for C++11. It is optimized for scenarios where exactly one thread performs enqueue operations (the producer) and exactly one thread performs dequeue operations (the consumer).
Constraint: Any usage involving multiple writers or multiple readers is invalid and will lead to undefined behavior.
SPSCQueue<int> q(1); auto t = std::thread([&] { while (!q.front()); std::cout << *q.front() << std::endl; q.pop(); }); q.push(1); t.join();Use rendergraph shaders with OpenGL (Qt >= 6.6)
mainFor projects using Qt 6.6 or newer, the OpenGL implementation ofrendergraph::MaterialShaderhandles shaders automatically. GLSL shaders are extracted programmatically usingQShaderand then utilized withQOpenGLShader.Add or change controller mappings and advanced behaviors
mainIf your DJ controller is not supported or is not working as expected in Mixxx, you can manually add or modify controller mappings. Mixxx provides methods to get your controller working immediately through custom mapping files or scripts.
http://mixxx.org/forums/viewtopic.php?f=3&t=949Run QM-DSP unit tests
mainTo build and run the unit tests for the QM-DSP library, add the
testtarget to yourmakecommand.Requirement: You must have the Boost library installed to run tests.
Get started with Mixxx
mainDepending on your needs, you can use Mixxx in three ways:
- Live Use: Download the latest stable version from the official website.
- Experimentation and Testing: Download a development release.
- Bleeding Edge: Clone the repository directly to your local machine.
Mixxx is compatible with GNU/Linux, Windows, and macOS.
git clone https://github.com/mixxxdj/mixxx.gitAccess Mixxx documentation and guides
mainFor help using the software, refer to the following resources:
- Mixxx Manual: Official user guide.
- Mixxx Wiki: Community-driven documentation.
- Hardware Compatibility: Information on supported DJ hardware.
- Creating Skins: Guide for developing custom user interface skins.
Configure Huge Page support with custom allocators
mainSPSCQueue supports the standard custom allocator interface and the P0401R3
allocate_at_leastproposal (available when C++17 is enabled). This allows you to use huge pages to improve performance without wasting allocated space.Because huge page APIs are platform-dependent, you must provide your own allocator. Below is a reference implementation for Linux using
mmapwithMAP_HUGETLB.#include <sys/mman.h> template <typename T> struct Allocator { using value_type = T; struct AllocationResult { T *ptr; size_t count; }; size_t roundup(size_t n) { return (((n - 1) >> 21) + 1) << 21; } AllocationResult allocate_at_least(size_t n) { size_t count = roundup(sizeof(T) * n); auto p = static_cast<T *>(mmap(nullptr, count, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0)); if (p == MAP_FAILED) { throw std::bad_alloc(); } return {p, count / sizeof(T)}; } void deallocate(T *p, size_t n) { munmap(p, roundup(sizeof(T) * n)); } };Configure Mixxx Controller/MIDI Mapping
mainDetailed documentation is available for creating or modifying mapping files. This includes instructions on:
- Creating/changing mapping files for your specific controller.
- Implementing advanced behaviors, such as easy wheel scratching.
- Accessing a complete list of Mixxx controls that can be manipulated via mapping files or scripts.
http://mixxx.org/wiki/doku.php/#controller_midi_mapping_documentationExtract GLSL shaders from qsb bundles for OpenGL (Qt < 6.6)
mainIf you are using a version of Qt older than 6.6, you must manually extract GLSL shaders from the
.qsbshader bundles to use them withQOpenGLShader.Use the
rg_generate_shaders_gl.pyscript located in themixxx/toolsdirectory. This script requires bothqsb(part of Qt) andspirv(part of the Vulkan SDK) to be available in your systemPATH.The script generates a
generated_shaders_gl.cmakefile which contains a CMake variable listing all extracted GLSL shaders, which can then be consumed by the localCMakeLists.txt.$ ../../../tools/rg_generate_shaders_gl.py --cmake generated_shaders_gl.cmake *.vert *.fragBuild Mixxx from source
mainTo build Mixxx yourself, refer to theCONTRIBUTING.mdfile for detailed build instructions, code style guidelines, and the process for opening pull requests.Build a local Flatpak repository for Mixxx
mainTo manage Mixxx via a local repository (allowing for easy updates and installs), use therepocommand and then add the resulting directory as a remote in Flatpak.