# Cross-platform desktop preview (Linux, Windows, macOS)

![Audio X desktop preview on Linux](images/desktop-linux.png)

The **desktop preview** is the first Audio X window that is not Windows-only. It is written with Avalonia, runs on **Linux** (tested) and on Windows (tested; it is not meant to replace the Windows program), and the same code is meant for **macOS** (never run). It shares everything below the window with the [Audio X server](Audio-X-Server): the same engine, cue runner, soundboard, show control and web remote.

The Windows program stays the full Audio X. The preview is for running a show on Linux with a screen: open a show made with the Windows program, or make and edit one here (from 1.12.0).

## What it has

* **GO, STOP, PAUSE, PANIC** (Space and Esc work), the cue list with the playing and standby cue marked, double-click to fire a cue, click to put one on standby.
* **Now playing**, elapsed and remaining time (the remaining time turns red in the last 10 seconds), the next cue, output meters, the clock.
* **Soundboard pads** (the pads saved in the settings, with their colours and modes), **bank** choice, **STOP PADS**.
* **Countdown timer** (1, 5, 10, 30 minutes, start / pause, reset).
* **Open show...**, the **audio output** choice and **Open**, and a **Web remote** tick that starts the PIN-protected [web remote](Remote-Control-and-Phone-App) (address and PIN are shown).

## What it does not have yet

Process List, Spotify in the radio, the talkback microphone, the analyser and SPL meter, the stage display, the radio / recorder / monitor / timecode settings, Spotify, timecode. Console actions in cues do run (Yamaha, Allen & Heath, Q-SYS, MIDI), set up in the Windows program.

## Editing shows (new in 1.12.0)

![The cue editor](images/desktop-cue-editor.png)

The toolbar above the cue list edits the open show:

* **New**, **Save** (Ctrl+S), **Save as...** (the file is written to a temporary name and then moved over the old one, so a failed save does not damage the show). A `*` after the show name means unsaved changes; closing, opening or starting a new show asks first.
* **Add**: *Audio...* (choose files; one cue is made for each), *Control*, *Timer*, *Group*. A cue is added below the selected one (below the end of a group when a group is selected) and takes its indent; numbers are generated like in the Windows program (1, 2, 3 and 3.1, 3.2 inside group 3).
* **Edit...**: the cue editor. Number, name, kind, files (several files play together as mono stems), trim in and out, fade in and out and curve, level, the outputs it plays on, radio ducking role, loop, what happens when it ends, timer length, how a group plays, **Locked**, and the **actions** the cue fires (Yamaha, Allen & Heath, Q-SYS and MIDI, with the same fields as the Windows program). OK checks the numbers; a missing file is reported but does not stop you saving.
* **Duplicate**, **Delete**, **Move up** / **Move down**, **Indent** / **Outdent** (into and out of groups), **Renumber**. A locked cue, or a cue that is playing (or a group with a playing cue in it), cannot be edited or deleted: the reason appears under the pads.

Not in the preview editor yet: drag and drop, undo, waveform trim, the converter, cue colours and notes.

## Settings (new in 1.12.0)

![The Settings window](images/desktop-settings.png)

**Settings...** (top right) opens one window with five pages. OK saves them to `settings.json` (the same file the Windows program uses, so settings made there are kept) and applies them at once; Cancel changes nothing. A bad number is refused with a message.

* **Audio:** output device, sample rate, buffer size, output channels. The device is opened again when something here changed.
* **Preferences:** open the last show and the audio device at start, keep on top, start full screen, ask before closing, keep the playing cue in view, show or hide the pads and the countdown.
* **Web remote:** start with the program, port, PIN (or a new random one). A running web remote is restarted.
* **Show control:** Yamaha (model, address, port), Allen & Heath (model, address, port, MIDI channel), Q-SYS (address, port, user, password) and the MIDI output, each with its own on/off tick. The Q-SYS password is protected for the current user on Windows and kept in a file only you can read on Linux and macOS.
* **Soundboard:** bank names, ducking depth and the pads: click a pad of the bank to edit it (name, sound file, colour, how it plays, level, outputs, fades, ducking) or an empty one to make it; *Clear this pad* removes it.

![The pad editor](images/desktop-pad-editor.png)

Preferences the Windows program has and the preview does not show (radio, recorder, update checks, remaining-time mode) stay as they are in the file. From 1.12.0 the preview opens the last show again only when **Open the last show again** is ticked (it did so always in 1.8.0 and 1.9.0).

## Radio (new in 1.12.0)

![The radio window](images/desktop-radio.png)

**Radio...** (top) opens the onsite radio, the same engine as the Windows program: a local playlist played as a gapless programme, songs crossfading into each other, idents mixed in between two songs, and the ducker.

* **START / STOP RADIO**, the song now playing, how many songs have played, the last ident and how many are waiting. **PANIC** (the button or Esc) also stops the radio, as in the Windows program; turn that off with *Panic stops the radio* in the Windows preferences.
* **Playlist:** *Add files...*, *Add folder...* (every audio file in the folder and its sub-folders; files already in the list are skipped), *Remove*, *Clear*, **Shuffle** (every song plays once before any repeats). A file that cannot be played is reported in the log and dropped from the playlist.
* **Music:** the outputs it plays on, level (dB) and crossfade (seconds).
* **Idents:** *Add ident...* (choose one or more files; they rotate, one per trigger), *Edit...* (name, on / off, files, trigger **after N songs** or **at a time of day**, outputs, gain), *Remove* and **Play now** (plays it over the music at once and ducks the music).
* **Ducker:** depth, attack, release and hold; the **Duck** bar shows how far the music is turned down. *Apply settings* saves.

Changes are saved to `settings.json` as you make them. Not in the preview radio: Spotify as a music source, the talkback (TALK) microphone, and the Normalise loudness tool.

## Recorder (new in 1.12.0)

![The recorder window](images/desktop-recorder.png)

**Recorder...** (top) opens the multitrack recorder: record the inputs of the audio device to disk, up to 48 tracks.

* **Inputs.** The device must be opened with input channels: set **Input channels** in Settings > Audio (0 = none; the *Virtual (test)* output has 16, each carrying a quiet tone) and press OK; the device reopens. On Linux the device needs real inputs (an ALSA device with capture channels); on Windows use an ASIO driver such as the Dante Virtual Soundcard.
* **Tracks.** Each track has an arm tick, a name, an input (*Input 1...n* or *off*) and a live meter with a clip dot (click it to clear). **Patch 1:1** gives track n input n, **Clear patch**, **Arm all**, **Disarm all**.
* **Format.** WAV, BWF (Broadcast Wave with timecode reference, scene, take, track names and markers), RF64 or BW64; 24-bit PCM or 32-bit float; one mono file per track or one polyphonic file. Fixed while recording.
* **RECORD** asks for the session name, scene, take, note and the folder; it records into a new folder named *Session_yyyy-MM-dd_HHmmss* in it (files are the raw input, named like `01_Kick.wav`). **MARKER** adds a marker at the current time, **STOP** finishes the files (the take number goes up by one). The window shows the time, the number of tracks and files, the format and the free disk space, and warns about dropouts. A `session.json` (patch, names, files, duration) is written next to the audio, in the same layout as the Windows program.
* A recording keeps running when the window is closed; closing Audio X finishes the files.

Not in the preview recorder: the monitor mix and channel strips (EQ, dynamics, sends), live waveforms, Yamaha USB / TF5 names and colours, the OpenDaw project and the remux tool.

## Install (Linux)

Unpack `audiox-desktop-1.12.0-linux-x64.tar.gz` and run `./app/AudioX.Desktop`, or run `sudo ./install-desktop.sh` for a menu entry. It needs a desktop (X11, or Wayland through XWayland), ALSA, these libraries: `libx11-6 libice6 libsm6 libfontconfig1 libgl1 libxi6 libxcursor1 libxrandr2 libxkbcommon-x11-0`, and for AAC / M4A files the FFmpeg 8 libraries.

Options: `--show FILE`, `--virtual` (no sound card: the test output), `--web`, `--port N`, `--selftest DIR` (a short check that saves two pictures and exits with 0 when it passes).

## What has been tested

On Ubuntu 26.04 under Windows WSL 2 (WSLg) and on Windows: the window opens with the show's cues and pads, GO plays (through the test output; on Linux also through ALSA), the rows and meters follow the playing cue, PANIC stops it; recorder (record eight tracks of the test device to files with the right length and tone, a marker, a polyphonic RF64 recording, the take number), radio (add folder, idents, ident played now ducks the music, an ident mixed in after a song, stop, PANIC stops it, saved), settings (bad number refused, saved and loaded back, applied live, a pad added, a preference applied) and editing: add, edit in the cue editor, group indent, move, locked cues refused, save and load back, delete (including groups), numbering. The same self-test runs on both. **Not tested:** other distributions, Wayland-only sessions, a real sound card, high-DPI scaling, any use of the mouse by a person (the checks drive the commands and the editor's fields, not mouse clicks), macOS.

![The same window on Windows](images/desktop-windows.png)
