Tune by Mozaiklabs

Audio Pipeline

This page follows the music from the file or service to the device that plays it. The settings themselves (DSD mode, max rate, ReplayGain, Audiophile mode) are described in Playback & Zones.

Signal path

Source: file, CUE sheet track, streaming service, radio
   ↓
Decoding inside the server (no ffmpeg)
   ↓
DSD: sent as is, wrapped in DoP, or converted to PCM
   ↓
Resampling, only when needed
   ↓
Processing, if enabled for the zone
   ↓
Output: network renderer, AirPlay, Chromecast, Squeezebox, OAAT, local DAC…

The Signal Path window in the playback bar shows every decision taken along the way for the current track.

Decoding

  • Playback never goes through ffmpeg. The decoders are built into the server:
    • Symphonia for FLAC, ALAC, WAV, MP3, AAC, Vorbis, and the MP4, Ogg and Matroska containers;
    • Tune's own AIFF reader;
    • Tune's own WavPack decoder (lossless WavPack 4) and a built-in APE (Monkey's Audio) decoder;
    • libopus for Opus, including inside Ogg or Matroska;
    • DSF, DFF and SACD ISO readers, with no external tool.
  • CUE sheets split an image into virtual tracks, decoded slice by slice.
  • DST-compressed DFF files are not supported by the published builds.
  • A minimal ffmpeg ships with the published builds. It is only used by the file Converter, for AAC encoding.

Resampling

Tune resamples in three cases only:

  • a local output that opens at a different rate from the source;
  • a zone whose Max rate is lower than the source. Tune then stays in the same rate family: a 176.4 kHz file under a 96 kHz cap goes out at 88.2 kHz;
  • a device that only accepts a fixed rate: AirPlay 1, for example, always receives 44.1 kHz.

The engine uses sinc interpolation (the rubato library) with a squared Blackman window. The filter length is chosen to keep the passband up to at least 20.5 kHz. Low-quality radio, for example at 22.05 kHz, uses a simpler linear resampler.

With Bit-perfect strict, Tune refuses to play rather than resample.

Bit depth and dither

Bit depth is converted to what the device accepts (16, 24 or 32 bits). When it goes down, Tune applies TPDF dither. The same dither is used after ReplayGain and room correction. It is not applied when the gain leaves the samples unchanged.

DSD

DestinationNativeDoPPCM
Network renderer (DLNA/UPnP)DSF/DFF file sent as is. In Auto mode, only if the renderer advertises DSD.YesConverted on the server
Local output (USB DAC)Sent as DoPYesConverted on the server
OAATIf the device advertises DSD—Otherwise
  • DoP: DSD is wrapped in 24-bit PCM frames. DSD64 goes out at 176.4 kHz, DSD128 at 352.8 kHz and DSD256 at 705.6 kHz.
  • PCM conversion: FIR decimation, with the customary +6 dB SACD gain. DSD64 gives 176.4 kHz; DSD128 and above give 352.8 kHz.

Processing

Processing is set zone by zone and applied in this order.

To a network device

  • bit-depth conversion;
  • ReplayGain;
  • equaliser;
  • room correction (convolution);
  • crossfeed;
  • level compensation;
  • stream encoding.

To a local output

  • equaliser;
  • room correction;
  • crossfeed (stereo only);
  • mono downmix, if the zone asks for it;
  • volume.

In Audiophile Mode (PURE badge), or when the signal is DoP, none of this processing is applied.

ReplayGain

  • Modes: off (the default), per track or per album. In album mode, a track without an album gain uses its track gain.
  • Pre-amp limited to ±15 dB; total gain limited to ±30 dB.
  • Prevent clipping (on by default) uses the true peak when known, otherwise the sample peak. With no known peak, Tune applies no positive gain.
  • Tracks without tags can be analysed in the background (EBU R128, −18 LUFS reference).

Equaliser

A parametric equaliser with biquad filters computed in double precision. A simple mode offers a three-band tone tilt; expert mode accepts up to 31 bands (peak, low or high shelf, high-pass, low-pass, notch). The equaliser is free.

Crossfeed

For headphone listening, crossfeed blends part of the difference between channels with a short delay (amount 0.30 and delay 0.30 ms by default). An optional head-shadow filter, off by default, can be added. It requires a Tune Premium licence. Crossfeed Pro is a separate Premium extension.

Room correction

A block-based, FFT FIR convolver applies an impulse response.

Volume

  • On a local output, volume is applied in software.
  • On a network device, Tune sends a volume command to the device (UPnP RenderingControl, OpenHome…) without touching the samples.
  • Permanent fixed volume pins a device at 100 %.

A short ramp softens pause and stop.

Outputs

OutputWhat Tune sendsGapless
DLNA / UPnPHTTP stream in FLAC, or WAV/LPCM if the zone asks for it; native DSD possible. Formats the device cannot play (AAC, WavPack, APE, ALAC, Opus…) are converted to FLAC.Yes (next track announced ahead)
OpenHomeTracks added to the device's playlistYes, if the device has the Playlist service
ChromecastHTTP stream, mostly FLACNo
AirPlay 116-bit / 44.1 kHz stereo PCMNo
AirPlay 2Through a helper program shipped with TuneNo
Squeezelite / SqueezeboxFLAC stream served by the built-in SlimProto server (port 3483)No
BluOSTracks added to the device's queueYes
HQPlayerTracks handed to HQPlayer, which does its own processingNo
OAATPCM in packets, native DSD if the device advertises it—
Local outputSound card or DAC: CoreAudio (macOS), WASAPI or ASIO (Windows), ALSA (Linux); exclusive mode availableYes, in exclusive mode, between tracks of the same format
  • In exclusive mode on macOS, Tune takes control of the device and sets its hardware rate. On Linux, it prefers the ALSA hw: device.
  • For streaming services, the next track can be preloaded.
  • Crossfading between tracks is not available in 1.0.
  • OAAT is Tune's protocol. OAAT groups share a clock; groups using other protocols are controlled together but not synchronised. See OAAT.

Bit-perfect

The Signal Path window shows Bit-Perfect only when all of these hold:

  • the source is lossless and the transport keeps it intact;
  • no resampling;
  • no processing: no equaliser, room correction, crossfeed, mono downmix or level compensation;
  • no ReplayGain that actually changes the samples.

Volume is not part of this verdict: it is a listening preference. Bear in mind, though, that software volume below 100 % changes the samples on a local output. WASAPI shared mode is never treated as intact.

See also