Tune by Mozaiklabs

Contributing

You can help Tune by reporting bugs, proposing fixes or writing extensions. This page explains how, and what the licence allows.

Reporting a bug

  • From Tune: Support, at the bottom of the sidebar. This is the easiest way, because the report carries the server's diagnostics and recent logs. See Sending a report from Tune.
  • On the forum: to describe a problem, ask a question or check whether others have run into it.
  • On GitHub, if you have an account: the issues of the renesenses/tune-server-rust repository for the server, and of renesenses/tune-web-client for the web interface.

A good report gives:

  • the Tune version (Settings › System › About) and the system (Windows, macOS, Linux, Docker, Tune OS);
  • the playback device involved (local DAC, DLNA renderer, AirPlay, Chromecast…);
  • what you did, what you expected and what happened;
  • if possible, the diagnostics (Settings › System › Server Health › Download diagnostics).

A GitHub issue is public: check what you attach to it.

Reporting a security problem

Do not open a public issue for a security problem. Write privately to Mozaik Labs, at the contact address given in the repository's LICENSE file.

Proposing a fix

Building and testing

The server is written in Rust (2024 edition), so you need a recent Rust toolchain.

git clone https://github.com/renesenses/tune-server-rust.git
cd tune-server-rust

# Build the server
cargo build --release --package tune-server

# Run it on a music folder
TUNE_PORT=8888 \
TUNE_MUSIC_DIRS='["/path/to/music"]' \
TUNE_AUTO_SCAN=true \
  ./target/release/tune-server

# Check, test, verbose logging
cargo check --workspace
cargo test --workspace
TUNE_LOG_LEVEL=debug cargo run --package tune-server

Then open http://localhost:8888. Some features are build options, for example postgres (PostgreSQL), asio (Windows) or plugins-wasm (WebAssembly extensions). They are declared in tune-server/Cargo.toml.

Before opening a pull request

  • The code must pass cargo fmt --all -- --check. Continuous integration also checks the tests and Clippy's correctness lints.
  • Show that your test really guards the fix: remove the fix and the test must fail; put it back and the test must pass.
  • Do not target main: a pull request targets the branch of the release being prepared (rc/vX.Y.Z) or the batch/… branch named in the issue.
  • Do not change the version number.
  • Fill in the pull request template: the issue, the change, the tests you ran, and what the pull request does not cover.

Writing an extension

  • Sound processing: with the kit in the sdk/ folder. cargo tune-plugin new creates the project from a template (dsp, batch, equalizer, crossfeed, converter, declick); check, test and dev verify it on real WAV files; pack builds the .tuneplugin package. A signature is required to install it.
  • A new feature: a WebAssembly extension, with a manifest.json and a main.wasm. The contract between Tune and the extension is described in docs/plugins/PLUGIN_ABI_RFC.md.
  • A new audio output: the tune-output-api crate provides the OutputTarget trait.

See Architecture for the difference between these systems.

Licence

Tune's code is public, under the Business Source License 1.1 (BSL 1.1). This summary is for information only. It is not legal advice: only the repository's LICENSE file is authoritative.

What the licence allows without a commercial licence

  • personal, non-commercial use, such as playing your music at home;
  • evaluation and testing;
  • academic and educational use;
  • contributing to Tune: bug reports, patches, documentation;
  • writing reviews, articles or blog posts about Tune.

The BSL also grants the right to copy the code, modify it, create derivative works, redistribute it, and make non-production use of it.

What requires a commercial licence

Using Tune in a commercial product or service, including embedding it, in whole or in part, in hardware or software sold, leased or distributed to third parties. This requires a separate licence from Mozaik Labs.

Also worth knowing

  • Each version of Tune moves to the Apache 2.0 licence four years after its release.
  • Every copy, modified or not, must display the licence conspicuously.
  • The licence grants no rights to trademarks or logos.
  • The software is provided "as is", without warranty.
  • Any use that breaches the licence ends the rights it grants, for all versions.

See also