Introduction
Masterpiece is a free, open-source pipe organ sample player. It plays Hauptwerk-format sample sets and GrandOrgue organs, each with its own console, wiring, wind and swell boxes, on Windows, macOS, Linux, Raspberry Pi, Android, iPhone and iPad, as a standalone program and as VST3, LV2 and AU plugins. It is part of OpenPipes, an open-source virtual pipe organ platform, and is published under the GPL-3.0 licence.
This manual has two parts. The user guide covers installing the program, opening sample sets, playing, connecting a console, audio, and the memory and loading choices that decide which organs a computer can hold, followed by a complete reference of every setting. The developer guide covers building Masterpiece from source, its architecture, its tests and its performance figures.
| Sample set formats | Hauptwerk-format organs (full, compact and composite definitions), GrandOrgue organs (.organ definitions and .orgue packages), jOrgan organs (.disposition with SoundFonts) |
| Packages | Installed folders, or straight from .rar packages, including solid, multi-part and multi-volume sets; a solid RAR 4 set split into volumes is the exception |
| Samples | WAV and WavPack, at any sample rate |
| Systems | Windows, macOS (Apple silicon and Intel), Linux (x86-64, Flatpak, Debian packages), Raspberry Pi (64-bit and 32-bit), Android, iPhone and iPad |
| Plugins | VST3, LV2, AU |
| Engine | Custom AVX2, SSE2 and NEON vector code; 725 voices per processor thread by default, at least 1,536, up to 16,384 |
| Memory | Samples held as recorded, at 20 or 16 bits, or as 32-bit float; lossless compression in memory; folding to mono; release tails streamed from disk; a sample cache for fast loads |
| Voicing | Voicing EQ with ten presets, EQ per division and per rank, pan and width, pipe detune and wind sway, attack emphasis, release length, an output compressor and limiter, bass management |
| Control | A MIDI channel per manual, MIDI learn for every stop, piston and swell shoe (SysEx included), generals, divisionals and a 999-frame stepper, temperaments, pitch and a transposer |
| Remote control | A web console and a control API over HTTP on the local network, the same requests over OSC and over MIDI System Exclusive |
| Score and recording | A MusicXML score played through the organ with a following cursor; audio and MIDI recording |
Where to start
- Installing Masterpiece for the download for your system.
- Opening an organ for sample sets in folders and in their packages.
- MIDI and consoles to connect keyboards, pistons and shoes.
- Memory, loading and streaming and Small, medium and large organs before loading a large set.
- Troubleshooting and caveats when something does not sound as expected.
Questions and ideas are welcome in the discussions, and problems in the issues of the repository on GitHub.
Installing Masterpiece
This page lists every file a Masterpiece release offers, the systems each file runs on, what it installs and where, what happens at the first start, and how to update and remove the program. Use it to pick the right file for a computer, phone or tablet, to install it, and to find the plugins and the program’s data afterwards.
Release files
Each release on github.com/bonninr/masterpiece/releases carries the files below. <version> is the release number, for example 0.10.0. Every file name starts with masterpiece-<version>-.
| File | System | What it holds |
|---|---|---|
masterpiece-<version>-windows-setup.exe | Windows, 64-bit | Installer for the standalone program |
masterpiece-<version>-windows.zip | Windows, 64-bit | A Masterpiece folder with the program |
masterpiece-<version>-plugins-windows.zip | Windows, 64-bit | A Masterpiece-plugins folder: the VST3 and LV2 plugins |
masterpiece-<version>-macos-arm64.zip | macOS, Apple silicon | A Masterpiece folder with Masterpiece.app |
masterpiece-<version>-macos-x86_64.zip | macOS, Intel | A Masterpiece folder with Masterpiece.app |
masterpiece-<version>-plugins-macos-arm64.zip | macOS, Apple silicon | A Masterpiece-plugins folder: the Audio Unit and VST3 plugins |
masterpiece-<version>-plugins-macos-x86_64.zip | macOS, Intel | A Masterpiece-plugins folder: the Audio Unit and VST3 plugins |
masterpiece-<version>-linux-x86_64.flatpak | Linux, x86-64 | Flatpak bundle of the standalone program |
masterpiece-<version>-linux-amd64.deb | Debian, Ubuntu and relatives, x86-64 | The program, the menu entry and the file types |
masterpiece-<version>-linux-x86_64.tar.gz | Linux, x86-64 | A Masterpiece folder with the program |
masterpiece-<version>-plugins-linux-x86_64.tar.gz | Linux, x86-64 | A Masterpiece-plugins folder: the VST3 and LV2 plugins |
masterpiece-<version>-linux-arm64.deb | Raspberry Pi OS, 64-bit | The program, the menu entry and the file types |
masterpiece-<version>-linux-armhf.deb | Raspberry Pi OS, 32-bit | The program, the menu entry and the file types |
masterpiece-<version>-linux-arm64.tar.gz | Raspberry Pi OS, 64-bit | A Masterpiece folder with the program |
masterpiece-<version>-linux-armhf.tar.gz | Raspberry Pi OS, 32-bit | A Masterpiece folder with the program |
masterpiece-<version>-android.apk | Android | The app |
masterpiece-<version>-ios.ipa | iPhone and iPad | The app, unsigned |
The plugins come in the plugins archives, for Windows, macOS and Linux x86-64. Up to 0.8.1 they came inside the program’s zips and tarballs and the amd64 .deb.
Download addresses
The addresses below on masterpieceorgan.com send the browser to the matching file of the latest release. When the latest release lacks the file, the address leads to the release page.
| Address | File |
|---|---|
masterpieceorgan.com/download/windows | windows-setup.exe |
masterpieceorgan.com/download/windows-zip | windows.zip |
masterpieceorgan.com/download/macos | macos-arm64.zip |
masterpieceorgan.com/download/macos-intel | macos-x86_64.zip |
masterpieceorgan.com/download/linux | linux-x86_64.flatpak |
masterpieceorgan.com/download/linux-deb | linux-amd64.deb |
masterpieceorgan.com/download/linux-tar | linux-x86_64.tar.gz |
masterpieceorgan.com/download/raspberry-pi | linux-arm64.deb |
masterpieceorgan.com/download/raspberry-pi-32 | linux-armhf.deb |
masterpieceorgan.com/download/android | android.apk |
masterpieceorgan.com/download/ios | ios.ipa |
The two ARM .tar.gz archives have no short address. They are on the release page.
System requirements
| System | Processor | Operating system |
|---|---|---|
| Windows | x64 | 64-bit Windows |
| macOS, Apple silicon | Apple silicon | macOS 11.0 or later |
| macOS, Intel | x86-64 | macOS 10.15 or later; the build also runs under Rosetta on Apple silicon |
Linux, .deb and .tar.gz | x86-64 | A distribution whose C library is at least as new as Ubuntu 22.04’s, the build host; the packages are installed and checked in Debian 12 and Ubuntu 24.04 containers |
| Linux, Flatpak | x86-64 | Any distribution with Flatpak; the bundle uses the freedesktop 25.08 runtime, which Flatpak installs when it is missing |
| Raspberry Pi, 64-bit | ARMv8-A (Pi 3 to Pi 5) | Raspberry Pi OS, 64-bit |
| Raspberry Pi, 32-bit | ARMv7-A with NEON and VFPv4, hard-float | Raspberry Pi OS, 32-bit |
| Android | 64-bit ARM (arm64-v8a); x86-64 (x86_64) for the emulator | Android 8.0 (API level 26) or later |
| iPhone and iPad | 64-bit ARM | iOS 15.0 or later |
Notes:
- The Windows program links the Visual C++ runtime statically. No redistributable package needs installing.
- The
.debpackages were tested in CI by installing them in Debian 12 and Ubuntu 24.04 containers, for all three architectures. - Android builds exist for 64-bit processors only. The build file gives the reason: a 32-bit device cannot hold a sample set worth playing.
- Memory is set by the sample sets. The default limit for the samples of one organ is 80% of the computer’s memory, with a floor of 512 MB; it is set on Settings > Performance…. See Memory, loading and streaming and Small, medium and large organs.
Processor features and the vector engine
The audio engine renders several samples at a time with the processor’s vector unit. It picks the unit once, when the program starts.
| Processor | Vector unit used |
|---|---|
| x86-64 with AVX2 | AVX2 |
| x86-64 lacking AVX2 | SSE2, present on every x86-64 processor; it renders four frames at a time |
| x86-64 build under Rosetta on Apple silicon | SSE2, whatever the processor check reports |
| Apple silicon, Raspberry Pi (64- and 32-bit), Android and iOS on ARM | NEON |
| Any other processor | The per-frame engine |
The release builds target the baseline x86-64 instruction set and choose AVX2 at run time. A processor that lacks AVX2 runs the same program on the SSE2 path.
The box Faster audio engine on Settings > Performance…, shown in the Advanced display mode, turns the vector engine on and off. It is on by default and takes effect at once. When on, the box reads Faster audio engine: using AVX2 (or SSE2, or NEON); on a processor that has none of them it reads Faster audio engine: not available on this processor. Setting the environment variable MASTERPIECE_SIMD=0 before starting the program forces the per-frame engine.
Windows
Installer
Run masterpiece-<version>-windows-setup.exe. The installer puts bin\Masterpiece.exe and Uninstall.exe into an install folder whose default name is Masterpiece, adds a Start menu entry in a folder that defaults to Masterpiece, adds an entry in Windows Apps & features, and registers the file types listed under File associations.
The installer installs Masterpiece.exe only. The plugins are in masterpiece-<version>-plugins-windows.zip.
The release workflow adds no code signature to the Windows files.
A silent installation, as used in the project’s own tests:
masterpiece-<version>-windows-setup.exe /S /D=C:\Path\To\Masterpiece
/D= has to be the last argument and takes no quotes. The silent uninstaller is Uninstall.exe /S in the install folder; add /REMOVEDATA to remove the settings and caches too.
Zip
masterpiece-<version>-windows.zip runs from any folder and installs nothing. It holds one folder, Masterpiece, with Masterpiece.exe. Extract it and start Masterpiece.exe. The plugins are in masterpiece-<version>-plugins-windows.zip (see Plugins). In 0.8.1 the zip also holds the plugins, in its VST3 and LV2 folders. In 0.8.0 and earlier the zip holds the build folders, and the plugin is in MasterpiecePlugin\MasterpiecePlugin_artefacts\Release\VST3\Masterpiece.vst3.
macOS
Download the zip for the processor: macos-arm64 for Apple silicon, macos-x86_64 for Intel. The zip unpacks to a folder Masterpiece that holds Masterpiece.app. Move Masterpiece.app to Applications. The Audio Unit and VST3 plugins are in plugins-macos-arm64.zip and plugins-macos-x86_64.zip (see Plugins).
The macOS builds are unsigned. At the first start macOS may report that Masterpiece “is damaged and can’t be opened”. Remove the quarantine flag and open the app from its context menu:
xattr -cr /Applications/Masterpiece.app
Then right-click Masterpiece.app and choose Open.
The Intel build runs on Apple silicon through Rosetta; it uses the SSE2 vector path there.
Linux
Flatpak
flatpak install --user ./masterpiece-<version>-linux-x86_64.flatpak
flatpak run io.github.bonninr.Masterpiece
The bundle runs on the freedesktop 25.08 runtime. Its permissions:
| Permission | Purpose |
|---|---|
--socket=x11, --share=ipc | The window; a Wayland session runs it through XWayland |
--socket=pulseaudio, --filesystem=xdg-run/pipewire-0 | Sound through PulseAudio and PipeWire, and JACK through PipeWire’s socket |
--device=all | ALSA audio and MIDI devices, such as USB MIDI consoles |
--filesystem=home, /media, /run/media, /mnt | Sample sets in the home folder, on a second disk or on a USB drive |
A sample set elsewhere (for example under /data) needs the folder granted:
flatpak override --user --filesystem=/data io.github.bonninr.Masterpiece
The Flatpak contains no plugins.
Debian, Ubuntu and relatives (.deb)
sudo apt install ./masterpiece-<version>-linux-amd64.deb
The package is named masterpiece and installs:
| Path | Content |
|---|---|
/usr/bin/masterpiece | The program |
/usr/share/applications/masterpiece.desktop | The menu entry |
/usr/share/icons/hicolor/256x256/apps/masterpiece.png | The icon |
/usr/share/mime/packages/masterpiece.xml | The organ file types |
The package depends on libasound2 (or libasound2t64), libfreetype6, libfontconfig1, libx11-6, libxext6, libxrandr2, libxinerama1, libxcursor1 and libgl1, plus the C library version the binary needs. apt installs them. JACK is optional: Masterpiece opens libjack at run time when it exists and then lists JACK as an audio device type.
Remove it with sudo apt remove masterpiece.
Tar archive
masterpiece-<version>-linux-x86_64.tar.gz holds one folder, Masterpiece, with the program. The files are packed from build artifacts, which carry no executable bit; the build’s own launch check runs chmod +x on the binary. Set the bit on the Masterpiece file before the first start:
tar -xzf masterpiece-<version>-linux-x86_64.tar.gz
chmod +x Masterpiece/Masterpiece
The libraries listed for the .deb have to be present on the system.
Raspberry Pi
Pick the package for the installed operating system, 64-bit or 32-bit:
sudo apt install ./masterpiece-<version>-linux-arm64.deb # Raspberry Pi OS, 64-bit
sudo apt install ./masterpiece-<version>-linux-armhf.deb # Raspberry Pi OS, 32-bit
Both install the program as masterpiece, with the menu entry and the file types. They contain no plugins. The tarballs linux-arm64.tar.gz and linux-armhf.tar.gz hold the same program in a Masterpiece folder, with the same chmod +x step as above.
The 64-bit build targets plain ARMv8-A, which covers the Raspberry Pi 3 to the Raspberry Pi 5. The 32-bit build is compiled for ARMv7-A with NEON and VFPv4 (-march=armv7-a -mfpu=neon-vfpv4, hard-float) and needs a processor with those.
Both builds use the NEON vector engine. Audio on the Pi goes through ALSA, or through JACK when libjack is installed. See Audio, room and mixer.
Android
Download masterpiece-<version>-android.apk on the device and open it, or install it from a computer with adb:
adb install -r masterpiece-<version>-android.apk
| Property | Value |
|---|---|
| Package name | org.masterpiece.player |
| Minimum Android | 8.0 (API level 26); API 23 supplies the MIDI interface and API 26 the low-latency audio interface |
| Target | API level 35 |
| Processors | arm64-v8a, x86_64 |
| Signature | One release key for every version |
All versions share one signing key, so a newer APK installs over the older one and keeps the organs and settings.
The manifest asks for:
| Permission | Why |
|---|---|
READ_EXTERNAL_STORAGE (up to Android 12L, API 32) | Sample sets on shared storage, on the Android versions that still allow reading by path |
BLUETOOTH_CONNECT, BLUETOOTH_SCAN (flagged neverForLocation) | Bluetooth MIDI consoles |
BLUETOOTH, BLUETOOTH_ADMIN (up to API 30), ACCESS_FINE_LOCATION (up to API 30) | The same, on older Android versions |
USB host, MIDI and Bluetooth LE are declared as optional features; the app installs on devices that lack them. Phones and tablets covers the app itself.
iPhone and iPad
masterpiece-<version>-ios.ipa is unsigned, and iOS runs only signed apps. Sign and install it with a sideloading tool and an Apple ID of your own; AltStore and Sideloadly are the tools the project’s build notes name. No Apple developer account is needed. The steps for each tool are in the 0.7.0 release notes.
| Property | Value |
|---|---|
| Bundle identifier | org.masterpiece.player |
| Minimum iOS | 15.0 |
| Devices | iPhone and iPad (device families 1 and 2) |
| Processor | 64-bit ARM |
Phones and tablets covers the app itself.
Plugins
The plugin formats are VST3 (Windows, macOS, Linux), Audio Unit (macOS) and LV2 (Windows, Linux). The plugin shares its settings folder with the standalone program. See Plugins in a DAW.
| Format | Windows | macOS | Linux |
|---|---|---|---|
| VST3 | VST3\Masterpiece.vst3 in plugins-windows.zip | Masterpiece.vst3 in plugins-macos-arm64.zip and plugins-macos-x86_64.zip | VST3/Masterpiece.vst3 in plugins-linux-x86_64.tar.gz |
| Audio Unit | none | Masterpiece.component in plugins-macos-arm64.zip and plugins-macos-x86_64.zip | none |
| LV2 | LV2\Masterpiece.lv2 in plugins-windows.zip | none | LV2/Masterpiece.lv2 in plugins-linux-x86_64.tar.gz |
Each archive unpacks to a folder Masterpiece-plugins. Copy the bundles into a folder that the host scans; Plugins in a DAW lists them. The amd64 .deb of 0.8.1 and earlier installed the plugins to /usr/lib/vst3 and /usr/lib/lv2; from 0.9.0 it holds the program.
File associations
Windows, macOS and Linux register the same five file types: .Organ_Hauptwerk_xml, .CustomOrgan_Hauptwerk_xml, .organ, .orgue and .rar. Double-clicking or Open with passes the file to the program, which opens it as File > Open organ… does. See Opening an organ.
| System | How it is registered |
|---|---|
| Windows | The installer writes the program under Open with for the five extensions (HKCR\Applications\Masterpiece.exe and an OpenWithList key per extension). Masterpiece is offered in the list and never made the default, so .rar files keep the program that opens them. The command is "<install folder>\bin\Masterpiece.exe" "%1". The uninstaller removes the keys. |
| macOS | Masterpiece.app declares the five document extensions, so Finder offers Open With. A running program receives the file and opens it in the existing window. |
Linux (.deb) | masterpiece-mime.xml defines application/x-hauptwerk-organ (*.Organ_Hauptwerk_xml, *.CustomOrgan_Hauptwerk_xml), application/x-grandorgue-organ (*.organ) and application/x-grandorgue-package (*.orgue). masterpiece.desktop (Exec=masterpiece %f) lists those types and the RAR types application/vnd.rar and application/x-rar. The desktop’s file manager then offers Masterpiece under Open with. |
| Flatpak | The same type definitions, exported under the application’s own name. |
| Android, iOS | The app opens packages (.rar, .orgue) chosen inside it; see Phones and tablets. |
First start
Settings folder
Masterpiece keeps its settings, logs and caches in a folder named Masterpiece inside the user’s application-data folder:
| System | Folder |
|---|---|
| Windows | %APPDATA%\Masterpiece |
| macOS | ~/Library/Masterpiece |
| Linux | ~/.config/Masterpiece |
| Android, iPhone, iPad | The Masterpiece folder in the app’s application-data folder |
Files and folders lists the contents. Two files decide the first start:
| File | Role |
|---|---|
settings.mpglobal | The general settings. While it is missing, the program shows the first-run wizard. Removing or renaming it shows the wizard again. |
audio.xml | The audio device, sample rate and buffer size. It is written when the program quits. |
Audio device defaults
Before the window opens, the program starts the system’s default audio device with two output channels and no input. A device that opens at a rate below 44.1 kHz is moved to 48 kHz, or to 44.1 kHz when 48 kHz is unavailable. On a first start, or when a saved setup could not be used, the buffer size is the available size nearest to about 10 ms. A saved setup that names missing hardware, or that opens with no live output, is replaced by the defaults.
MIDI inputs
At the start every MIDI input is opened, except those switched off earlier. A console plugged in for the first time plays at once. An input that another program holds is tried again every 3 seconds.
The first-run wizard
On a first start the window opens with a dialog titled Welcome to Masterpiece, 560 x 520 pixels. It has four steps, shown as Step 1 of 4 and so on. Back and Next move between steps, Next becomes Finish on the last one, and Skip setup ends the wizard at any step. Finish and Skip setup both write settings.mpglobal with the current choices, which ends the first-run state.
| Step | Title | What it asks | Takes effect |
|---|---|---|---|
| 1 | Display mode | Simple, the main settings with presets, or Advanced, every setting. Simple is chosen at first. The same choice is on Settings > General…. | At once |
| 2 | Audio device | The output device and the buffer size, in the system’s device selector (device type, output device, active output channels, sample rate, audio buffer size). The text suggests 256 or 512 samples for most computers. The same choices are on Settings > Audio…. | At once; stored in audio.xml when the program quits |
| 3 | MIDI configuration | Default channels: a box for the Pedal and for Manual 1 to Manual 5, each - or a channel from 1 to 16, all - at first. They give the channel of each keyboard for every organ with no channels of its own. Below them, MIDI inputs: a tick box per input, ticked as the input is now. An input unticked here stays closed at later starts. When the system reports no input, the step reads No MIDI inputs found. You can still play with the mouse on the on-screen keyboard, and plug a console in later. The same choices are on Settings > MIDI…. | At once |
| 4 | Organ | The text reads Definition file or package. The first load of a large set takes longer. The button Choose an organ… closes the wizard and opens the file dialog, with the console in view while the organ loads. The line under it reads No organ loaded yet or Loaded: <name>. The box Create the Test Sound organ makes a small generated organ on Finish, so the program sounds before a sample set is installed; see The Test Sound organ. | The organ loads when chosen |
The wizard is a dialog of the standalone program. The plugins and the --gui-only mode skip it. It appears while settings.mpglobal is missing, and any write of that file ends the first-run state. Finish and Skip setup write it.
To see the wizard again, close Masterpiece and remove or rename settings.mpglobal. The general settings start from their defaults at the next start.
MIDI keyboards after an upgrade
Up to version 0.9 each keyboard played on the organ’s own channel: the pedal on 1, the first manual on 2, and so on. From 0.10 a MIDI device plays a manual only once a channel is set for it. The first start after an upgrade, with a MIDI input open and no default channels set, shows a dialog titled MIDI keyboards once, with the single step Keyboard channels. Its boxes are filled in with the 0.9 channels. Done keeps them as the default channels of every organ with none of its own; Not now closes it with no change. The dialog does not return. The same choices are on Settings > MIDI…. The input Midi Through of Linux does not count as a keyboard.
The first organ
The first load of each organ opens Organ settings on the Loading tab before the samples are read, so the memory profile can be chosen. The organ’s console is on screen in seconds, ahead of the samples, and the tab shows this organ’s own stops with what each costs. Closing the window, with Keep changes or otherwise, starts the load. See Opening an organ and Memory, loading and streaming.
Updating
Once a day, 10 seconds after the start, the standalone program asks the project’s release page for the latest version. When a newer one is out, a notice Masterpiece <version> is out appears with the buttons Download, which opens the latest release page, and Never check again. Help > Check for updates… asks at once and also answers when the program is up to date. The daily check is the box Check for updates daily on the Diagnostics tab, on by default; the environment variable MASTERPIECE_UPDATE_CHECK=0 turns it off for one run. See The update notice.
Install a newer release the same way as the first one; settings, favourites and caches stay in the settings folder.
| System | Procedure |
|---|---|
| Windows installer | Run the new installer. It installs over the old version. |
| Windows zip | Extract the new zip over the old folder, or into a new one. |
| macOS | Replace Masterpiece.app in Applications with the new one. |
| Debian, Ubuntu, Raspberry Pi OS | sudo apt install ./masterpiece-<version>-linux-<arch>.deb |
| Flatpak | Run the flatpak install --user command with the new bundle. |
| tar.gz | Extract the new archive and set the executable bit. |
| Android | Install the new APK. The shared signing key makes it an update that keeps the data. |
| iPhone and iPad | Sign and install the new .ipa with the sideloading tool. |
Uninstalling
The settings folder holds the saved organ settings, favourites, MIDI maps and the sample cache. The program creates it at run time; the installers and packages place no files in it, and the routes below leave it in place, except where the table says otherwise. Elsewhere, delete the folder by hand to remove that data. The sample cache is as large as the decoded samples of an organ and can fill several gigabytes; Cache folder on Settings > General…, shown in the Advanced display mode, shows where it is, and Delete the cache there empties it.
| System | Procedure |
|---|---|
| Windows installer | Apps & features, or Uninstall.exe in the install folder. Both remove the program, the Start menu entry, the registry entries and the file-type registrations, then ask Also remove Masterpiece’s settings, logs, sample caches and unpacked organs? The answer defaults to No. Yes removes the settings folder, and the caches and unpacked organs in a Cache folder chosen elsewhere. Installed organs and the organs folder stay. Uninstall.exe /S keeps the data; Uninstall.exe /S /REMOVEDATA removes it. |
| Windows zip | Delete the folder. |
| macOS | Delete Masterpiece.app, and any plugin bundles copied to the plug-in folders. |
| Debian, Ubuntu, Raspberry Pi OS | sudo apt remove masterpiece |
| Flatpak | flatpak uninstall io.github.bonninr.Masterpiece; with --delete-data, the settings folder goes too. |
| tar.gz | Delete the extracted folder. |
| Android, iPhone, iPad | Remove the app in the system. Its private storage goes with it. |
Opening an organ
This page covers every way an organ reaches the console: the file formats Masterpiece reads, organs installed in folders, organs played straight from their packages, sample sets that live in several places, demo sets, licences, the Open window, installing an organ package, and the load itself with its progress dialog. It tells you which file to pick, where Masterpiece looks for the rest of a set, and what the log says when something is missing.
Settings that decide how much memory an organ takes, and whether release tails stream from disk, are chosen at load time and are described in Memory, loading and streaming.
Formats
| Kind | Files | Notes |
|---|---|---|
| Hauptwerk-format organ, full | .Organ_Hauptwerk_xml | Read directly. |
| Hauptwerk-format organ, compact | .CustomOrgan_Hauptwerk_xml | Read directly. Compact files write whole numbers in scientific notation (1.27e+2); Masterpiece reads them as the whole numbers they stand for. |
| Hauptwerk-format organ, older spelling | .Organ.Hauptwerk.xml, .CustomOrgan.Hauptwerk.xml | Same contents as the files above, named with dots. |
| Composite organ | A Hauptwerk-format definition whose samples come from several sample sets | See Composite organs. |
| GrandOrgue organ definition | .organ | Converted in memory as it loads, console included. The converted definition is never written to disk. |
| GrandOrgue package | .orgue | Read in place. Packages that depend on other packages need those beside them. |
| jOrgan disposition | .disposition | Converted in memory as it loads, as GrandOrgue organs are; its SoundFont samples written as WAV files. See jOrgan organs. |
| Hauptwerk-format package | .rar, for example Name.CompPkg.Hauptwerk.rar, or a name ending in _Hauptwerk_rar, for example Name.CompPkg_Hauptwerk_rar | Read in place. See Playing from packages. |
GrandOrgue files may be encoded in UTF-8 or in the Western code page of their author; Masterpiece detects which. A GrandOrgue organ has no organ id, so Masterpiece derives one from a hash of the file: the same file is always the same organ and keeps its own settings.
Sample files
| Format | Notes |
|---|---|
| WAV | Read with the file’s own loop and release markers. |
| WavPack | Recognised by the content of the file, whatever its extension. GrandOrgue sets often name WavPack files .wav. Loaded at full length; the loop, cue and pitch chunks inside are read as they are in a WAV file. |
.hbw, .hbx | Encrypted. Never decoded. See Encrypted samples. |
Samples may have any sample rate. They are held at the rate they were recorded in unless the Sample rate option on the Loading tab of Organ settings is set to 48 kHz or 44.1 kHz; a file whose rate differs from the chosen one is then converted at load time with Lagrange interpolation, and its loop points and release marker move with the audio. The option takes effect at the next load. A file that several pipes name, as in a GrandOrgue rank whose keys all sound one file, is read once and held once. See Memory, loading and streaming.
Ways to open an organ
File > Open organ…
File > Open organ… opens the Open window: the favourites, the organs installed, and the file dialog. When there is no favourite to show and no organ loaded, it opens the file dialog directly.
The File menu holds:
| Item | What it does |
|---|---|
| Open organ… | The Open window, or the file dialog when there is nothing to list. |
| Other versions of this organ | A submenu, present only when the loaded organ has more than one definition beside it. See Other versions of an organ. |
| Open score… | The score and its file dialog. See The score. |
| Install organ package…, Uninstall organ… | See Installing an organ package. Absent on phones and tablets. |
| Import settings…, Export settings…, Export organ settings… | The settings archives; see Settings. Absent on phones and tablets. |
| Exit (Windows), Quit (Linux) | Closes the program, as the window’s close button does. Absent on macOS, where quitting is in the application menu, on phones and tablets, and in the plugins. |
The recorder, the metronome and the tuner are in the Window menu; see A tour of the window.
The file dialog
The file dialog is titled Choose an organ definition file (Choose an organ package on phones and tablets). It lists these patterns:
*.Organ_Hauptwerk_xml, *.CustomOrgan_Hauptwerk_xml, *.Organ.Hauptwerk.xml, *.CustomOrgan.Hauptwerk.xml, *.organ, *.disposition, *.rar, *.CompPkg_Hauptwerk_rar, *.orgue
On phones and tablets the list is *.rar and *.orgue, and any other file is ignored. The dialog starts in the folder the last organ was chosen from; that folder is stored as openfolder in settings.mpglobal. On macOS the dialog also lets you navigate into tagged folders from search results.
Other ways
| Way | Platforms | Behaviour |
|---|---|---|
| Command line | Desktop | Masterpiece <file> or Masterpiece --odf <file> opens the file at start. A file named on the command line takes precedence over Reopen the last organ when Masterpiece starts. See Command line. |
| Open with | Windows, Linux, macOS | The installer registers .Organ_Hauptwerk_xml, .CustomOrgan_Hauptwerk_xml, .organ, .orgue and .rar for the Open with list. On Windows Masterpiece appears in that list and is never made the default, so a .rar keeps the program that already opens it. On Linux the desktop file declares the same types. On macOS the application declares the same extensions. On macOS, a file chosen with Open With while Masterpiece is running loads in the running window. On Windows and Linux each launch starts a separate instance, which loads the file. |
| Reopen at start | Standalone application | See Reopening the last organ. |
| First-run wizard | Standalone application | The last step has a Choose an organ… button that closes the wizard and opens the file dialog, so the console is in view while the organ loads. |
Masterpiece does not accept files dropped on its window.
The plugins have no startup reopen and store no organ in the host’s project state.
Organs installed in folders
An installed Hauptwerk-format organ has this layout:
<root>/OrganDefinitions/<name>.Organ_Hauptwerk_xml
<root>/OrganInstallationPackages/000123/...
The definition names its sample files relative to a package folder. The folder is OrganInstallationPackages/ plus the package id padded to six digits (000123). Masterpiece takes the organ’s root as the grandparent of the definition file. Names are matched without regard to case, and backslashes in definitions are read as folder separators on every platform.
When a set was reorganised with symbolic links, and the folder derived from the definition holds no OrganInstallationPackages, Masterpiece looks in the sample libraries it knows. A library is a folder that holds an OrganInstallationPackages folder. The library that holds the packages the definition names is used, and the log says load: packages found in a known library.
Libraries come from two places:
Hauptwerk/HauptwerkSampleSetsAndComponentsin the home folder, when it holds anOrganInstallationPackagesfolder.- The root of every organ that has loaded with samples. Each is stored as a
libraryline insettings.mpglobal.
Libraries are collected automatically. Masterpiece has no setting that lists them by hand.
For a layout that cannot be worked out from the path, the Organ folder row on the Loading tab of Organ settings, shown in the Advanced display mode, names the folder that holds OrganInstallationPackages. It is stored with the organ, takes effect at the next load, and has Choose… and Default buttons. By default it reads From the definition (<folder>).
Installing an organ package
File > Install organ package… puts an organ’s packages into the organs folder, as an installed organ. It asks for the package first, reads it (Reading the package…), and lists its components: organ definitions, sample packages and other files. Each row has the Action, the Type, the version In the package, the version Installed, and the Size. The action is Install, Upgrade, Reinstall, Install the older version, Skip or Leave as it is, as the versions say. The file dialog offers .rar, .orgue, .CompPkg_Hauptwerk_rar, .HauptwerkOrgan and .zip files.
- The organs folder:
Documents/Masterpiece/Organsby default, on any drive. The first install asks where organs go before anything is written: Organs folder: <folder> (<free> free), with Install here and Choose a folder…. - A line under the list gives the size of the install and the room on the drive: Installs N component(s), <size>.
- At the end: Installed: <organ>. It is listed in Open, under Installed., with a button that opens it. Install another package… closes the window and asks for the next package, for several organs or packages in a row.
- A package that brings no definition Masterpiece opens, such as an encrypted
.hbxor sample packages for another organ: Installed: <package>. No organ definition Masterpiece opens came with it. - A package that is not an organ’s: This package cannot be installed: <reason>, or This package holds no organ to install.
File > Uninstall organ… lists what the organs folder holds (Organs installed in the organs folder), with the organs that need each package (Needed by), and removes what is ticked. The organ on the console is marked On the console now. The question Remove N component(s), <size>, from <folder>? Removed files cannot be recovered. comes first. Both items are absent on phones and tablets.
The folder is stored as organsfolder in settings.mpglobal, absent for the default.
Playing from packages
A sample set is published as one or more RAR archives that hold the tree of an installed organ: OrganDefinitions/ and OrganInstallationPackages/<id>/. Masterpiece reads these archives in place. It never needs the disk space of an unpacked set.
What is unpacked and what stays
At the first open of a set of packages, Masterpiece reads the file lists and unpacks every file that is not audio into a folder of its own. Those files are the organ definitions, the console artwork and the package definitions. Image editor sources (.psd, .psb, .xcf) and encrypted files are skipped. The samples (.wav, .wv, .flac, .aif, .aiff, .ogg) are never written to disk. They are decompressed into memory during the load, one pass per archive, in archive order.
Because the samples have no file of their own, a packaged organ keeps them resident in memory. Release tails of such an organ do not stream from disk. See Memory, loading and streaming.
The unpacked files live in Packaged/<identity>: in the Cache folder chosen on the General tab of Settings, or else in the Masterpiece folder in the user’s application data (see Files and folders). The identity is a hash of the archives’ lower-case file names and sizes, so the same packages open the same folder wherever they are kept. The folder holds:
| File | Purpose |
|---|---|
| The unpacked tree | Definitions, artwork, package definitions. |
archive-index.txt | The list of files in the archives, so a solid archive is walked once. |
masterpiece-archive.txt | The path of the archive the organ came from. Written last; a folder without it is an unpack that did not finish. |
chosen-definition.txt | The definition last chosen from this set of packages. |
A later open of the same packages logs archive: already unpacked in <folder> and skips the unpacking. A set copied or moved elsewhere is recognised by file name and size; its samples are read from the new place from then on, and the log says archive: now read from <path> (was <path>).
Note
Reading a RAR archive runs front to back. A solid archive has to be decompressed from the start to reach any file, so the first open of a large solid set takes the longest. The progress dialog shows Reading the archive and Extracting definitions and artwork during this step.
Package names Masterpiece recognises
Open any one file of a set. Masterpiece finds the others in the same folder.
| Packaging | Example names | How it is read |
|---|---|---|
| One archive | Name.CompPkg.Hauptwerk.rar | Read alone. |
| Numbered parts | 01_Name...rar, 02_Name...rar, 03_Name...rar | Each part is an archive of its own. Parts that start with the same organ word (three letters or more) and carry distinct numbers are joined as one set. |
| Parts by suffix | Name_part01.rar, Name_part02.rar | Archives of the same organ in the same folder are joined. |
| Multi-volume RAR | Name.part1.rar, Name.part2.rar; or Name.rar, Name.r00, Name.r01 | The volumes form one archive. Every volume from the first to the last must be in the folder. A missing volume is named in the error message. |
| Definition in a package of its own | A definitions-only archive beside the archives that hold its samples | Archives beside it whose names share five letters with the organ’s and carry a package the definition needs are joined. |
| GrandOrgue package | .orgue | Its organindex.ini lists dependencies by package id; a package whose file name contains that id must be in the same folder. |
Copies saved by a browser or a download manager, such as Name (1).rar or Name.1.rar, are ignored when the original is in the folder, and the log says which file was ignored. A copy with no original beside it produces a hint in the error message to rename it. A file with a partial-download companion beside it (.crdownload, .part, .download or .opdownload) is refused with the message that the download has not finished.
Limits
| Archive | Result |
|---|---|
| RAR 4 and RAR 5, single archive, solid or not | Opened. A solid RAR 4 archive is read with its own reader. |
| RAR 4 and RAR 5, multi-volume | Opened, except a solid RAR 4 set. |
| Solid RAR 4 set split into volumes | Refused with the message that Masterpiece cannot read it directly yet. Extract it with an archiver and open the definition file inside (OrganDefinitions/*.Organ_Hauptwerk_xml). |
| Password-protected archive | Refused. Extract it with the password and open the definition file inside. |
| A volume of a set with the others missing | Refused with a message that names what is missing. |
Masterpiece reads RAR archives and .orgue packages. It does not read other archive formats as packages.
A file that fails to read inside an archive (a CRC error, a download cut short) is listed, and the rest is unpacked. The organ opens when its definition came out. A dialog titled <file> is damaged lists up to three files, advises testing the archive and downloading it again, and offers Show the log. The marker file is not written for a damaged set, so the next open unpacks again.
A package without a definition fails with there is no organ definition file (.Organ_Hauptwerk_xml) in "<file>" or the packages beside it.
Several organs in one set of packages
When the unpacked folder holds more than one definition (perspectives, full and light versions, or two organs), the status line reads These packages hold several organs: choose one and a menu headed Which organ? lists the definitions by file name. The one opened last carries (last opened) and comes first. Escaping the menu leaves the status No organ opened.
Phones and tablets
On phones and tablets an organ is opened as a package: a .rar or .orgue. On Android the chosen document is copied into the application’s storage under Masterpiece/Organs before it opens; a copy of the same size is reused. On iPhone and iPad the Files app lends the document, and a volume of a multi-volume set asks for the folder that holds the rest (The rest of <file>). On iPhone and iPad a load waits while the app is in the background and goes on when it returns. See Phones and tablets.
Packages found elsewhere
A definition may name packages that are not with the organ. Every definition checks this at load time. A package counts as present when any one of its samples is found under the organ’s root, in the organ’s archives, or in a place already found. One sample is enough because a demo’s definition names the samples of the whole organ and ships only some of them.
For each package that is missing, Masterpiece searches in this order:
- The folders it was pointed to before, from
package-folders.txt. - The organ’s home: the folder of the archive for a packaged organ, or the organ’s root for an installed one. The folders directly inside it are searched too.
- The folder set as Package folder, and the folders directly inside it.
- The known sample libraries, for installed packages.
- For archives: the archives named in
joined-packages.txt; when that file is absent, every.rarand.orguefile in the folders of step 2 and 3 whose first package folder is one of those wanted. Only the first volume of a set is examined; later volumes and renamed copies are passed over. The archives found are written tojoined-packages.txt. - The dialog described below.
The log records the search: load: N package(s) not with the organ; looking in <folder> and the K folders in it, and in the package folder <folder>. Each package then gets a line: load: package 002374 (<name>) from <folder>, ... from another organ's archives, or ... is not in <folder>, a folder in it, nor the package folder: its pipes are silent.
The package folder setting
Package folder is on Settings > General…, shown in the Advanced display mode. It names a folder where you keep packages. The folder and the folders directly in it are searched. The default is None; Choose… sets it and Clear removes it. The setting is stored at once in settings.mpglobal (key packagedir) and applies to every organ at its next load.
The missing-package dialog
When a package is still missing after the search, a dialog titled A package this organ plays is missing names the package id and name. Package 1, the format’s standard components, is never asked for (see Composite organs).
| Button | Effect |
|---|---|
| Choose an archive… | Opens a file dialog for the package’s RAR archive. The archive is joined to the organ’s and its path is appended to joined-packages.txt. |
| Choose a folder… | Opens a folder dialog. A folder that holds OrganInstallationPackages/<id> is recorded in package-folders.txt. A folder that holds archives has the matching archives joined and recorded in joined-packages.txt. |
| Play without it | The organ loads and the pipes of that package are silent. The button counts down, Play without it (10 s); with no answer in 10 seconds the organ loads without the package, so a load started from a console, a favourite or the control API reaches the console with no one at the screen. The log says package: no answer in 10 s; the organ plays without it. |
package-folders.txt and joined-packages.txt
Both files are plain text, kept in the organ’s root folder: the folder holding OrganDefinitions for an installed organ, and the Packaged/<identity> folder for a packaged one. A third file, joined-<identity>.txt, holds the saved file index of each joined archive.
| File | Line format | Use |
|---|---|---|
package-folders.txt | <package id>, a tab, a folder path | The folder holding that package’s OrganInstallationPackages/<id>. A line is used only while the folder still holds a sample of the package. |
joined-packages.txt | One archive path per line | Archives joined to the organ. A line is used only while the file exists. |
To forget a choice, delete the file or the line.
Composite organs
A composite organ is a definition assembled from several sample sets. Its sample table references packages that ship with other organs; for example, one composite plays the samples of two separate demonstration sets. It opens like any other definition from a folder or from packages, and the search described in Packages found elsewhere finds the sets it plays: kept beside the composite, in the package folder, in a sample library, or in archives.
A composite may also borrow the format’s standard components (package 1) for its key, stop and blower noises. Those components come with no sample set, so Masterpiece generates stand-in noises, stores them in Standard noises in the Masterpiece folder, and loads them like samples. The log counts them: samples: N standard noises played as generated ones.
Sets found in archives are joined to the composite’s own archives and read from them in the same pass as its other samples. The packages found with other organs are part of what the composite’s sample cache holds.
GrandOrgue organs
A GrandOrgue organ opens from its .organ file in a folder or from an .orgue package. The converter translates the organ’s manuals, stops, ranks, couplers, tremulants, enclosures and panels into the model the loader reads. Sample and image paths stay relative to the folder of the .organ file. Where the two formats differ, the semantics are GrandOrgue’s: a manual is a keyboard and a division at once, a pipe’s release defaults to the tail of its own attack file found at the file’s cue point, and an enclosure lowers the level of its windchest groups with no filter.
Every manual of a GrandOrgue organ plays, each on a channel of its own by default. In a package whose .organ file lies in a folder below the package’s root, the samples are found in the archive.
jOrgan organs
A jOrgan organ opens from its .disposition file.
- SoundFonts (
.sf2): at the path the disposition gives, relative to its folder; otherwise a file of the same name beside the disposition (for paths such asC:\Sounds\Organ.sf2) - sfArk SoundFonts (
.sfArk, self-extracting.sfArk.exe) beside the disposition, in place of a missing.sf2: unpacked once into the organ’s folder - Skins (a folder or
.zipbeside the disposition, as the console names it): a page per console, drawn by its skin; then the stock page with keys and every drawstop - Conversion on opening, as for GrandOrgue organs: the disposition to a definition in memory; each SoundFont sample a rank uses to a WAV file with its loop and release tail
- Location of the converted samples: a folder per organ in the
jOrganfolder of the data folder (see Files and folders) - Conversion again only when the disposition, a SoundFont or a skin changes
- Favourites, recent organs and settings: under the disposition
- Formats read: jOrgan 3.0 to 3.21
| In the disposition | In Masterpiece |
|---|---|
| Keyboard | Manual; “ped” in the name: pedal. Keys and pitch shift (sub 12) from its MIDI message; default 61 keys from C2, pedal 32 |
| Rank | 128 pipes; each key the SoundFont region for it, retuned from the region’s root (coarse and fine tune, pitch correction, modulation envelope). Preset from bank select and program change |
| Stop | Stop on its keyboard: transposition, key range. Shared by several keyboards: one drawstop. Constant pitch (theatre drums): one note from every key |
| Coupler | Coupler to the keyboard holding its stops, with transposition. Keyboard’s own inverse coupler at unison: unison off |
| Stops no keyboard names | Keyboard of the unison coupler reaching them (theatre dispositions) |
| Continuous filter | Volume or expression, moved by an input: swell shoe, closed level from the value 0. Not moved: fixed rank level. Pitch bend: fixed rank tuning |
| Switch filter | Program change to other samples: wave tremulant. Same samples with LFOs: tremulant at the LFO’s rate, level and pitch depth. Modulation controller: vibrato at 8.2 Hz, 50 cents at full |
| Console | Organ name. With a skin: a page per console, each element at its place in its style (images, nine-part borders, texts from the name or description, skin fonts), states as pictures; stops, couplers, tremulants and swells clickable. Stock page: drawstops, keys and shoes; stops in two jambs; knob labels from each element’s stop= line |
Left out, each named in the log: combinations, memories, activators, captors, keyers, incrementers, regulators, sequences, the recorder, sounds without a SoundFont (LinuxSampler, generic MIDI), NRPN tone filters, SoundFont filters, extra layers. On skinned consoles: combinations, pistons and other controls drawn but not clickable.
Approximations and omissions go to the log, on lines starting with load: jOrgan import:.
The Test Sound organ
The Test Sound organ is a small organ Masterpiece generates on the device, so the program sounds before a sample set is installed: to check the audio and the MIDI setup.
| Part | What it is |
|---|---|
| Console | One manual (C2 to C7, 61 keys), one stop, one swell pedal |
| Samples | 44.1 kHz, 16-bit stereo; one key in three generated, the others retuned from the nearest |
| Room | An 8-second stereo impulse response, set as the organ’s reverb at 0.5 wet the first time it loads |
| Size | About 25 MB, in the Test Sound folder of the data folder: TestSound.organ and the folder TestSound |
To create it, tick Create the Test Sound organ on the Organ step of the first-run wizard. The box is off on a computer and on on a phone or tablet. Finish or Skip setup then shows Creating the Test Sound organ with a progress bar and Cancel, and loads the organ when it is ready, in a few seconds. A cancelled creation leaves nothing behind. When it fails, a box titled Test Sound organ not created gives the reason. The organ opens later as any GrandOrgue organ, from TestSound.organ.
Demo sets
A demonstration set ships the definition of the whole organ and the samples of some stops. The stops it leaves out are shown as not available and stay off.
- A stop counts as playing when its ranks have pipes in the definition, or when its switch leads, through the wiring, to the pallet of a pipe that a key opens.
- A rank whose pipes name samples that are nowhere counts as having no pipes: a sample is there when it is on disk under its package, in the organ’s archive, or held from the organ’s sample cache. Some demos list the pipes of every stop and ship the samples of a few; the others are not available. The log says
load: N rank(s) list pipes and ship no samples; their stops are not available. A load with –gui-only reads no samples and leaves this check out. A demo keeps every stop’s action noise, a pipe on a pallet that the stop’s own switch opens with no key; those pipes do not count as playing. - An organ that names no key switches keeps every pallet.
- Locked stops are drawn as the set draws them. A click on one is refused, and its tooltip reads
<stop>is not available. - Locked stops also stay in when anything else would draw them: a general, a piston, the crescendo, a tutti, a MIDI message or the organ’s own wiring. The switch network holds their switches off. A switch that also draws a stop with pipes stays free, and so does a switch the organ starts engaged.
- Copies of a locked stop’s knob on other console pages follow it.
- An organ in which no stop has pipes is not treated as a demo, and its stops are left as they are.
- In the stop list, a locked stop is greyed and its tooltip reads This stop’s ranks ship no pipes in this sample set. In Organ settings, Stops, ranks and perspectives, its checkbox is disabled with the same tooltip.
A stop left out by your own choice in Organ settings is a different case. It is dimmed on the console, and its tooltip reads <stop> is not loaded: chosen in Organ settings, Stops.
Licences and encrypted samples
Licences
Some definitions mark their samples as requiring the publisher’s licence (the definition’s licence-serial-number flag on the sample). The files themselves are plain and readable. Masterpiece cannot check a licence. It asks once per organ whether you hold one that allows you to play the set in this program.
The question is asked on the loading thread, after the definition is read and before any sample. The box is titled A licence is needed for these samples and names the organ and, when the packages state one, the publisher. Its buttons are Load the samples and Cancel. Enter, Escape and closing the box all answer Cancel; only a click on Load the samples answers yes.
| Answer | Result |
|---|---|
| Load the samples | The licensed samples load. The answer is stored with the organ (licenceconfirmed 1 in its settings file) and the question is not asked again. The log says licence: the player confirmed a licence for this organ. |
| Cancel | The licensed samples are left out. The status line gains licensed samples not loaded, and the count shows N awaiting a licence. The question is asked again at the next load. |
The Organ menu holds Licence accepted when the loaded organ has licensed samples. A tick shows that the licence is confirmed. Choosing it while ticked withdraws the licence and loads the organ again without the licensed samples. Choosing it while unticked asks the question again, and a yes loads the organ again with the samples.
The sample cache is kept separately for the two states, so withdrawing and confirming does not mix them.
Encrypted samples
Files with the extensions .hbw and .hbx are encrypted for another program. Masterpiece detects them by name, never decodes them, and counts them.
| Situation | Result |
|---|---|
| Some samples are encrypted | The other samples play. The status line shows N encrypted. |
| Every sample is encrypted | A dialog titled This organ’s samples are encrypted says that the console loads and the organ makes no sound. |
| An archive entry is password-protected | Counted in the archive report, and not unpacked. A password-protected archive as a whole is refused. |
A licence confirmation has no effect on encrypted files.
The Open window
File > Open organ… shows the window titled Open. It lists the favourites, up to 64 organs in numbered slots, or the organs installed in the organs folder, and is resizable.
Started with no organ to open, the program shows this window at once, its search box ready for typing, when there is a favourite or an installed organ to choose from. With no favourite yet and organs installed, the window opens on Installed.
| Element | What it does |
|---|---|
| List box | What the window lists: the favourites in Slot order, by Last used or by Most used; or Installed: the organs in the organs folder and in the sample libraries Masterpiece knows, and the organs played from their RAR packages while the package is still there. The folders Masterpiece unpacks packages into are never counted as a library. The order of the favourites is kept. |
| Search field | Placeholder Search the favourites, or Search the installed organs. Filters the list by a case-insensitive part of the name or of the file name. Return opens the first organ shown. Escape closes the window. On computers the field has the keyboard focus when the window opens. |
| A row | Shows the slot number, the name, and the file name below it. A click anywhere on the row opens the organ. When two favourites have the same name, the file name is prefixed with the format of the file. |
| Up and down arrows | Swap the favourite with its neighbour in the list. The two slots swap numbers, so gaps left on purpose stay. The arrows are active only while the search field is empty. The status line reports <name> is on slot N. |
| Rename | Opens a dialog titled Rename with the text The name this favourite shows. An empty name is ignored. |
| Remove | Removes the favourite at once, with no confirmation. The organ’s files stay where they are. |
| Add the organ now loaded | Adds the loaded organ under the organ’s own name to the lowest free slot. The status line reads Added on slot N, or All 64 slots are taken. The button is disabled when no organ is loaded or the organ is already listed. |
| Open an organ file… | Closes the window and opens the file dialog. |
| Install organ package…, Uninstall organ… | Shown with Installed, on computers, in place of Add the organ now loaded. See Installing an organ package. |
Quitting with an organ that is not among the favourites asks once, for that organ, Add to the favourites?, with Add and quit and Quit. The question is not asked again for that organ, whatever the answer. The organs asked about are kept as favouriteoffered lines in settings.mpglobal.
A favourite whose file is gone shows not found: <path> on its row. Clicking it shows Not found: <path> in the status line, and the favourite is kept, so a set on a drive that is not plugged in is still listed. When the organ has a kept copy (Keep a portable copy of this organ on the Loading tab of Organ settings), a click opens the copy.
The list is stored in settings.mpglobal as favourite organ <slot> <name> | <file> lines and is written at once. The same file holds favourites of temperaments and combination sets. An organ is listed once: the list is matched by file path.
Other versions of an organ
File > Other versions of this organ lists the definitions beside the loaded one: the other perspectives, or the full and light versions of a set. Each entry shows a file name without extension. The loaded organ is ticked and disabled. A choice loads that definition.
- For an organ opened from packages, the list holds every definition in the unpacked folder, searched through its subfolders.
- For an organ in a folder, the list holds the definitions in the folder of the loaded definition, without its subfolders. For an installed Hauptwerk-format organ that folder is
OrganDefinitions, so it lists every organ installed there.
The patterns are *.Organ_Hauptwerk_xml, *.CustomOrgan_Hauptwerk_xml, *.organ (also spelled .Organ and .ORGAN), *.Organ.Hauptwerk.xml and *.CustomOrgan.Hauptwerk.xml. The submenu appears only when there is more than one entry.
Reopening the last organ
Reopen the last organ when Masterpiece starts is on Settings > General…. It is off by default, applies to the standalone application, and is stored at once in settings.mpglobal (key reopenlastorgan). The last organ is recorded when a load completes; a cancelled or failed load leaves the record as it was. At start, a file named on the command line takes precedence. Otherwise the recorded organ opens, provided its file still exists; when it does not, nothing opens.
The crash guard
The standalone application keeps a record of the organ being loaded. When a load starts, the organ’s path is written to settings.mpglobal as a running line. A clean exit removes it. A system shutdown, logout or service stop (the termination and hang-up signals on Linux and macOS) counts as a clean exit. On phones and tablets the line is removed when the application goes to the background and written again when it returns, because the system may end a backgrounded application without notice.
At the next start Masterpiece reads the line and removes it. When it was present, the log records:
start: the last session did not end cleanly while <file> was loaded
with ; reopened appended when that organ was opened again by Reopen the last organ when Masterpiece starts. The crash writes this log line and changes nothing else: no dialog is shown, and the setting reopens the last organ as after a clean exit.
First load of an organ
The first time an organ loads (it has no settings file yet), Masterpiece reads the definition and draws the console without audio. Organ settings then opens on the organ, so you can choose the resident format, streaming, mono and which stops to load before any memory is spent. Closing Organ settings, with Keep changes or otherwise, loads the audio. Later loads of the same organ use the stored choices. See Organ settings.
Organ settings and the other settings files are stored by the organ’s identity (its name and unique id; for a definition with no id, its name and a hash of its path), so renaming or moving the set keeps its settings.
The load
While a load runs, the Loading dialog stays in front. It shows the file name of the organ, the current phase, a progress bar, a line of detail and a button. The dialog has a native title bar and a fixed size (460 by 190 pixels). It ignores Escape and closes when the load ends. A close by the system while the load runs counts as Cancel. The status line shows Opening <file>... for a package and Loading <file>... for a definition. The bar moves like a barber pole in a phase with nothing to count.
Phases
| Phase text | Detail line |
|---|---|
| Opening the archive | Empty. Only for packages. |
| Reading the archive | N% of archive scanned, or This may take a few minutes when the amount is unknown. |
| Extracting definitions and artwork | N% of files processed. |
| Reading the organ definition | Empty. |
| Building the wind model | Empty. |
| Wiring the console | Empty. |
| Finding the samples | Empty. |
| Loading samples from the cache | N of M samples, read from the organ’s sample cache. |
| Loading samples | N of M samples, followed after three seconds and 2% by the estimate - about N minutes left, about a minute left or less than a minute left. The estimate is smoothed and is timed from the start of the phase. |
| Creating the sample cache | N of M MB written - N MB/s - about N minutes left. |
| Preparing to play | The step under way: Letting the previous organ go, Setting up N voices, Checking the releases, Checking which stops have samples or Restoring the combinations. |
| Building the console | Empty. |
| Ready, Cancelled, Failed | The dialog closes. |
In a phase with no count, the detail line adds the seconds spent in it (N s) after 2 seconds.
Creating the sample cache writes the sample cache and runs only when the cache has to be written and Save the sample cache is set to Before the organ plays. With In silence, while it plays, the organ opens first and the status line shows creating the sample cache with a percentage. See Memory, loading and streaming.
The log records the time in each phase after the load, as stage: <phase name> N s lines, and ends with load: TOTAL N ms (<file>).
Cancelling
| Moment | Button | Result |
|---|---|---|
| Opening a package | Cancel | The archive work stops at a file boundary. The status line reads Archive opening cancelled. |
| Any other phase | Cancel | The button changes to Cancelling…, and the detail line reads Finishing the file it is reading. The load stops after the current file. |
| Saving the cache | Skip the cache | The organ opens, and the detail line reads The organ opens without its cache. The next load reads the samples again. |
A load cancelled while samples are being read keeps the samples already read. The organ plays with the stops whose samples arrived, and the status line ends with INCOMPLETE (load cancelled).
A load cancelled before any sample is read leaves no organ. The status line reads Load cancelled - no organ is loaded. Masterpiece then loads the console of the same organ without audio, so Organ settings can be opened from the Organ menu. The same happens when the computer has too little memory free for the samples, after the dialog Not enough memory for this organ.
Failures
| Case | What Masterpiece does |
|---|---|
| The file is not there | If a kept copy exists for it, the copy opens and the log says load: <file> is not there; opening its kept copy <copy>. Otherwise the load fails with no such file: <path>, and the organ already loaded stays loaded. |
| The definition cannot be parsed | The status line reads Failed to load <file>: <reason>. The organ already loaded stays loaded. |
| A package cannot be opened | A dialog titled Could not open <file> gives the reason and offers Show the log. |
| Samples missing | The organ plays. The status line shows N missing (named in the log). A dialog titled Some samples are missing gives the count and the first three files, and says the organ was installed in part or a package it needs is missing; installing it again, with every package, usually puts it right. A stop with none of its samples does not respond. |
| Samples unreadable | The organ plays. The status line shows N unreadable (named in the log). A dialog titled Some samples could not be read shows the first three, and says whether the archive they come from is damaged. |
| The memory limit is reached | The dialog Only part of this organ fits appears, the status line shows INCOMPLETE (memory limit), and the organ plays with the samples that fit. The limit is on Settings > Performance…. |
| The computer’s free memory runs low | Loading stops with memory kept free for the program and the system. The dialog Only part of this organ fits gives the count loaded, the status line shows INCOMPLETE (memory low), and the organ plays with the samples that fit. |
| An exception in the load | Logged as load: stopped: <message> and treated as a failed load. |
The status line after a successful load reads N stops, N ranks, N samples (N MB), followed by the counts above when they apply.
The log
Every session writes masterpiece.log in the Masterpiece folder; the session before it is kept as masterpiece.previous.log. --log <file> writes it elsewhere. Dialogs that report a failure offer Show the log. These lines concern opening:
| Prefix | Content |
|---|---|
archive: | Each step of opening a package: the archives found with their kind and size (RAR 5, solid, 6.70 GB), the file count, the unpacking, the damaged files, the time taken, and the definitions found. |
load: | The organ root, packages found elsewhere, libraries, the licence state, perspectives left out, memory choices, and the totals. |
samples: | missing <file>, unreadable <file>, and the stand-in noise count. |
stage: | Time spent in each phase. |
cache: | Cache reads and writes, and a skipped save. |
portable: | The kept copy of an organ made with Keep a portable copy of this organ. |
licence: | A licence confirmed during the load. |
start: | An unclean end of the previous session. |
Attach masterpiece.log to a bug report. See Troubleshooting and caveats.
A tour of the window
This page describes the main window from top to bottom: the six menus and every control in the top bar, the console pages and how the mouse works on them, pages in windows of their own, panels, the score, the plain stop list, the expression pedals, the on-screen keyboard and the context menus. Registration, pistons, tuning and recording are covered on Playing.
The window opens at 1280 x 760 pixels the first time, and afterwards at the place and size it had when the program last closed. A saved place that no display shows any longer is replaced by the centre of the main display. The window can be resized freely. From top to bottom it holds:
| Part | Height | Shown |
|---|---|---|
| Top bar | 36 px (a second row of 36 px in a window narrower than 1024 px) | Always |
| Page tabs | 28 px | When the console has more than one page, or a panel or the score is shown as a tab |
| Console, panel, score or stop list | The rest | Always |
| Expression pedals | 120 px wide, at the right | View > Expression pedals |
| On-screen keyboard | 96 px, plus 24 px for the manual selector | View > Keyboard |
| Status line | 20 px | Always |
The title bar reads Masterpiece <version> - <organ name>, for example
Masterpiece 0.10.0 - Nancy. A build other than a tagged release shows the
first five characters of its commit in place of the version: main 3fa91 for
a build of the main branch, dev 3fa91 for any other build. Help > About
Masterpiece, the diagnostics report and the log name the build the same way.
The top bar
From left to right the bar holds the File, Organ, View, Settings, Window and Help menus; the volume slider with its dB readout; the level meter; Set; the stepper (<, the frame readout and >); the tuning button, which shows the temperament and the pitch of A; the save button; and the Panic button, drawn as an octagon with a cross. The bar holds what a player looks at or presses while playing; choices made once are in the menus.
File
The organs and the settings files: what is opened and saved.
| Item | What it does |
|---|---|
| Open organ… | Opens the Open window: the favourites, the organs installed, and a button for the file dialog. See Opening an organ. |
| Other versions of this organ | A submenu, shown when the loaded organ’s package or folder holds more than one definition (a perspective each, or full and light). Each definition is listed by its file name without the extension. The loaded one is ticked and disabled; choosing another loads it. |
| Open score… | Shows the score and opens its file dialog. See The score. |
| Install organ package… | Installs an organ’s packages into the organs folder. See Installing an organ package. |
| Uninstall organ… | Removes an installed organ’s packages from the organs folder. |
| Import settings… | Reads a settings archive (a .zip written by Export settings… or Export organ settings…). A question names what the file holds and what it replaces; Import puts it in place, after the settings there now are saved in the backups folder. |
| Export settings… | Writes every setting, the program’s own and those of each organ, to one .zip archive. |
| Export organ settings… | Writes the loaded organ’s settings to one .zip archive. Disabled until an organ is loaded. |
| Exit (Windows), Quit (Linux) | Closes the program, as the window’s close button does. |
Install organ package…, Uninstall organ…, Import settings…, Export settings… and Export organ settings… are absent on phones and tablets. Exit and Quit are absent in the plugins, where the host closes the plugin, and on macOS, where Quit Masterpiece is in the application menu. The archives are described on Files and folders.
Organ
The organ that is loaded: its settings, its tuning, its combinations. Every item but Console profile… and All notes off is disabled until an organ is loaded.
| Item | What it does |
|---|---|
| Loading…, Stops, ranks and perspectives…, Outputs…, Voicing…, Organ EQ…, Reverb…, MIDI… | One item per tab of Organ settings, each opening the window on that tab. See Organ settings. |
| Temperament and tuning… | Opens the tuning panel, as the tuning button in the bar does. See Transposer, temperament and pitch. |
| Combinations | Shows or hides the Combinations window. Ticked while shown. See The player’s own combinations. |
| Reload organ | Loads the organ again from its files, with its current settings. |
| Copy settings from another organ… | Copies the MIDI map, the Combinations or the Mixer and voicing of another organ that has settings saved, chosen under From, to this one. They replace this organ’s own. Absent on phones and tablets. |
| Learn MIDI in turn… | Opens a window that asks for each tab of the console in the order of the stop list. See Learning the tabs in turn. |
| Console profile… | Opens the console profile: the player’s console written down once, for every organ. See Console profiles. |
| Map from console profile… | Lists the matches between the profile in use and this organ, to tick and map. Disabled while no profile is in use. |
| Licence accepted | Present when the organ’s samples need the publisher’s licence. Ticked once the licence is confirmed. Choosing it while ticked withdraws the confirmation and loads the organ again without the licensed samples; choosing it while unticked asks the licence question. See Licences. |
| All notes off | Releases every key on every channel. |
The program’s own couplers between the manuals are on the Loading tab of Organ settings and in Window > Couplers. See Extra couplers.
View
What the main window shows.
| Item | What it does |
|---|---|
| One item per console page | The page’s name. Shows that page. The page shown is ticked. An organ that ships no console artwork has Stop list here in their place, which shows the plain list. |
| Open page in new window | A submenu with one item per console page, ticked while the page has a window; choosing a ticked page closes its window. Present in the standalone application, while the console is shown. See A page in its own window. |
| Stop list | Shows the plain list of stops over the console, for a player who cannot see the console. Present when the organ ships console artwork; ticked while the list is shown. See The plain stop list. |
| One item per panel | The panel’s name. Shows the panel’s tab, or brings the panel’s window to the front. Ticked while that panel is shown. |
| Panel of the whole organ | Shown while the organ has no panel. Makes the first panel. |
| New panel | Shown once the organ has a panel. Makes a panel; disabled when the organ already has ten. |
| Rename or delete a panel | A submenu, shown when the organ has a panel, with Rename <name>… and Delete <name> for each. |
| Score | Shows the score tab, or brings the score’s window to the front. Ticked while the score is shown. See The score. |
| Expression pedals | Shows or hides the strip of expression pedal faders. Present when the organ has at least one swell shoe. |
| Keyboard | Shows or hides the on-screen keyboard. |
| Highlight played keys | Lights the keys of the drawn manuals as they are played. Ticked by default. |
| Stop list size | A submenu: Normal, Large, Larger. The height of the stops in the plain stop list, for a touch screen or for reading from the bench. |
| Piston size | A submenu: Normal, Large, Larger. The size of the pistons in the Combinations window. |
| Large frame number | Shows the sequencer’s number alone, in large figures, in the bar; the whole readout is in its tooltip. |
| Scale small pages to fit | Magnifies a page much smaller than the organ’s first page until it fills the window. Off by default. See Scaling. |
| Fit window to page | Sizes the window to the page shown, at 100 % or at the largest size that fits the screen, and centres it on its screen. Disabled in full screen. |
| Remember window positions | Opens each window where it was last closed. Ticked by default. |
| Full screen | Fills the screen with the window (F11). Esc or F11 leaves it. Present where the system allows it. |
| Console layout | A submenu with the console’s layouts, the one in use ticked. Present when the console is shown and the organ offers more than one layout. See Layouts. |
The expression pedals, the keyboard and the page windows are described in the
sections below. Highlight played keys is described under
Highlight played keys. The sizes are kept in
settings.mpglobal as stoplistsize, pistonsize, bigframenumber,
smallpagesfill and rememberwindows.
Settings
The program’s settings, the same for every organ: one item per tab of the Settings window, each opening the window on that tab.
| Item | Tab |
|---|---|
| General… | The display mode, the organ at start, the sample cache and its folder, the package folder, the language, the text size and the font |
| Audio… | The audio device, the output compressor and limiter |
| Performance… | The performance preset, the audio engine, the memory limit and the polyphony |
| MIDI… | The MIDI inputs and outputs, the default channels, how stops answer and echo |
| Console MIDI… | The console’s own buttons, the ready lamp, the messages sent on load and unload |
| Console display… | The text display on the console’s jamb |
| Remote control… | The control API, the web console, MIDI System Exclusive and OSC |
The Settings window itself has an eighth tab, Diagnostics, opened from Help > Diagnostics…. In the VST3, LV2 and AU plugins the menu lists General…, Performance… and Console display…: the host owns the audio device and the MIDI ports, and Organ settings opens without its MIDI tab. See Settings.
The display mode on the General tab, Simple or Advanced, decides how much the settings windows show. Simple, the default, shows the main settings with their presets; Advanced shows every setting. The first-run wizard asks for it first.
Window
The tool windows beside the console, each ticked while it is open. Choosing a ticked item closes the window.
| Item | What it does |
|---|---|
| Couplers | The program’s own couplers between the manuals, and the bass and melody couplers. See Extra couplers. |
| Recorder | The Recorder window. See Recorder. |
| Metronome | The Metronome window. See Metronome. |
| Tuner | The Tuner window. See Tuner. |
| Split keyboard | The Split keyboard window. See Split keyboard. |
Help
| Item | What it does |
|---|---|
| Documentation | Opens this manual in the browser. |
| Release notes | Opens the releases page on GitHub in the browser. |
| Check for updates… | Asks GitHub for the newest release’s version number at once. The status line then reads Masterpiece <version> is the latest version., or No answer from the update server. Check the network and try again., or the update notice appears. |
| Diagnostics… | Opens the Settings window on its Diagnostics tab: the log, the checks and the diagnostics report. Present in the standalone application. |
| About Masterpiece | The version or build, and the licence. |
The Settings and Organ settings windows each have a ? button at the right end of their tab bar. It opens this manual at the section of the tab in front.
The update notice
The standalone program asks GitHub once a day for the newest release’s version number, ten seconds after it starts. The request carries no account and nothing about the player. When a newer release is out, a notice at the right of the status line reads Masterpiece <version> is out, with three buttons:
| Button | What it does |
|---|---|
| Download | Opens the newest release’s page, with its downloads, in the browser. |
| Never check again | Turns the daily check off. Check for updates daily on Settings > Diagnostics turns it on again. |
| × | Closes the notice. |
The notice closes by itself after 30 seconds; during an organ load it waits,
and the 30 seconds count from the end of the load. Check for updates daily
is on by default and is stored as updatecheck in settings.mpglobal. A
scripted run (--play-midi, --gui-only) makes no check, and neither does a
start with the environment variable MASTERPIECE_UPDATE_CHECK=0.
Controls in the bar
| Control | What it does | Default and range |
|---|---|---|
| Volume slider | The master volume, with a readout in dB to its right. It widens with the window, from 160 px to 320 px. The bottom of the slider, -40 dB, is silence. Each organ keeps its own volume. | 0 dB; -40 to +24 dB in steps of 0.1 dB |
| Level meter | Two rows of 14 lamps, left and right, showing the output level after the master fader. The scale starts at -48 dB; lamps 10 to 12 are amber and lamps 13 and 14 are red. The meter is hidden when less than 40 px remain for it. | |
| Set | Stores what is drawn into the piston or step chosen last. See Capture. | |
| <, frame readout, > | The sequencer. The readout reads Frame 003 / 012 (the current frame and the last one holding anything), Frame - / 012 with no frame chosen, or No frames. With the sequencer set to levels of generals, and always in the Simple display mode, it reads Level 2, general 3. A click on the readout asks for a frame number. See The sequencer. | Frames 000 to 998 |
| Tuning button | Shows the temperament, the pitch of A and the transposition, for example Equal A 439.8, or Equal A 440.0 +2 with a transposition. A click opens the tuning panel. See Transposer, temperament and pitch. | |
| Save button (a disk icon; its name is Save state) | Records the stops as they are now as the organ’s starting state. See Remembered between sessions. | |
| Panic (an octagon with a cross, last in the bar) | Releases every key on every channel, silences every note still sounding, and opens the MIDI inputs again. |
The bar is one row from a window 1024 px wide, in every language. It shortens in a fixed order when the window narrows: the volume fader narrows to 160 px, then the level meter gives way. Each menu button is as wide as its name, from 52 px up to 88 px; a longer name is drawn narrower. Below that, the menus and the fader move to a row of their own.
Plain sample playback, with the wind model, tremulants, enclosure shading, voicing and the room reverb bypassed, is the Bypass all effects box on the Loading tab of Organ settings, in the Advanced display mode. It is saved per organ.
On a phone or tablet the sequencer buttons are 44 px wide, the Panic and Save state buttons 46 px, Set 64 px and each menu button at least 84 px. On a computer they are 30 px, 38 px, 56 px and 52 px.
The status line
The strip along the bottom edge shows, from left to right and separated by
|:
- The result of the last load: the number of stops and ranks, the samples
loaded with their size in MB, and any of
N missing (named in the log),N unreadable (named in the log),N encryptedandN awaiting a licence. A load that stopped partway addsINCOMPLETE (memory limit),INCOMPLETE (memory low)orINCOMPLETE (load cancelled). A load with no audio readsgraphics only - no audio loaded. voices N: the number of voices sounding now.- While the sample cache is being written in silence,
creating the sample cache, with a percentage and, after a few seconds, the time left. A cache that could not be written readssample cache not savedorsample cache not saved: the disk is fulluntil the next load. - When non-zero, each after a comma:
dropped N(note starts that found no free voice),no audio N(starts whose samples were not in memory),late blocks N(audio blocks that took longer than the audio they produced) and, with streamed release tails,streamed releases fell behind Nx: turn off "Stream releases from disk" in Organ settings.
After a load with no audio, the line reads `65 stops, 312 ranks, graphics only
- no audio loaded | voices 0, no audio 24`. The line is cut short in a narrow window; the whole text appears as a tooltip. The window has no CPU readout. The update notice takes the right end of the line while it is shown.
Page tabs
A console that ships more than one page shows one tab per page. A page is named as the organ names it, or Page 1, Page 2 and so on. Panels and the score shown as tabs follow the console pages. A click on a tab shows that page. A page, panel or score stays on screen when the tabs are rebuilt, for example when a window of its own closes or a panel is added. The tab last chosen is kept for each organ, and the next load of that organ opens on it.
In the standalone application each console page tab carries a small button, a square with an arrow. A click on it opens the page in its own window; the button is filled while the window is open, and a click then closes the window and brings the page back to its tab. With a mouse the button takes 16 px of the tab; on a touch screen it takes 44 px and the tab’s full height, and the tab widens to keep its name.
A right-click on a console page tab opens a menu:
| Item | Shown when |
|---|---|
| Open in its own window | The page has no window. |
| Open in its own window, main layout, Open in its own window, alternate layout 1 (portrait) and so on | The page has no window and the organ offers more than one layout. Opens the window in that layout. |
| Bring its window to the front | The page has a window. |
| Close its window | The page has a window. |
A right-click on a panel’s tab offers Rename <name>…. In the plugins the pages stay tabs and the icon and menu are absent.
The console
Where an organ ships console artwork, the console is the organ’s own: the bitmaps of its drawstops, pistons, couplers, shoes, manuals and engraved labels, placed as the set places them. A click on a drawstop moves the switch the drawstop is bound to and changes its picture in one step.
Scaling
The window shows a whole page at once, so the console has no scroll bars. The page is scaled by one factor for both directions, and the factor is raised as well as lowered: a console drawn smaller than the window is enlarged. The factor is the largest at which the whole page fits. The page is measured from where its drawing starts, so a page drawn away from its top-left corner keeps no empty band beside it. The page is centred and the spare room is split evenly on both sides. The proportions are kept, so the case and the keys keep their shape.
A page much smaller than the organ’s first page (a settings panel a few hundred pixels wide, for example) is shown at the scale of the first page, which is smaller than the largest scale that fits. This applies when the first page is at least twice as wide and twice as tall as the page shown. View > Scale small pages to fit lifts the rule: every page then fills the window. The choice is kept for every organ. A page in its own window always fits the window.
View > Fit window to page sizes the window to the page shown: at 100 % when the screen has room for it, otherwise at the largest size that fits the screen the window is on, with the bars and strips the window shows around it. The window is centred on that screen.
Clicks, drags and right-clicks land on the picture at any scale.
Layouts
A set can draw its pages again for another screen shape, with up to three alternate layouts beside the main one. A layout counts as portrait when its console is taller than it is wide. View > Console layout lists them as Console: main, Console: alt 1, Console: alt 2 (portrait) and so on.
The window follows its own shape. When the area for the console turns taller than it is wide, the first portrait layout is chosen; when it turns wider again, the first landscape layout is chosen. A layout picked by hand holds until the shape turns. A page that declares nothing for the chosen layout is drawn in the main layout, whole.
Clicking and dragging
| Object | Action |
|---|---|
| Drawstop, rocker, coupler, tremulant | A click toggles the switch. A drag that starts on one and crosses others sets each one it enters to the state the first took, so one stroke along a row draws or retires the whole row. |
| Piston, setter, or any button the organ marks as momentary | The button is pressed while the mouse button is down and released with it. A piston fires on the press. |
| Drawn key of a drawn manual | A click plays the key, on the channel of the keyboard that the manual belongs to, through the same path as a MIDI key. The key sounds while the button is held. Sliding along the manual plays the keys under the pointer in turn; sliding from one manual onto another moves the note to the other manual. With the pointer at rest on a manual, a tooltip names the keyboard, the MIDI device that plays it and its channel: Great: Fatar, channel 2; the device is the one bound to the keyboard, or the one that last played that channel, and is left out until one has. |
| Swell shoe, crescendo pedal, dial or slider | A press takes hold of the control and moves nothing. A drag then moves the value from where it was. |
| Stop with no pipes in the set | A click on it is refused while it is pushed in. See Stops that make no sound. |
A control is dragged up and down, with the pointer’s movement scaled to half a unit of the 0 to 127 range per pixel. A control drawn lying down, such as a slider labelled from Original to Silent, is dragged sideways: right is more, and the movement is scaled to the drawn width, between 0.3 and 1 unit per pixel. The axis is whichever the pointer has moved further along from the press. A control whose artwork says that clicking higher decreases the value is reversed. The drag keeps working when the pointer leaves the picture, and the value stops at the ends of its travel.
A drag of the crescendo pedal fires each step it crosses, in order. See Crescendo.
The console has no mouse-wheel handler: the wheel does not move a drawstop, a piston, a shoe or the crescendo.
On a phone or tablet a finger held still for half a second opens what a
right-click opens, on the drawn console and on the panels. A finger that moves
more than 8 pixels is sliding and opens nothing. A stop changes as the finger
lifts, so a stop held for its menu stays as it was. The environment variable
MASTERPIECE_TOUCH=1 makes presses work the same way on a computer.
Stops that make no sound
Two kinds of stop are drawn and move but make no sound. A tooltip names the cause when the pointer rests on the drawstop for 700 ms.
| Cause | On the console | Tooltip |
|---|---|---|
| The stop was left out of the load in Organ > Stops, ranks and perspectives… | The drawstop is veiled: the picture is darkened by 55 % black, in the shape of the picture. The stop still draws and is stored in pistons; it makes no sound. Copies of the drawstop on other pages are veiled too. Every other picture is drawn at full strength. | <stop> is not loaded: chosen in Organ settings, Stops |
| The stop’s ranks ship no pipes in this sample set (a demo set’s locked stops) | The drawstop is drawn as the set draws it, with no veil. A click on it is refused. | <stop> is not available |
A stop with no pipes is also held in. A general, the crescendo, a tutti, a MIDI message and the organ’s own wiring leave it pushed in. A switch that also draws a stop with pipes stays free to draw it, and so does a switch that the organ starts engaged. A stop whose pipes are reached only through a pallet that a key opens counts as having pipes. When none of the organ’s stops has pipes, the organ is not a demo and its stops are left as they are.
A stop that was left out of the load has to be loaded again to sound: change the choice in Organ settings and load the organ again.
Context menus
A right-click opens the menu of the object under the pointer. The mappings themselves are described on MIDI and consoles.
| Object | Menu |
|---|---|
| Drawstop, coupler, piston | The object’s name, then its current MIDI mappings (Note 36 ch 1 (toggle), CC 20 (while held), (draw only), (cancel only)), what it sends and its computer key, or Not mapped; Learn (Learn (while held) for a piston or another held button); Learn on and off (two messages)…; a submenu Learn one message as with Toggle, While held, Draw only and Cancel only; MIDI window…; and Clear mapping. |
| Swell shoe, crescendo, dial, slider; expression pedal fader | The control’s name, its mappings (CC 7 ch 1 (closed at 0, open at 127)) or Not mapped, MIDI window…, Learn: move a pedal, knob or fader, Closed position: where the pedal is now, Open position: where the pedal is now, Use the pedal’s whole travel and Clear mapping. |
| Key of a drawn manual | The MIDI window of that manual: which keyboard plays it and the controls that bring it to a keyboard. |
| Stop, coupler, tremulant, piston, shoe or slider on a panel; stop in the plain stop list | The same menu as the object on the console. A stop reaches the drawstop the console draws for it. |
| Page tab, panel tab | See Page tabs. |
| Empty part of the console | Cancels a learn that is armed. |
The console without sight
Every drawn stop, coupler and piston carries an invisible component over it, where the picture is. A screen reader finds the control there, reads its name, and reads whether it is drawn. A stop’s name carries its division, Principal 8, Great; a stop that ships no pipes reads as not available.
| Key | What it does |
|---|---|
| Tab | Moves to the next control, and back with Shift and Tab. |
| Space or Enter | Draws the stop or retires it. A piston is fired. |
The console keeps its painting and its clicks: the components over the controls take no clicks of their own.
A page in its own window
A console surrounds the player: jambs to either side, the key desk in front, a combination panel above. A set draws each on a page of its own, and each page can open in a window of its own to spread the console over several screens. The windows are available in the standalone application. A page is opened from the icon on its tab, from the right-click menu of its tab, or from View > Open page in new window.
A page window:
- has the title
<page name> - <organ name>, a native title bar with minimise, maximise and close buttons, and can be resized; - opens with the page’s own size and shape, scaled down to fit 1600 x 1000 pixels at most, and never above its own size; a page that draws nothing opens at 1000 x 700;
- opens on another display when there is one, and on a portrait display when its layout is portrait and one exists. With one display it opens beside the main window, offset 40 px down and across for each window already open;
- shows its page whole at the largest scale that fits, centred;
- opens in the layout chosen in the tab menu, or follows the shape of its own window as the main window does (a portrait layout when the window is taller than it is wide);
- passes the computer-keyboard shortcuts of the MIDI windows to the program;
- on close, returns the page to its tab in the main window.
The windows are remembered per organ: which pages are open, where, at what size and in which layout. They close when another organ loads and reopen where they were once the organ is in. A position that no display shows any longer is moved onto a display that exists.
Panels
A panel shows the organ as equal rectangles with the name in the middle, for a touch screen or for a console that is hard to read at a distance. An organ has up to ten panels. Each panel is a tab beside the console pages, or a window of its own on any screen. Every rectangle stands for something the organ already has, so its MIDI mapping is the stop’s, piston’s or control’s own.
View > Panel of the whole organ makes the first panel; View > New panel makes each one after it. The panels are named Panel 1, Panel 2 and on until renamed.
Sections
The panel is divided into columns, one per section, in this order:
| Section | Holds |
|---|---|
| One per division | The division’s stops, then the couplers that feed it, then its tremulant. A stop that ships no pipes is left out. A stop with no ranks at all, which is a coupler or a tremulant, stays. |
| Extra couplers, or Bass and melody couplers | The program’s own couplers, while they are on in Window > Couplers. |
| Other | Couplers and tremulants that cannot be placed in a division. |
| Pistons | The organ’s own pistons that it draws on its console. An organ that draws none has all of its pistons listed. |
| Expression | One fader for each swell shoe, and a Crescendo fader when the organ has a control with at least 3 crescendo steps. |
A division’s own prefix, repeated on its stops (HW Principal, HW Flute), is
dropped from the names in that column when most of the column’s names carry it.
A footage at the end of a name (8', 2 2/3', IV) is set on a line of its
own below the name.
Using a panel
| Element | Action |
|---|---|
| Stop, coupler, tremulant | A click toggles it. The rectangle is lit while drawn. A drag across several sets each to the state the first took. |
| Piston | Fires on the press and is released with the mouse button or the finger. |
| Fader | A press or a drag sets the value from the position in the track, 0 at the bottom and 127 at the top. |
| Any element, right-click or long press | The element’s MIDI menu, as on the console. See Context menus. |
The bar
The bar along the top of the panel holds, from left to right:
| Control | What it does |
|---|---|
| One button per section | Shows or hides that section’s column. All sections are on in a new panel. |
| -, + and the size | The size of the stops, as a percentage: 100 % is the standard size, and each press moves it by 10, from 50 % to 250 %. Ctrl with + and Ctrl with - do the same (Cmd on a Mac), and Ctrl with 0 returns to 100 %. |
| Fit | Sizes the stops to the window: the largest size, in steps of 5 %, at which every shown section fits. While Fit is on, the size follows the window and - and + are disabled; a size set with the keys ends the fit and steps from the size on show. |
| Colour selector | Dark, Light, High contrast or By division. The text contrasts with its rectangle, lit or not, in every scheme. |
| Detach | Moves the panel into a window of its own. The button then reads Attach and moves the panel back among the tabs. Absent on phones and tablets. |
| Rename | Asks for the panel’s name, used on its tab and in its window’s title. |
| Edit | Switches edit mode on and off. |
| Save | Keeps the sections, hidden elements, names, colours, size and window. The button reads Save * while there are unsaved changes. |
In edit mode every element shows a tick box at its top-right corner. A click on the tick box shows or hides the element; hidden elements are dimmed in edit mode and absent otherwise. A click anywhere else on the element, or a right-click, opens a dialog with the element’s name. The dialog has OK, Organ’s name, which gives the organ’s own name back, and Cancel. On a fader the title bar names it and the rest of the fader shows or hides it.
A panel made, deleted or renamed through the View menu is written at once.
Other changes are written by Save. The panels of an organ are kept in
organs/<organ>.mppanels, in the data folder described on
Files and folders. A panel window opens at the position and size
saved with the panel, or 1024 x 600 pixels centred.
New stops and sections that an organ update brings show by default. The file lists only what was switched off.
The score
View > Score adds a Score tab after the console pages and the panels.
It shows a MusicXML score (.musicxml, .xml or the compressed .mxl) and
plays it through the organ, with a cursor on the notes being played. Until a
score is open the tab reads Open a MusicXML score (.musicxml, .xml or
.mxl).
The page is engraved to the size of the tab, so the staves fill its width. A larger zoom makes the notation larger and breaks the lines again, which gives more pages. While the score plays, the pages turn by themselves, or the line scrolls in the one-line view. A box at the top left reads the current bar.
The bar along the top holds Open score…, the page buttons, the zoom, Play, the tempo in BPM, Manuals…, Mark… with the registration buttons, View…, Buttons… and Detach. Detach moves the score into a window of its own, 1100 x 760 pixels centred, and Attach brings it back; with the window detached, View… offers Keep this window on top. Phones and tablets have no Detach.
Score describes each control, the marks, the keys and the console buttons, and what is kept with the score.
The score fonts are written once to a Score fonts folder in the data folder. When that fails, the tab reads The score fonts could not be prepared. A file that cannot be read gives The file could not be read., and one with no score in it gives No score was found in this file.
The plain stop list
An organ that ships no console artwork opens on the plain stop list. It shows the organ’s stops under a heading for each division, as tiles 190 px wide in as many columns as fit, with a slim scroll bar. A drawn stop is ivory with dark lettering; a pushed-in stop is dark. The list follows the engine, so a stop drawn by a piston, a combination or MIDI shows drawn here too.
A stop that was left out of the load is dimmed and carries the tooltip Not loaded: chosen in Organ settings, Stops. A stop whose ranks ship no pipes is disabled and carries the tooltip This stop’s ranks ship no pipes in this sample set.
The list holds stops. Couplers, tremulants and pistons that the organ has as switches alone are reached through a panel.
The list without sight
View > Stop list shows the plain list over the console of an organ that ships console artwork, and Ctrl with L (Cmd with L on a Mac) shows it and hides it again. The keyboard focus goes to the first stop.
A screen reader reads each stop as a button that can be drawn or retired. The name it reads is the stop’s own name and the division it is in, Principal 8, Great. A stop whose ranks ship no pipes reads as not available.
| Key | What it does |
|---|---|
| Tab | Moves to the next stop, and back with Shift and Tab. |
| Left and right arrows | Move one stop along the list. |
| Up and down arrows | Move a row of the grid, so the number of stops moved follows the width of the window. |
| Space or Enter | Draws the stop, or retires it. |
A stop that changes by a piston, a combination or MIDI is announced, with its name and its new state. The announcement is made only while a screen reader is listening.
Expression pedals
View > Expression pedals shows a strip 120 px wide at the right of the window with one vertical fader for each swell shoe of the organ. The item is present when the organ has at least one shoe. The strip is off at every start.
- Each fader runs from 0 (closed) to 127 (open) in steps of 1. Every fader starts open, at 127, when an organ is loaded.
- The label under a fader is the shoe’s name with the words
Enclosure,Swell boxorSwelltaken off the front, so that two boxes calledEnclosure RandEnclosure POreadRandPO. A shoe with no name left reads Swell. The organ’s own full name appears as a tooltip. - A shoe moved over MIDI moves its fader.
- Two enclosures worked by one shoe share one fader.
- A control that sets a level, and that the organ asks to remember, has no fader here; the organ draws it on a page of its own.
- The crescendo has a fader in the Expression section of a panel, or the organ’s own drawn control.
- A right-click on a fader opens the menu of a continuous control described under Context menus.
On-screen keyboard
View > Keyboard shows a keyboard along the bottom of the window, 96 px high. It spans MIDI notes 24 to 108 (C1 to C8, with middle C as C4), and the key width follows the window width. A click plays the key through the same path as a MIDI keyboard, so stops and couplers apply.
When the organ has more than one playable keyboard, a selector above the keyboard names the manual that the keys play. It starts on the organ’s preferred manual, which is the widest compass when declared and otherwise the unenclosed manual with the most pipework. The keys play on the channel assigned to that manual on the MIDI tab of Organ settings, and follow a change of channel made there while the organ is loaded. The keyboard is off at every start. The keys are played with the mouse.
Highlight played keys
View > Highlight played keys is ticked by default. While it is on, a key of a drawn manual lights when the key is down on that manual, whether it was pressed on the screen, on a console or by a recorded performance. A key lights on the manual it reached. Switching the item off stops the console from looking at the keys and from drawing them; any key lit goes dark once. Drawing the keys is the most costly part of repainting the window in a fast passage, so the item helps on a slow machine. The choice is kept for every organ.
Keyboard shortcuts
The window has one shortcut of its own: Ctrl with L (Cmd with L on a Mac) shows the plain stop list over the console, and hides it again. On a panel, Ctrl with +, - and 0 size the stops; see The bar. Any stop, coupler, piston, setter and other object that has a MIDI window can be given a computer key there. The key then works from the main window, from page windows and from the Combinations window, unless the control with the focus uses the key itself. See MIDI and consoles.
Tooltips
A tooltip appears after the pointer rests on a control for 700 ms.
| Where | Tooltip |
|---|---|
| Console drawstop with no sound | <stop> is not available or <stop> is not loaded: chosen in Organ settings, Stops |
| Drawn manual | The keyboard that plays it, its MIDI device and its channel: <keyboard>: <device>, channel <n>, or <keyboard>: channel <n> before a device has played it |
| Plain stop list tile | This stop’s ranks ship no pipes in this sample set or Not loaded: chosen in Organ settings, Stops |
| Tab icon | Open this page in its own window, to move to another screen or Close this page’s window and bring it back here |
| Set | Names the target: Set: store what is drawn into <name>, or Set: choose a piston or a step, draw the stops, then press Set to store them there. While Set is held from the console or the Combinations window: Set is on from the console or the combinations window: pistons store. Press to let it go. |
| Frame readout | The sequencer’s frame, out of the frames that hold a registration. Click to go to a frame by its number |
| Tuning button | Temperament, pitch and transposer for this organ |
| Panic | Panic: silence every note still sounding |
| Save state | Save the stops as they are now: the organ starts with them |
| Expression pedal fader | The organ’s full name for the shoe |
| Panel bar | Make the stops smaller, Make the stops bigger, Fit the stops to the window, Give this panel a name of its own, Tick the elements this panel shows; touch a name to change it, Keep the sections, hidden elements, window and colours, Show this panel in a window of its own, or back among the tabs |
| Status line | The whole text of the line |
A dialog shows its tooltips inside itself, so a tip comes up in front of the dialog it belongs to.
Where the plugins and phones differ
| Feature | VST3, LV2, AU | Phones and tablets |
|---|---|---|
| Pages in windows of their own | Absent; the pages stay tabs | Windows fill the screen; see Phones and tablets |
| Panel and score Detach | Present | Absent |
| File > Exit or Quit | Absent; the host quits | Absent |
| File > Install organ package…, Uninstall organ… | Present | Absent |
| Import settings…, Export settings…, Export organ settings… | Present | Absent |
| Organ > Copy settings from another organ… | Present | Disabled |
| Settings menu | General, Performance, Console display | Every tab |
| Help > Diagnostics… | Disabled | Present |
| File > Open organ… file dialog | Definition files and packages | Packages: .rar and .orgue |
| Long press for the context menu | Absent | Present |
| Top-bar buttons | Desktop sizes | At least 84 px menus, 44 px steppers, 46 px icons, 64 px Set |
Playing
This page covers what a player does at the console: drawing stops, couplers and tremulants, the organ’s own pistons, the player’s own combinations and sequencer, the crescendo and the swell boxes, the transposer, temperament and pitch, the metronome, the recorder, the score panel, and what Masterpiece remembers between sessions. Each section says how the feature is reached. The window itself is described on A tour of the window.
Drawing stops, couplers and tremulants
A stop, coupler or tremulant is drawn from any of these:
- its drawstop on the console, or its rectangle in a panel or tile in the stop list (see A tour of the window);
- a MIDI message mapped to it, or a computer key assigned to it in its MIDI window (see MIDI and consoles);
- a piston, a general, a divisional, the crescendo or the sequencer.
Drawing goes through the organ’s own wiring: the click moves the knob a player would move, and the stops, couplers and noises that the wiring joins to the knob follow it. A drawstop latches when clicked, whatever the definition marks it: one click draws it and the next pushes it in. This holds for a clickable switch wired to its stop through plain follow linkages; the engine’s own nodes, registration aids that reach several stops, reversible pistons and switches no player can reach keep the setting the definition gives them.
Some organs group switches so that one of them is on at a time, such as a matrix of three swell settings. Drawing one releases the others of its group; pushing one in draws none of the others.
A press dragged across the stops of the console, of a panel or of the stop list moves each stop the pointer passes over the way the first one moved: a drag that started by drawing a stop draws the others, and one that started by pushing a stop in pushes the others in. Each stop is set once, as the pointer enters it.
A key that is down answers to the registration as it changes. Drawing a stop while a key is held makes that rank speak, and pushing it in silences it. A coupler drawn or pushed in while keys are held reaches, or stops reaching, the divisions it couples at once. A coupler reaches every division the coupled keyboard’s keys play through the wiring: a tirasse to a manual whose keys also open a division of reeds, behind an appel d’anches, plays those reeds too while the appel is drawn. A tremulant switch that swaps a stop’s rank for its alternate recording sounds the held notes again on the other rank. With Stop changes leave the notes already held alone ticked in Settings > MIDI…, held notes keep what they started with and only the keys pressed afterwards play the new registration. Off by default.
Sustain pedal: controller 64 holds the notes let go, on the same tab, keeps released keys sounding while a sustain pedal is down, for directing a choir from the bench. Off by default. See MIDI and consoles.
A tremulant shakes the pipes only when the engine runs its detailed path. The Tremulants box on the Loading tab of Organ settings, is on by default, and the Bypass all effects box on the same tab bypasses tremulants together with the wind model, enclosure shading and voicing. Both boxes are shown in the Advanced display mode.
A stop that was left out of the load, and a locked stop of a demo set, are described under Stops that make no sound.
Extra couplers
Window > Couplers opens the Couplers window: the organ’s own couplers, by division, and two boxes for couplers of the program’s own.
Extra couplers adds couplers between the divisions a player can play, at 16’, 8’ and 4’, on any organ: a key on the destination’s keyboard sounds the source division at the key’s note an octave down, at the same note, or an octave up. They do not chain, as a console’s couplers do not. Turning them on or off saves the setting for the organ and loads the organ again with it. It is the same setting as the Extra couplers box on the Loading tab of Organ settings. Off by default; while it is off, nothing is added.
Bass and melody couplers adds those alone: the lowest key held on a manual plays the pedal, and the highest key held plays another manual. They are part of the extra couplers, so the box is ticked and greyed while those are on. Bass up to limits the bass coupler to the keys up to the one chosen, from C2 to C5, so a melody played above it has no pedal; Whole keyboard is the default. Turning them on or off loads the organ again.
The program’s couplers are drawn in a section of their own, Extra couplers
or Bass and melody couplers, in a generated panel, the stop list and the
Couplers window. The player’s generals store them and the general cancel pushes
them in; the organ’s own generals and cancels hold them too. An organ that draws
no couplers of its own shows This organ draws no couplers of its own. The
extra couplers add them. The keys are programcouplers, basscouplers and
bassrange in the organ’s settings file.
Drawing every stop
The program has no button that draws every stop. The command line draws them for
a scripted take: --draw-stops all, described on
Command line. The opposite is the general cancel, which
pushes in every stop, coupler and tremulant of the registration (see
Generals and cancels).
Panic
Panic in the top bar releases every key on every channel, as a console’s cancel does. An organ pipe has no decay, so a note left down by a lost MIDI note-off, or by a coupler changed in mid-chord, sounds until something releases it. Panic then closes and opens again every ticked MIDI input, so a keyboard that stopped sending plays again without a restart; this part is in the standalone program. Organ > All notes off releases every key in the same way and leaves the inputs open as they are.
The organ’s own pistons
An organ declares the pistons its builder put on the console, and the console draws the ones the set draws. They work as follows.
- A piston fires on the press and lets itself out again, as a button does.
- Which combination a piston fires is declared by the organ, either directly or by a type code (101 for General 01, 100 for General cancel).
- The organ’s setter is the switch with assignment code 12. While it is engaged, a press on any piston stores what is drawn into that piston, and recalls nothing. The setter of the organ and the Set button of the Combinations window follow each other: pressing either lights both.
- A capture reads the state that results from the wiring, which is what is seen and heard. A stop pulled by a coupler or by another piston is stored as drawn.
- A combination the organ marks as fixed does not capture. A cancel disengages and never engages; a combination marked so engages and never disengages.
- Stored combinations belong to the player. They are kept in the combination file described under Combination sets, and never in the sample set. A combination that was never captured recalls what the organ declares for it.
- A drawn Set, GC and cancels that are wired to the organ’s real switches work from the drawn picture.
- The General cancel of GrandOrgue organs is the player’s own general cancel.
- Option General Cancel also puts the keyboards back on their own manuals (Settings > MIDI…, off by default): the cancel then also returns every keyboard moved by a manual button to the manual it started on.
- Set turns off after storing (see The Combinations window) applies to the organ’s own pistons too, pressed on the console, in a panel or over MIDI.
The player’s own combinations
Every organ has generals, divisionals, cancels and a sequencer of the player’s own, whatever its file declares. They are the same on every organ, answer the same setter as the organ’s pistons, and are saved per organ in the player’s data.
What a registration holds
A registration holds the drawn state of stops, couplers and tremulants and
nothing else. The blower, noises, action sounds and page switches are left out
of it, so a general cancel never stops the blower. A stop whose name contains
noise or blower, a stop in a division with noise in its name, a stop that
sounds only noise ranks and a stop worked from a switch named blower are left
out. A coupler whose knob also sounds an action noise stays a coupler and is
stored; a blower or a motor stays out.
On an organ with a drawn console, the registration holds what has a drawstop on the console. An organ that draws no console offers every stop, coupler and tremulant. Unison offs (a knob that gates at least half of a division’s key inputs), octave couplers and the extra couplers are stored with the rest.
A divisional covers one division: its stops, the couplers that feed it (counted to the division of the keyboard they are played from), and the tremulant that shakes it. A coupler or tremulant whose division the file does not make clear belongs to the generals only. The Combinations window lists the divisions that hold at least one element, the pedal first and then by manual number.
The Combinations window
Organ > Combinations shows or hides the window; the item is ticked while it is shown. It is a window of its own, resizable in height, with a close button that hides it. The first time an organ opens, the window is closed; after that it opens as the player left it, at the position and size saved with the organ. On the first showing it sits at the bottom right of the main window.
The boxes along the top are read from the program each time the window is shown, so they match the settings in force.
| Control | What it does |
|---|---|
| View box | Combinations and sequencer, Combinations only or Sequencer only: which parts the window shows. Kept for every organ (combinationsview). |
| Pistons stay lit until another is pressed | A piston stays lit until another piston or a cancel is pressed, whatever stops and couplers are moved by hand meanwhile. Off, any hand-drawn change unlights every piston. Off by default; kept for every organ (pistonsstaylit). |
| Always on top | Keeps the window above every other program’s windows. Off, the window stays above the console while Masterpiece is in front. Off by default; kept for every organ. On Linux the stacking is fixed when the window opens. |
| Set turns off after storing | After a piston has stored a combination, Set turns off, so the next press recalls it: the pistons of this window, the organ’s own pistons on the console and in panels, and pistons pressed over MIDI. A sequencer step that stores a frame lets Set go as well. Off by default; kept for every organ. |
| Pistons leave the bass coupler | The generals, divisionals and sequencer steps neither store nor recall the organ’s bass and melody couplers, which stay as the player set them, as on consoles where they belong to the hands. The cancels still push them in. Off by default; kept for every organ. |
| Set | A toggle. While on, a piston stores what is drawn and recalls nothing. It is lit red while capture is on. |
| GC | The general cancel: pushes in every stop, coupler and tremulant of the registration. |
| |<, -10, <, readout, >, +10, >| | The sequencer: first frame, ten frames back, previous, the frame readout, next, ten frames on, last frame that holds anything. |
| Insert, Delete | Insert copies the current frame into a new one after it, and the frames after it move up one. Delete takes the current frame out, and the frames after it move down one. |
| Digits 0 to 9 | Go to the frame, among the ten the current frame belongs to, whose number ends in that digit: from frame 012, 5 goes to frame 015. |
| Sequencer box | Sequencer: frames 000 to 998. Levels, numbered from 1 or Levels, numbered from 0: the stepper walks levels of generals. See Levels of generals. Hidden in the Simple display mode, which always shows levels. |
| Generals with - and + | One button per general, 10 to a row. - and + show one fewer or one more up to 10 generals, then ten fewer or ten more. Hidden in the Simple display mode. |
| Ready-made… | Fills the generals not yet set with PP, P, MF, F, Plein jeu and Tutti, built from the organ’s stop names, each named. After the question Ready-made registrations, Fill stores them; generals already set stay as they are. |
| Divisionals with - and + | One row per division, with one button per divisional and a 0 at the end of the row that cancels the division. - and + show one fewer or one more on every division. |
| Pedal with manual | The Pedal combinations coupler, the French combinaison coupler. While it is lit, each divisional of the manual it names also recalls the Pedal divisional of the same number, Set stores both, and the manual’s 0 cancels the Pedal too. The manual is the division named as the Great (Great, Grand Orgue, Hauptwerk, Hoofdwerk, Huvudverk, Hovedværk, Grand’Organo, Gran Órgano, G.O.), wherever it sits among the manuals, and the first manual on an organ with none of these. Shown when the organ has a Pedal and such a manual with divisionals. Off by default; kept for every organ in the global settings file (pedalcombinationscoupled 1). A right-click maps it to a console button, held or toggling, like Set; the control API sets it too. |
| Crescendo with <, the step, >, Clear step, Ready-made… | The player’s crescendo, on an organ with no crescendo of its own. See The player’s crescendo. |
| Set in use, Save as…, Delete | The combination sets. See Combination sets. |
| Quantity | Default | Range |
|---|---|---|
| Generals | 10 | 1 to 10 in steps of 1, then up to 100 in steps of 10 |
| Divisionals per division | 5 | 1 to 20 |
| Frames of the sequencer | none stored | 000 to 998 |
The counts are saved with the combination set. A piston button is dim when it was never set, lighter when it holds a registration, and amber when it is the one whose registration is drawn now. Any hand-drawn change unlights every piston, unless Pistons stay lit until another is pressed is ticked. A named piston shows its name in place of its number. Recalling a general replaces every lit piston; recalling a divisional lights it and unlights only the general.
Capture
There are two ways to store a registration.
- Turn Set on, then press the piston. Pressing a piston while Set is on stores what is drawn into it. Set stays on until it is turned off again, or turns off after the store when Set turns off after storing is ticked.
- Press the piston, draw the stops, then press Set in the top bar. Set in the top bar is momentary. It stores what is drawn into the piston or the step chosen last, which is the last general, divisional or frame pressed or reached, and the status line reads Stored in <name>. With nothing chosen it reads Choose a piston or a step first; then Set stores what is drawn into it. When capture is on from the console or the Combinations window, Set lights, and a press on it lets capture go (Set is off: pistons recall again).
Names of targets read General 3, Pedal divisional 2 (the division’s name) and
Step 12. A step counts from 1, so frame 011 is Step 12.
Recall
Pressing a general sets every element of the registration to its stored state. Pressing a divisional sets the elements of its division. A registration stored with nothing drawn recalls as a cancel. A piston that was never set does nothing and clears nothing; pressing it chooses it as the target for Set.
Generals and cancels
GC pushes in every element of the registration. Each division’s 0 pushes in the elements of that division. A cancel leaves the blower, noises and page switches alone.
The sequencer and its frames
The sequencer holds 999 frames, numbered 000 to 998, each a registration of the whole console. It is walked with two pistons, previous and next, and is meant for the pistons of a piece: one press, no looking.
- The frame readout in the top bar reads Frame 003 / 012 and the one in the Combinations window Frame 003 of 012. The second number is the last frame that holds anything, or the current frame if that is higher. With no frame stored and none current the readouts read No frames; with stored frames and none current the top bar reads Frame - / 012, the large frame number a dash, and the window - of 012.
- Stepping forward stops at the last frame that holds anything, and stepping back stops at frame 000. It never wraps. The first step forward with no frame current goes to frame 000.
- With Set on, stepping captures what is drawn into the frame it lands on, and may run past the last frame up to frame 998. Keep Set on, walk forwards and set each frame as you go: that is how a sequence for a piece is built.
- |< goes to frame 000, >| to the last frame that holds anything, -10 and +10 move by ten frames and stop at the ends.
- The digits 0 to 9 pick among the ten frames the current one belongs to, by the last figure of the number: from frame 012, 5 goes to frame 015 and 0 to frame 010. Outside capture they stop at the last frame that holds anything. With Set on, the digit goes to its frame and stores what is drawn into it, the digit of the current frame included.
- A click on the readout, in either place, asks for a frame number of up to 3 digits (Go to a frame, A frame number, 000 to 012:). A number past the last frame goes to the last frame, unless Set is on.
- Insert copies the current frame into a new one just after it, and the frames after it move up one; the current frame stays where it is. It does nothing with no frame current, at frame 998, or when frame 998 holds a registration. Delete takes the current frame out and the frames after it move down one.
- A sequence is edited by stepping to a frame, pressing Insert, then stepping on to the copy and setting it with Set and its digit.
- A frame recalled by the sequencer behaves exactly as the same registration pressed by hand.
- The sequencer buttons in the top bar, < and >, step the same sequencer; < is disabled at frame 000 and with no frame current, and > is disabled at the last frame unless Set is on.
Levels of generals
The stepper can walk levels of generals in place of frames, as on consoles with a memory level per bank of pistons. The sequencer box in the Combinations window chooses Levels, numbered from 1 or Levels, numbered from 0; the Simple display mode always uses levels, numbered from 1.
- A level holds a number of generals, set with - and + beside the box (10 a level by default, 1 to 10).
- < and > step through the generals (The general before, The next general); the level buttons move a level (The level before, The next level); the numbered buttons pick a general of the level.
- The readouts read Level 2, general 3.
- Kept for every organ:
stepperlevels,levelsizeandlevelsfromzeroinsettings.mpglobal.
Combination sets
A combination set is a whole registration book: a recital’s, a service’s. An organ has the default set and any number of named sets.
| Control | What it does |
|---|---|
| Set in use | Chooses the set. The set being left is saved first. The default set is listed as (default). The choice is kept for the organ. |
| Save as… | Asks for a name (A name for this registration set:), writes a copy of the live registrations under it and switches to it. |
| Delete | Deletes the set in use and returns to the default set. The default set cannot be deleted. |
A set holds the organ’s own pistons that were captured, the player’s generals, divisionals and frames, and the counts of generals and divisionals. A set that defines fewer pistons than the last one leaves none of the last one behind.
The sets are files in the data folder, combinations/<organ>.mpcomb for the
default set and combinations/<organ>.<name>.mpcomb for a named set. The name
becomes part of the file name; the characters / \ : * ? " < > | and control
characters become _, and trailing dots and spaces are dropped. The file holds
the organ’s own pistons first, then the player’s lines, each starting with
player. Elements are stored as s<stop> and w<switch>, so a file survives
an organ update that adds or reorders stops; an element the organ no longer has
is dropped when the file is read. To copy a set to another computer, copy the
file.
A capture is written within a quarter of a second, and at once when the program closes. Switching a set writes the set being left.
Mapping the pistons to a console
A right-click on Set, GC, a general, a divisional, a 0, or any
sequencer button opens a menu: the current mappings or Not mapped,
Learn (for Set, Learn: while held and Learn: toggle),
MIDI window… and Clear mapping. Press the control on the console after
Learn; a second right-click cancels. The mappings of the sequencer,
generals, setter and the page and tuning buttons are kept for every organ in
midi/console.mpmidi. See MIDI and consoles.
Names for generals and divisionals
The right-click menu of a general or a divisional also has Name… and Empty.
- Name…: a name shown on the piston in place of its number, such as Tutti, Plenum, Cornet or Plein jeu. The number stays in the tooltip, General 3: Tutti. An empty name shows the number again.
- Empty: the piston unused again, its registration and its name gone.
- Names are kept in the combination set with its registrations, so a set made
for a piece keeps its own names. The control API gives a named general as
3 Tutti.
Crescendo and swell boxes
Swell boxes
A swell box is an enclosure. Its shoe is a continuous control with values from 0 to 127. The shoe is worked in these ways:
- the organ’s drawn shoe, dragged on the console;
- a fader of View > Expression pedals, one for each shoe (the item is listed when the organ has a shoe);
- a fader in the Expression section of a panel;
- a pedal or fader mapped to it (right-click the shoe, see MIDI and consoles).
Every shoe starts open, at 127, when an organ loads, and is forgotten at the next load. The effect of the box on the sound is the Enclosures (swell shades) box in the Loading tab of Organ settings, shown in Advanced mode; it is on by default, and the Bypass all effects box bypasses it.
When a pedal does not send the whole of 0 to 127, put the pedal in the closed position, right-click the shoe and choose Closed position: where the pedal is now; do the same for Open position: where the pedal is now. Use the pedal’s whole travel restores 0 to 127.
Crescendo
A crescendo is one continuous control with a row for each step. Each row names the switch that fires that step’s registration. The same mechanism starts the blower and fires enclosure noises, so a shoe that drives switches may do more than one thing.
- Moving the control fires every threshold it sweeps past, in the order it passes them. A drag from nothing to full fires each step in turn and the top one lands last; a drag back fires them in reverse, so the registration that stays is the one that belongs to where the control stopped.
- The steps are alternatives. A new step disengages the previous one, so the shoe can fire it again.
- A step is a threshold crossing, which lets an organ give a switch hysteresis: a blower can start at 120 on the way up and stop at 126 on the way down.
- The crescendo is the organ’s drawn control, or the Crescendo fader in a panel’s Expression section, which is present when the organ has a staged control with at least 3 steps; the control with the most steps is taken. It is mapped to a pedal like a shoe.
- The control that a player moves can differ from the control that carries the steps; Masterpiece follows the organ’s linkages up to the control that nothing feeds and moves that one.
The player’s generals and the sequencer do not hold the crescendo.
The player’s crescendo
An organ with no crescendo of its own, as every GrandOrgue set, gets the player’s: a Crescendo fader in a panel’s Expression section, mapped to a pedal like a shoe, with 32 steps.
- What a step does: it adds its stops to what the hands drew. Going back retires only what the crescendo added; a stop drawn by hand stays.
- A step not set adds what the nearest set step below it adds, so steps 1, 8, 16, 24 and 32 are enough to start.
- Setting a step: move the pedal to the step, or use < and > on the Crescendo row of the Combinations window, draw the stops, and press Set. The row reads Closed, N set with the pedal closed, and the step otherwise, with , empty for a step not set. Clear step empties the step the pedal is on.
- Ready-made… on that row fills all 32 steps from the organ’s stop names, from PP to Tutti, a few stops a step, when no step is set yet.
- Kept with the combination set in use. A GrandOrgue settings file brings its crescendo’s bank A; banks B to D are left out.
- The console display shows the step, as for an organ’s own crescendo.
- The row is shown in the Advanced display mode.
Transposer, temperament and pitch
The tuning button in the top bar shows what is in force, for example Equal A 440.0 +2: the temperament, the pitch of A in Hz, and the transposition when it
is not zero. A click opens the tuning panel next to the button.
Each setting applies to notes played after it changes. A held note keeps the pitch it started with. The three settings are saved with the organ.
Temperament
The Temperament selector lists The organ’s own (followed by the name of
that temperament, or Equal when the organ declares none), the eight
temperaments below, and a loaded Scala file as Scala: <name>. The offsets
are cents against equal temperament, for the pitch classes C to B; the offset
applies to the sounding pitch class, which is the key played plus the
transposition.
| Name | Definition |
|---|---|
| Equal | Every offset is zero. |
| Werckmeister III | Werckmeister, 1691. The fifths C-G, G-D, D-A and B-F# are each narrowed by a quarter Pythagorean comma. |
| Kirnberger III | Kirnberger, 1779. C-G, G-D, D-A and A-E are each narrowed by a quarter syntonic comma. |
| Vallotti | Vallotti, 1754. The six natural fifths F-C-G-D-A-E-B are each narrowed by a sixth of a Pythagorean comma; the other six stay pure. |
| Young II | Young, 1799, second temperament. Vallotti shifted by one fifth, so that C-G through B-F# carry the sixth-comma tempering. |
| Meantone 1/4 comma | Every fifth narrowed by a quarter syntonic comma: pure major thirds and the wolf on G#-Eb. |
| Pythagorean | Pure fifths throughout; the Pythagorean comma lies on G#-Eb. |
| Silbermann 1/6 comma | Every fifth narrowed by a sixth of a syntonic comma. |
| Name | C | C# | D | D# | E | F | F# | G | G# | A | A# | B |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Equal | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| Werckmeister III | 0.000 | -9.775 | -7.820 | -5.865 | -9.775 | -1.955 | -11.730 | -3.910 | -7.820 | -11.730 | -3.910 | -7.820 |
| Kirnberger III | 0.000 | -9.775 | -6.843 | -5.865 | -13.686 | -1.955 | -9.776 | -3.422 | -7.820 | -10.265 | -3.910 | -11.731 |
| Vallotti | 0.000 | -5.865 | -3.910 | -1.955 | -7.820 | 1.955 | -7.820 | -1.955 | -3.910 | -5.865 | 0.000 | -9.775 |
| Young II | 0.000 | -9.775 | -3.910 | -5.865 | -7.820 | -1.955 | -11.730 | -1.955 | -7.820 | -5.865 | -3.910 | -9.775 |
| Meantone 1/4 comma | 0.000 | -23.951 | -6.843 | 10.265 | -13.686 | 3.422 | -20.529 | -3.422 | -27.373 | -10.265 | 6.843 | -17.108 |
| Pythagorean | 0.000 | 13.685 | 3.910 | -5.865 | 7.820 | -1.955 | 11.730 | 1.955 | 15.640 | 5.865 | -3.910 | 9.775 |
| Silbermann 1/6 comma | 0.000 | -11.406 | -3.259 | 4.888 | -6.518 | 1.629 | -9.776 | -1.629 | -13.035 | -4.888 | 3.259 | -8.147 |
Scala file… opens a file dialog for a .scl file. The scale must have
twelve notes after the description and note count, and its last note must be
1200 cents (the octave) to within 0.5 cent. Notes are given in cents (with a
decimal point) or as ratios (3/2, or a whole number). On a note line, text after the first word is a comment. The scale’s first note is applied to C# and the
scale is measured from C. The description line becomes the name. A file that
cannot be used leaves the previous temperament in force, and the panel reports
<file> was not loaded with one of: the file is empty; no note count; a
keyboard temperament has 12 notes; the scale lists fewer than 12 notes; cannot
read the note; the scale does not repeat at the octave; the Scala file is
missing. The dialog opens in the folder last used for Scala files.
A temperament piston on a console steps through The organ’s own and the eight temperaments in this order and wraps round. A loaded Scala file is not a step of the cycle. The MIDI button of the tuning panel learns the console buttons: a submenu each for Temperament -, Temperament +, Transpose -, Transpose + and Temperament: <name>, the temperament now chosen, which a button then brings in. Each submenu has the mapping or Not mapped, Learn, Clear and MIDI window….
Pitch (A)
| Control | What it does |
|---|---|
| Pitch (A) slider | Sets the pitch of A in Hz, from 0.75 to 1.34 times the organ’s own pitch, in steps of 0.1 Hz. A double-click returns to the organ’s own pitch. |
| Organ’s own (440.0) | Returns to the pitch the organ declares; the figure is that pitch. An organ that declares none is taken as 440 Hz. |
| 415, 440, 442 | Set A to that frequency, clamped to the slider’s range. |
A pitch within 0.05 Hz of the organ’s own is stored as “the organ’s own”, so a
later organ with another pitch does not inherit a number. The line under the
buttons reads The organ’s own pitch, or the distance in cents (-31.8 cents from the organ's own).
Transpose
Transpose has - and + buttons, a readout and 0. The range is -12 to +12 semitones; the buttons are disabled at the ends. Transposing moves the keys: +2 plays the pipes two keys up, and the samples keep their pitch. Learn console pistons with Transpose - and Transpose + under the panel’s MIDI button.
The temperament, pitch and transposition are saved per organ and apply again when the organ is next opened.
Unevenness
Two sliders under Unevenness make an organ sound less exact, as pipes and wind do. Both are off by default, saved per organ, and cost nothing while off.
| Control | What it does | Range |
|---|---|---|
| Pipe detune | Puts each pipe up to this many cents off true. A pipe keeps its own amount, sharp or flat, at every note and on every computer, so a chord beats the same way each time it is played. Heard from the next note. | Off to 10 cents |
| Wind sway | Moves the pitch of each division slowly, by up to this many cents, as an organ’s wind does: two slow waves per division, between about one in ten seconds and one in three, so the divisions drift apart. Heard on the notes started while it is on. | Off to 10 cents |
The control API sets them as the program properties pipeDetune and
windSway, in tenths of a cent.
Metronome
The metronome is a click generated inside the audio callback, so it keeps time with what is heard. Window > Metronome opens it in a window of its own.
| Control | What it does | Default | Range or options |
|---|---|---|---|
| Metronome | Switches the click on. | Off | On, off |
| Tempo | Beats per minute. | 90 bpm | 20 to 300 |
| Beats per bar | The first beat of each bar is accented. 0 gives no accent. | 4 | 0 to 12 |
| Level | Loudness of the click. | 0.5 | 0 to 1 |
| Sound | The click. | Electronic beep | Electronic beep, Wood block, Pendulum, with a bell on the first beat |
The window shows the beat as Beat 2. The click comes after the master
fader, so the fader leaves it at its level, and it is absent from an audio
recording. The settings apply at once. The tempo, the beats per bar, the level
and the sound are written to the global settings file as
metronome <bpm> <beats> <level> <sound>, and return at the next start. The
click itself starts silent at each start.
Tuner
Window > Tuner opens the tuner: hold a key, and it shows the note that sounds, its distance in cents from the temperament in force, on a scale from -50 to +50, and the levels of its first eight Harmonics. It reads the organ’s own output, and only while the window shows. With no key held it reads Hold a key to measure its pitch.
Recorder
Window > Recorder shows the Recorder window, a small window of its own that opens at the top right of the main window and leaves the console playable while it records. Its close button hides it.
MIDI recording
| Control | What it does |
|---|---|
| Record | Starts recording and discards the previous take. |
| Play | Plays the take from the start through the organ. Pressed again, it starts over. Disabled with an empty take. |
| Stop | Stops recording and playback. |
| Save MIDI… | Writes the take to a .mid file; asks before overwriting. Disabled with an empty take. |
| Load MIDI… | Reads a .mid or .midi file and replaces the take. The file’s tempo events time the notes; meta events (tempo, names) are not kept in the take. |
| Clear | Discards the take. |
| Save for a sequencer… | Writes the take as a .mid file for a sequencer or a notation program. See A file for other programs. |
| Write the registration as markers | With Save for a sequencer…: each stop or coupler change as a marker named after it. On by default. |
| MIDI… | Record and Play, each with Learn and Clear: a button on the console for each. |
The status reads Nothing recorded, Recording - 12.3 s, 450 events, Playing - 4.1 / 12.3 s or 450 events, 12.3 s.
The recorder takes everything that reaches the engine: notes from the on-screen keyboard, from the drawn manuals and from consoles, and the stop changes, couplers and shoe movements that arrive as MIDI. A recording plays back as the same performance with its registration changes. A drawstop or piston clicked with the mouse sets a switch directly and sends no MIDI message, so it is absent from the take.
Playback drives the same path as live input. When playback ends, or is stopped or restarted with keys still down, they are released in the next block, and keys that the player holds stay held. Playback stops at the end of the take and does not loop.
A saved file has a time base of 960 ticks per quarter note. Each event is stamped at 960 ticks per second of the take, and the first track holds a tempo event of 60 bpm, one quarter note per second. A reader that follows the tempo event, Masterpiece’s own Load MIDI… included, reads the saved take at its recorded length.
Each MIDI device has a track of its own, opening with the device’s name (a Device Name event); the on-screen keys and the host’s MIDI are in a track with no name. Load MIDI… gives each track back to the device of that name, so two consoles that share a channel play their own keyboards again. A track with no name, or the name of a device this computer does not know, plays by the organ’s own channels.
A file for other programs
Save for a sequencer… writes the same take for other programs:
| Part | In the file |
|---|---|
| Format | MIDI file type 1, 960 ticks per quarter note, 120 bpm |
| First track | The tempo, the organ’s name and the markers |
| A track per keyboard | Named after the keyboard, in the organ’s order; the notes played on it |
| Other | Notes that reach no keyboard; present when there are any |
| Pedals | The swell and crescendo pedals as controller 11; present when there are any |
| Markers | A stop or coupler change, named after the stop, with on or off |
| Left out | System exclusive, clock, active sensing, start and stop, the pistons and every other console button |
| Time | From the first event kept, exact to the tick |
Every note-on has its note-off. A key pressed twice is let go before the second press, a note-off for a key not down is left out, and a key still down at the end of the take is let go there. Save MIDI… stays the recorder’s own file and keeps everything Masterpiece plays back.
The take is kept in memory until it is saved or replaced. The folder of the last file dialog is remembered for MIDI files.
Record and Play on the console
A console button learned for Record starts a take, and stops the take being
made. A take that was never saved is kept before a new one begins: a button
cannot answer a question, so it is saved as
Documents/Masterpiece/Recordings/<organ> <yyyy-mm-dd hh-mm-ss>.mid, the status
line names the file and the Recorder window shows it while the new take records.
A button learned for Play plays the take, and stops it. Both are learned in
the Recorder window under MIDI…, and they are the console’s, the same on
every organ.
Each can light a lamp: a MIDI send for recorder-record or recorder-play, lit while the recorder records or plays. The buttons’ own messages are not recorded into a take, and a take played back never presses them.
Everything played
Archive everything played in Settings > MIDI… records all the time, in the background, apart from the Recorder window. Off by default.
| Setting | Choices | Default |
|---|---|---|
| ends after 30 s of silence | 10 s, 30 s, 1 min, 2 min, 5 min, 10 min | 30 s |
| up to 500 MB (the folder’s size) | 100 MB, 250 MB, 500 MB, 1 GB, 2 GB, 5 GB | 500 MB |
| kept 90 days | 7, 30, 90, 365 | 90 days |
A take begins with the first note and ends after the silence chosen. Each take
is a file, Documents/Masterpiece/Recordings/Archive/<yyyy-mm-dd>/<hh-mm-ss> <organ>.mid,
in the same format as Save MIDI…, with a track per device, and opens with
Load MIDI…. A take longer than two hours is saved and the next note begins
a new one. Closing Masterpiece, or switching the setting off, saves the take in
progress.
After each take the oldest files go first until the folder is under its size
and every file is younger than its age. The archive lists the files it writes in
archive-index.txt and deletes only those: a file put in the folder by hand
stays, and the newest take is always kept. Clock and active sensing messages are
left out.
Audio recording
| Control | What it does |
|---|---|
| Record audio | Asks for a .wav file (Record the organ to) and starts recording to it, replacing a file of that name. |
| Stop | Ends the recording and completes the file. |
The recording is a 24-bit WAV at the audio device’s sample rate with one or two channels, as many as the output has. It is taken after the master fader and before the metronome, so the click stays out of the file. It is written on a background thread. The status reads Recording <file> - 12.3 s or Not recording, and Could not open that file for writing when the file cannot be opened. A recording in progress when the program quits is completed. The folder of the last file is remembered.
For scripted recordings with --play-midi and --record-audio, see
Command line.
Score
View > Score opens the score panel: a MusicXML score engraved to the size of the panel and played through the organ, with a cursor that follows the playing. The panel is a Score tab after the console pages and the panels; the tab appears the first time View > Score is chosen. File > Open score… opens a score straight away.
| Control | What it does |
|---|---|
| Open score… | Opens a .musicxml, .xml or .mxl file. |
| <, page readout, > | Turn the pages, or scroll the line in the one-line view. The readout reads the first page shown and the number of pages. |
| -, zoom, + | Make the notation smaller or larger, from 50 % to 250 % in steps of 10 %. The staves fill the panel’s width at every zoom, so a larger zoom breaks the lines again and gives more pages. A click on the figure returns to 100 %. |
| Play, Stop | Plays the score through the organ from the start chosen, and stops it. |
| Tempo box | The tempo in BPM: the score’s own to start with, from its first tempo mark. Type or step another, from a quarter of the score’s tempo to four times it; a double-click returns to the score’s. The tempo marks that follow keep their proportion. |
| Manuals… | One row per staff (Staff 1, with the part’s name when the score gives one): the manual that staff plays, or None, and Mute. |
| Mark… | Adds a mark on the note the cursor marks; see Marks. |
| <, registration name, > | The registration or combination mark before and the next one, set at once. |
| View… | Pages or One line, scrolling with the playing; Two pages side by side; Invert, the page light on dark. With the panel detached, also Keep this window on top. |
| Buttons… | Console buttons for the score; see Keys and console buttons. |
| Detach, Attach | Moves the panel into a window of its own and back. Absent on phones and tablets. |
- A click on a note sets the start there. While the score plays, the click starts it again from that note.
- The pages turn as the playing reaches them. In the one-line view the line scrolls with the playing.
- A box at the top left of the page reads Bar 12: the bar the playing is in, or the start while stopped, numbered as the score numbers it.
- Each staff plays on the channel a click on its manual’s drawn keys uses, so couplers and the drawn keys follow the playing.
- By default a part named Pedal (Pedal, Ped., Pedale, Pédale) plays the Pedal, and so does the last staff of a score with three staves or more. The other staves play the organ’s preferred manual.
- Mute leaves a staff silent, to play it yourself; its notes stay on the page and the cursor goes on.
What the playing follows
- Repeats and endings. Repeat signs, first and second endings, D.C., D.S., Fine and To Coda. The page shows the score as written; the cursor goes back with the playing.
- Ornaments. Trills (from the note above, ending on the main note), mordents and inverted mordents, turns and inverted turns. The neighbouring notes come from the key, or from an accidental over the sign. The ornament’s notes are thirty-seconds of the score’s beat, between 50 and 125 ms.
- A note already sounding where the playing starts is struck at once.
Marks
A right-click on a note, or Mark… for the note the cursor marks, adds a mark. Each mark shows as an icon over its note; a click opens it, and a drag moves it to another note. Undo the last change to the marks, in the same menu, or Ctrl+Z takes a change back.
| Mark | Icon | What it does |
|---|---|---|
| Add a note here | A yellow sticky note | Text of your own. An empty note is removed. |
| Add a registration here (the organ as it is now) | A stop knob: orange when set now, blue when it holds this organ, grey when it holds only other organs | Holds the drawn stops and switches, the volume, the Organ EQ and the swell and crescendo pedals, one line per organ. The box offers Set now, Store (this organ’s state now), Forget organ and Delete, and lists the other organs it is set for. |
| Add a combination here (a general or a sequencer step, for every organ) | A square piston, G or S: orange when set now | Presses a general, or goes to a sequencer step, by number: the same on every organ. The box offers General or Sequencer step, the number, Set now and Delete. |
| Add a jump mark here | A green flag | A named place, Jump 1 and on. The up and down keys go from one to the next. The box offers Go there and Delete. |
| Add a manual change here (each staff on the manual set now) | A keyboard on a teal square | From that note on, each staff plays the manual chosen in its box (From this note on), on each pass of a repeat. The manual is kept by its place on the console, so the change works on another organ too. |
Registrations and combinations are set as the playing reaches their note, and when a page is turned forward (the first one on the new page). Turning back leaves the organ as it is.
Keys and console buttons
With the score panel in front:
| Key | What it does |
|---|---|
| Space | Play and stop |
| Left, Right | A measure back, a measure on |
| Up, Down | The jump mark before, the next jump mark |
| Page Up, Page Down | A page back, a page on |
| Home, End | The first measure, the last measure |
| Ctrl+Z | Undoes the last change to the marks |
Buttons… learns a console button for Play / Stop, A measure back, A measure on, The jump mark before, The next jump mark, Page back and Page forward, each with Learn and Clear. The two page buttons are the score-page buttons of the Console MIDI tab, so the same button turns the panel’s page and a score app’s page.
Kept with the score
The panel writes the marks and the score’s settings into the score’s own file,
a second after each change and when the panel closes: the tempo when changed,
each staff’s manual (by its place on the console) and mute, the one-line view,
two pages, the zoom and Invert. A .mxl file keeps them inside the same
zip. Other score programs show nothing extra. The file as it was before the
first change is kept once beside it as <file>.bak. The file can also hold a
cream paper (paper cream) and blue staff lines (lines blue); the panel has
no control for them yet.
Keep this window on top is the program’s own setting, kept in
score-window.txt in the data folder.
The panel reads Open a MusicXML score (.musicxml, .xml or .mxl). while empty, and No score was found in this file. or The file could not be read. when a file cannot be used.
Remembered between sessions
Masterpiece keeps the player’s data in its data folder, never inside a sample set. The folder and the files in it are described on Files and folders. The files are named from the organ’s own identity, so a set moved to another drive or renamed keeps its settings.
| What | Remembered | Kept in | Written |
|---|---|---|---|
| Stops, couplers and tremulants drawn | Only through Save state (below) | organs/<organ>.mporgan | When Save state is pressed |
| Levels, noise and audio-group balance, and switches such as a blower that starts on load, which the organ marks to be remembered | Yes, each organ’s own marked ones, and only where they differ from the organ’s default | organs/<organ>.mporgan, control and switch lines | One second after the last change, and at once on closing or before another organ loads |
| Swell shoes and the crescendo | No; shoes start open | ||
| Master volume | Yes, per organ | organs/<organ>.mporgan | While the fader is dragged |
| Temperament, pitch, transposition | Yes, per organ | organs/<organ>.mporgan | Within a quarter of a second of the change |
| Combination set in use, window place and state of the Combinations window, page windows | Yes, per organ | organs/<organ>.mporgan | When changed |
| Registrations, counts, frames | Yes, per set | combinations/<organ>[.<set>].mpcomb | When captured |
| Panels | Yes, per organ | organs/<organ>.mppanels | See Panels |
| Show played keys, Always on top, Set turns off after storing | Yes, for every organ | The global settings file | When changed |
| Expression pedals and on-screen keyboard shown | No; both are off at each start | ||
| Metronome tempo, beats per bar and level | Yes, for every organ | The global settings file, metronome line | When the Metronome tab closes |
| Metronome running, recorded take | No; the metronome starts silent |
Save state
Save state in the top bar (the disk icon, between the tuning button and the Panic button) saves the organ’s starting state. It records every latching switch that is not at its default, and the stops drawn, and writes them to the organ’s settings file. The next time the organ loads, it comes up with those stops and switches drawn. Each press replaces the state saved before. The press also writes the organ’s other per-organ settings as they stand, so the loading choices in force are saved with it.
A locked stop of a demo set is pushed in again after the state is applied.
MIDI and consoles
This page covers connecting a keyboard, a pedalboard or a full console to Masterpiece: which MIDI inputs are open, which MIDI channel plays which manual, the window that sets the range, transposition and velocity of one manual, MIDI learn for stops, couplers, pistons and swell shoes, learning a whole console in one pass, console profiles, bringing an organ’s settings over from GrandOrgue, what Masterpiece sends back to a console (lamps, motorised faders, key echo, text displays), and where the mapping is stored. Playing a whole organ from one keyboard is covered on Split keyboard.
How a message reaches the organ
Every MIDI input that Masterpiece opens delivers its messages tagged with the input’s name. A mapping can match a message on four things: the input (Any device or one named device), the channel (any, or 1 to 16), the message type and its number.
- Notes on a channel that a manual claims play that manual. A manual claims a channel through its entries in the manual’s MIDI window. A note on a channel that no manual claims reaches the manual the organ itself assigns to that channel, so a partly mapped console plays every manual.
- Notes, controllers, program changes, RPN, NRPN and system exclusive messages that a control claims operate that control: a stop, coupler, piston, shoe or one of the program’s own buttons. One message can claim several stops, couplers or shoes; see Message types.
- A controller that no control claims does nothing to the organ. A controller moves only what it was learned for. All Notes Off, All Sound Off and the other channel-mode messages (controllers 120 to 127) release the keys of their channel whether or not anything claims them.
- A second Note On for a key that is still held changes nothing: the pipe keeps sounding, and the Note Off that follows releases it.
When several mappings could take the same message, the most specific one wins: device and channel named, then device only, then channel only, then neither.
Messages from a plug-in host, from a MIDI file played back, and from the on-screen keyboard and the clicks on drawn keys carry no input. Only mappings set to Any device match them.
A Universal Real Time master volume message (F0 7F <device> 04 01 <lsb> <msb> F7) sets the master volume with no mapping. A system exclusive message is accepted up to 256 bytes.
MIDI inputs and outputs
MIDI is set in three places:
| Place | Holds |
|---|---|
| Settings > MIDI…, the MIDI tab of the Settings window | What belongs to the player’s console on every organ: the inputs and the outputs, the default channels, the echo and learn options, and the archive of everything played. |
| Settings > Console MIDI…, the Console MIDI tab | The console’s own buttons, the ready lamp, the messages on organ load and unload, and the score page turns. See Settings. |
| Organ > MIDI…, the MIDI tab of Organ settings | What belongs to the organ loaded: the Keyboards rows, the default console, Learn manual buttons… and From GrandOrgue…. |
The three tabs exist in the standalone program; in a plug-in the host owns the MIDI devices. In the Simple display mode (Settings > General…, Display mode) the MIDI tab shows the inputs, the outputs, Send stop changes on the MIDI output, the sustain pedal, the default channels and Bluetooth MIDI…; Advanced shows every row described on this page. The organ’s tab shows the Keyboards rows in both modes. The tabs scroll when the window is shorter than their rows.
MIDI inputs
The MIDI inputs list has one tick box per input: the inputs the system reports (ALSA ports on Linux), then the inputs Masterpiece opens itself (see Inputs that Masterpiece creates). A ticked input plays; an unticked input is closed and its messages are dropped.
| Name | What it does | Default | Options | Takes effect |
|---|---|---|---|---|
| Input tick box | Opens or closes one input. | Ticked for every input. A console plugged in for the first time plays at once. | Ticked, unticked | At once. The unticked inputs are saved by name in settings.mpglobal as midiinputoff lines. |
Masterpiece opens its inputs at start, and looks for new ones every 3 seconds while it runs. A console plugged in or switched on later is opened when it appears, unless it was unticked before, and plays at once; the log records midi: <name> appeared and has been opened. On Android a USB keyboard appears once the player has allowed it.
Panic in the top bar also closes and opens again every ticked input, as unticking and ticking it would, so a keyboard that stopped sending comes back without a restart. The log names each input opened again.
Bluetooth MIDI… on Settings > MIDI…, shown on macOS, iPhone and iPad and Android, opens the system’s pairing window. On Windows and Linux a Bluetooth MIDI device is paired in the system’s own settings. While the pairing window is open, a further press does nothing; once it closes, the next press opens it again.
When another program holds an input
Windows gives a MIDI port to one program at a time, so an input that another program has open cannot be opened by Masterpiece. Masterpiece keeps the input ticked and shows it as <name> - in use by another program; opened when it is free. Ticking such an input opens a message box titled <name> could not be opened. A timer checks every 3 seconds, and the input opens as soon as the other program lets it go; the log then records midi: <name> is free now and has been opened. At startup the same case is logged as midi: <name> could not be opened (another program may be using it); it is tried again every few seconds.
How a console is identified
A mapping refers to an input by name, and by an identifier where the system supplies one that lasts:
| System | Identifier |
|---|---|
| Windows | The device’s interface path, which includes the USB socket |
| macOS | The CoreMIDI persistent id |
| Linux | The USB socket of the card behind the ALSA port |
| Android | None; the system numbers its devices afresh at each start |
Two consoles of one model keep separate mappings. The second is stored as <name>-1 and shown as <name> (USB 1.1.2) with its USB socket, or as <name> #2 where the system gives no socket. A console that moves to another USB socket keeps its mapping when its name is unique.
Inputs that Masterpiece creates
| Input name | Where it exists | What feeds it |
|---|---|---|
Split keyboard | Every system | The split keyboard. It is listed in the device menus of the mapping dialogs and has no tick box. |
JACK MIDI | Linux, when a JACK server is running at startup | The JACK port described below. |
Masterpiece (or the name given) | macOS and Linux, when started with --virtual-midi [name] | A MIDI port that other programs can send to. See Command line. |
On Windows no program can publish a MIDI port. A loopback MIDI driver (loopMIDI, for example) provides one; Masterpiece lists it with the other inputs.
MIDI with JACK on Linux
Masterpiece opens a JACK client named Masterpiece MIDI with one input port, midi_in (full name Masterpiece MIDI:midi_in), for programs that send MIDI only through JACK. The client opens at startup when libjack.so.0 loads and a JACK server is already running. Masterpiece never starts a server. The port appears in the MIDI inputs list as JACK MIDI.
- Messages of up to three bytes pass. System exclusive messages do not arrive through this port.
- The connections made to the port are saved when Masterpiece closes, one JACK source port per line, in
jack-connections.txtin the data folder. At the next start Masterpiece reconnects each source; a source whose program is not running yet is retried every 2 seconds until its port appears. A connection taken away by hand stays away once it has been restored.
MIDI outputs
| Name | What it does | Default | Options | Takes effect |
|---|---|---|---|---|
| MIDI outputs | A tick box per port Masterpiece sends to, beside MIDI inputs (under them in a narrow window): lamp and fader messages, key echo to a sound module, text displays, the ready lamp, the messages on organ load and unload, and score page turns. Ticked ports stay listed while disconnected. Reads None when the system has no output. | None ticked | Every output the system reports | At once; kept as midioutput <name> in settings.mpglobal, a line per port. |
The processor holds the output ports, so lamps, motorised faders, key echo and console displays work with any window open or none. The ports open again at the next start. A port that is not plugged in keeps its name and its tick, and opens when it appears. A send event can go to one port or to Every MIDI output; see Send tab.
Echo, playing and learn options
| Name | What it does | Default | Options | Takes effect |
|---|---|---|---|---|
| Send stop changes on the MIDI output | For a stop, coupler or piston that has no event on its Send tab, sends the stop’s state back on the message that operates it, however the stop moved: from the console, a click on screen, a piston, the crescendo or the control API. A console that echoes the message lights the lamp. A note binding sends note on at the Lit velocity, and note off or the Unlit velocity; a controller binding sends the same values. The channel is the binding’s, or 1 when the binding listens on any channel. | Off | On, off | At once; saved in settings.mpglobal (midifeedback 1, written only while on) and restored at the next start. A console that echoes what it receives can latch itself into a loop, which is why the option is off until it is switched on. |
| Lit, Unlit | The velocity or value sent when a stop comes on (on a pad grid it picks the colour), and what is sent when it goes off: Note Off, or a velocity for a dimmer colour. | 127; Note Off | 1 to 127; Note Off, 0 to 127 | At once; midifeedbackvalues <lit> <unlit> in settings.mpglobal, -1 for Note Off. |
| Send events leave out a console’s own message | For a console that lights its own lamps: a stop moved from the console leaves out the Send event that repeats the same message. | Off | On, off | At once; midisendsholdecho 1. |
| Sustain pedal: controller 64 holds the notes let go | While a sustain pedal (controller 64, on any channel) is down, the keys let go keep sounding until it is lifted: for directing a choir from the bench. A controller 64 learned for something else keeps doing that. | Off | On, off | At once; saved in settings.mpglobal (sustainpedal 1). |
| General Cancel also puts the keyboards back on their own manuals | After manual buttons have moved a keyboard to another manual (see Controls tab), General Cancel restores the keyboards to the assignment the player set by hand. | Off | On, off | At once; saved in settings.mpglobal (cancelresetskeyboards 1). |
| Stop changes leave the notes already held alone | A stop or coupler moved while keys are held leaves those notes as they are; only keys pressed afterwards play the new registration. Off, held notes gain and lose pipes at once, as on a console with electric action. | Off | On, off | At once; saved in settings.mpglobal (stopsleaveheldnotes 1). |
| Debounce: when learning, a key counts once held a quarter second | While learning, a note counts only after it has been held 250 ms; a shorter note is dropped. Controllers, program changes and system exclusive messages have no length and count at once. | Off | On, off | At once; saved in settings.mpglobal (learnnoisefilter 1). Switch it on for a console whose contacts send stray short notes. Leave it off for pistons that send only a brief note. |
Archive everything played and its three boxes are on the same tab; see Everything played.
Default channels
Default channels sets the channel each keyboard comes in on for an organ that has no channels saved for it, and while no organ is loaded. It has six rows: Pedal and Manual 1 to Manual 5, each with a channel box, - (none) or 1 to 16, and a device box, Any device or one device. An organ’s own saved choice keeps it. The boxes and Use as default for all organs on the organ’s MIDI tab (see Default console) edit the same default, kept in settings.mpglobal as consolechannel <role> <channel> [<device>] lines, role 0 for the pedal and 1 to 5 for the manuals.
One MIDI channel per manual
The Keyboards heading of the MIDI tab of Organ settings lists every playable manual of the loaded organ, one row each:
| Control | What it does |
|---|---|
| Manual name | The manual of the row. |
| Summary | What plays the manual, one line per entry: the device, the channel and the keys, as in its MIDI window, or No MIDI device plays it. |
| MIDI window… | Opens the MIDI window of the manual, where the channel, the device, the range and the transposition are set. |
A change takes effect at once and is saved with the organ.
- A manual moved to a channel of its own leaves its default channel, so that channel no longer plays it.
- Manuals may share a channel. A line under the rows lists them (
Shared -- Channel 2: Great, Swell). One keyboard that plays two divisions is a coupler a player can build in this way. - A manual left on its default channel after another manual was put on that channel is named in the same line:
Channel 2 plays Swell; choose Channel 2 for Great to play both.
Channels decide which division sounds, and the couplers work from that. A wrong channel makes a manual sound like another one. With the pointer at rest on a drawn manual, a tooltip names the keyboard, its MIDI device and its channel.
Default console
| Name | What it does | Default | Takes effect |
|---|---|---|---|
| Use as default for all organs | Stores the loaded organ’s channels and devices by role (pedal, first manual, second manual and so on) as the player’s console. An organ with no channels saved starts from them. | No default: each organ starts from its own channels | At once; saved in settings.mpglobal (consolechannel lines) |
| Clear default | Removes the stored console. | At once |
A line beside the buttons reads Default for organs with no channels saved: Pedal 1; Manual 1 2; ... or No default: each organ starts from its own channels.
Under them, Manual buttons with Learn manual buttons… (see Controls tab), then Save mappings, Clear all mappings and From GrandOrgue… (see Bringing an organ over from GrandOrgue).
The dialog for one manual
Right-click a drawn manual on the console, or press MIDI window… in the manual’s row of the MIDI tab of Organ settings. The window is titled <manual> - MIDI and has three tabs: Keys, Controls and Send.
Keys tab
The tab is headed What plays <manual> and lists the entries that feed the manual, one row each, described as Any device ch any keys C2 (36) to C7 (96) with any transposition, no velocity, short octave and debounce appended, or No MIDI device plays it. A manual can have several entries. A keyboard split across two manuals is two entries (one on each manual), and a manual played from two consoles is two entries.
Every edit takes effect at once and is saved with the organ. A new entry listens on every device and every channel until narrowed, so set Console and Channel at once.
| Name | What it does | Default | Range or options |
|---|---|---|---|
| Add | Adds an entry that covers the manual’s own compass, as the organ states it, and the whole of MIDI (notes 0 to 127) when the organ does not state one. | ||
| Remove | Removes the selected entry. | ||
| Learn from a key | Press the lowest key and then the highest key of the range. The first press supplies the device and the channel; the two presses supply the range, in either order; the transposition is set so that the lowest key plays the first note of the manual’s compass. The pressed keys do not sound. The button reads Press the lowest key... and then Now press the highest key.... Learning replaces every other entry of the manual with the one it creates. | ||
| Console | The input the entry listens to. | Any device | Any device and every input known to the mapping |
| Channel | The channel the entry listens to. | Any channel | Any channel, 1 to 16 |
| Keys | The lowest and highest incoming note the entry accepts, shown as a name with the note number, for example C4 (60). | 0 to 127 | 0 to 127 each |
| Transpose | Moves every accepted note before it reaches the manual. A note moved outside 0 to 127 is dropped. Use it to bring the upper part of a keyboard that serves a short manual back into range, or to match a compass that starts somewhere other than the keyboard’s. | 0 | -48 to 48 semitones |
| Velocity | The lowest and highest note velocity the entry accepts. When low is below high, the velocities between them scale to 0 to 127, so a keyboard that tops out at 100 reaches full velocity. When low is above high, the sense reverses: the entry accepts every velocity outside the window, which is how a normally-closed key contact is read. When both are equal, only that velocity is accepted, and it passes unchanged. | 1 to 127 | 0 to 127 each |
| Debounce | Ignores a repeat of the same key within this time. Old contacts chatter and retrigger the pipe. | 0 ms (off) | 0 to 200 ms |
| Ignore velocity (tracker action) | Reports every key as velocity 127 when down. A velocity-switched sample set would pick the wrong layer from a velocity the keyboard never sent. | Off | On, off |
| Short octave | Applies a short-octave layout to the range: the lowest four keys of the range are silent, and the keys at positions 5, 7 and 9 (counting from the low key) sound 4 semitones lower. The transposition is applied afterwards. | Off | On, off |
Controls tab
The tab is headed Controls that bring the <manual> to one of your keyboards. A control added here (a piston, a button, a drawstop or a tab) makes the keyboard on one MIDI channel play this manual. A console with fewer keyboards than the organ has manuals reaches every manual this way.
To add one, press Add a control…, play any key on the keyboard that should play this manual (the prompt reads Play any key on the keyboard that should play the <manual>...), then press the control (Now press the control (keyboard on channel N)...). The list shows each control as Note 36 on channel 1 brings the <manual> to the keyboard on channel 2, or No controls yet.
- Pressing the control lets go of any notes held on that keyboard first, and keys still down sound on the new manual.
- The same control added on several manuals steps the keyboard through them, one press at a time, in the organ’s own manual order. One control can move several keyboards at once when it was learned for several channels.
- The controls are saved with the organ. The assignment they change is kept for the piece; the next load starts from the assignment the player set by hand.
| Name | What it does | Default | Options |
|---|---|---|---|
| Add a control… | Starts the two-step learn. | ||
| Cancel | Appears during the learn and ends it. | ||
| Remove all controls | Removes every control of this manual. | ||
| It is a drawstop or tab: going on and going off both count | For a spare drawstop or tab that sends one message going on and another going off. Each of the two counts as a press. | Off: only the press counts and the release is ignored | On, off |
The tick box is read when Add a control… starts the learn, so set it first. General Cancel also puts the keyboards back on their own manuals (Settings > MIDI…) restores the keyboards on General Cancel.
A control for the manual a keyboard already plays leaves it alone, and one press moves the keyboard on every organ, including those whose console draws its manuals as keyboards of their own.
Learn manual buttons…, under Manual buttons on the organ’s MIDI tab, opens a menu of the manuals; choosing one opens its MIDI window to learn a control there. The lines under it list the controls of every manual.
Send tab
The Send tab of a manual sends every key played on the manual as a note on the MIDI outputs, for a sound module or a second program. One event sends to one channel.
The line at the top reads Sent to <output> or No MIDI output is chosen: choose one in Settings, MIDI. The events are listed on the left: New event adds one, Duplicate copies the chosen one and Delete removes it. The form on the right sets the chosen event.
| Name | What it does | Default | Range |
|---|---|---|---|
| Channel | The channel the notes go out on. | 1 | 1 to 16 |
| Transpose | Moves the notes by this many semitones. A note outside 0 to 127 is not sent. | 0 | -48 to 48 |
| Velocity | The note-on velocity: the played velocity, at least 1, or a fixed one. | as played | as played, 1 to 127 |
| Sends | The bytes middle C sends, and its release. | ||
| Send middle C, Release it | Send them now, to check the module. |
The note off goes out as a note-off message on the same channel.
MIDI learn for stops, couplers, pistons and shoes
Right-click menus
Right-click a drawn stop, coupler, tremulant or piston on the console. The same menu opens on a stop, coupler, tremulant, piston, shoe or slider of a panel, and on a stop in the stop list; there it works the drawstop a player pulls for that stop, also on sets that pair two knobs by name. On a touch screen a long press opens it. The menu’s section header names the object; the next lines list its current mappings, for example Note 36 ch 3 (toggle), what it sends and its computer key, or Not mapped.
| Item | What it does |
|---|---|
| Learn | Arms a learn; the next message from a console is mapped. For a latching switch (a stop or coupler) it learns Toggle. For a switch the organ declares as a momentary button (a piston) it learns While held, and the item reads Learn (while held). |
| Learn on and off (two messages)… | For a tab that sends one message going on and another going off: move the tab on, then off (Move it on…, Now move it off…), and the rows are filled from the two messages. A tick box offers Also light the console’s lamp with the same messages. |
| Learn one message as | Toggle, While held, Draw only, Cancel only (see What a stop does with each message). |
| MIDI window… | Opens the MIDI window: several messages, what the console is sent, a key. |
| Clear mapping | Removes every mapping of the object and saves. |
Right-click a swell shoe, wheel or slider to see MIDI window…, Learn: move a pedal, knob or fader, Closed position: where the pedal is now, Open position: where the pedal is now, Use the pedal’s whole travel and Clear mapping. The two position items set the ends of the pedal’s travel from the pedal’s last position, so move the pedal to the position first. A box reading Move the pedal first appears when Masterpiece has no position yet or both ends would be equal.
Right-click a piston in the Combinations window (generals, divisionals, cancels, Pedal with, the setter and every sequencer button, the digits 0 to 9 among them) to map it: Learn, MIDI window… and Clear mapping. The setter and Pedal with offer Learn: while held and Learn: toggle in place of Learn. A general and a divisional also have Name… and Empty; see Names for generals and divisionals. Right-clicking again while a learn is armed cancels it.
The program’s own buttons have no object on the console to right-click. Their learn buttons are in three places. A click on one opens the same kind of menu: its mappings (or Not mapped), Learn, Clear and MIDI window…. A button is orange while it learns and green once it is mapped, and its tooltip names each message it is mapped to.
| Place | Buttons | What they work |
|---|---|---|
| Console MIDI tab, Console | Learn page -, Learn page + | The previous and next console page |
| Learn console size | The next console layout | |
| Learn panel, Learn keyboard, Learn combinations | The stop-list panel, the on-screen keyboard and the Combinations window, on and off | |
| Console MIDI tab, Power | Learn quit, Learn power off | Quits Masterpiece, or shuts the computer down; see A console with no screen |
| Console MIDI tab, Score app | Learn score page -, Learn score page + | A page back or forward in a score app, sent on the MIDI outputs as the message chosen under Sends (see below), and in the program’s own score panel |
| The tuning panel’s MIDI button | Temperament: <name>, Temperament -, Temperament +, Transpose -, Transpose + | The temperament chosen in the panel, directly; the previous and next temperament; the transposer, one semitone down or up. See Temperament. |
| The Recorder’s MIDI… | Record, Play | A press starts, the next press stops (see Record and Play on the console) |
Each of these learns a button that fires on the press and ignores the release. A console may have several buttons for one action (two + and two - thumb pistons): each further learn adds a button. The sequencer, its digits, the generals and the setter are mapped from the Combinations window.
Score app. Score apps on a tablet or another computer turn pages on a MIDI message they have learned. The Sends row under the score-page buttons sets the message Masterpiece sends: Note (struck and let go), Controller (127, then 0) or Program change, on one channel, with one number for the next page and one for the page before. The default is notes 127 and 126 on channel 16, where no keyboard plays. Connect a MIDI output to the device running the app, then let the app learn each page turn. The control API sends the same turns with the commands scorePageForward and scorePageBack. The message is kept in the global settings as scorepage <kind> <channel> <forward> <back>.
The line at the bottom of the MIDI tabs reads MIDI mappings: N, followed by LEARNING: move a control now while a learn is armed. Save mappings writes the mapping files, and Clear all mappings removes every mapping; both are shown in the Advanced display mode.
Learning the tabs in turn
Organ > Learn MIDI in turn… maps a console’s tabs in one pass. The window lists the organ’s stops, couplers and tremulants in the order of the stop list, with their division and their mapping. Press Start, then press each tab on the console as its name shows (Press the tab for <stop>); the window moves on by itself after each press (N of M. The window moves on after each press.).
| Control | What it does |
|---|---|
| Start | Starts at the first row, or at the row selected; reads Restart here while running. |
| Back, Skip | The row before; the next row, leaving this one as it was. |
| Stop | Ends the run. The status reads N tabs learned. |
| Pistons | The organ’s pistons follow its tabs in the list. |
| Only tabs not mapped | Tabs that already have a MIDI mapping are passed over. |
| Draw and cancel | Each tab learned in two steps: the message that draws it (Draw the tab for <stop>), then the one that cancels it (Cancel the tab for <stop>). |
A tab already learned in this run for another row is refused, That tab is <stop>., and the row asks again, so a tab pressed twice to put it back up does not map the next stop.
Console profiles
A console profile is the player’s console written down once: each tab’s printed name, the keyboard it sits on and the MIDI it sends. Organ > Console profile… opens it.
| Control | What it does |
|---|---|
| Console profile | The profile in use, or None. |
| New…, Rename…, Delete | A new profile, made the one in use; its name; its removal. |
| A row per tab | The tab’s name, its kind (Speaking stop, Coupler, Tremulant or Piston), its keyboard (Any keyboard, Pedal or a manual; for a coupler, the keyboard it couples onto and the one it brings in), its message with Learn, and x to remove it. |
| Add tab | A new row, New tab. |
| Add this organ’s mappings | Each stop, coupler, tremulant and piston mapped on the loaded organ becomes a tab, with its message. |
| Map this organ… | Opens Map from console profile for the loaded organ. |
When an organ opens and a profile is in use, its stops, couplers, tremulants and pistons that have no mapping of their own are matched to the profile’s tabs by name and keyboard. The strong matches are mapped at once, and a window says which: N mapped from the profile: …. The other matches are listed in Organ > Map from console profile…, each Strong, Related or Weak, with a tick box: Tick all and Map ticked map them. The player’s own mappings are never changed. A profile is offered to an organ once, and again after the profile changes.
The profiles are files in the consoles folder of the data folder, one per profile; consoles/active.txt names the one in use.
Message types
| Message | Number | Counts as a press when | Release |
|---|---|---|---|
| Note | 0 to 127; for a shoe also Any note | Velocity 64 or more | Note off, or note on with velocity 63 or less |
| Controller | 0 to 127 | Value 64 or more | Value 63 or less |
| Controller, one value | 0 to 127, with the value for on and the value for off | The On at value, and no other | The Off at value; every other value is for another object |
| Controller, one bit | 0 to 127, with the bit, 0 for the lowest | The switch follows its bit on every message | |
| RPN, NRPN | A parameter number, 0 to 16383 | As a controller, on the data entry value | As a controller |
| Program change | Shown from 1; a shoe or the crescendo also takes Range of programs: the first program closed, the last fully open, one program a step. A program outside the range leaves the shoe where it is. | Every time it arrives | None |
| System exclusive | Identified by all of its bytes; shown as Learned message | Every time it arrives | None |
The press threshold is the middle of the binding’s value window (above 63 for the default window of 0 to 127). A console that sends 64 for a press registers. Each distinct system exclusive message is one button; a console that sends its pistons this way maps each piston by learning it.
Controller, one value lets one controller work many objects, a value each: a console that sends controller 20 with a value per tab, or a notation or sequencer program that sends a value per combination. It is offered for stops and switches, and for the generals, divisionals, cancels and sequencer buttons. Controller, one bit is for a console that reports a group of tabs as one value, bit 0 for the first tab.
One message can work several objects of the same kind:
- Stops, couplers and tremulants. Learning a message for a second stop keeps the first: one tab draws both. Each keeps its own behaviour (Toggle, Draw only, and so on), and Clear mapping on one leaves the others mapped.
- Shoes, faders and levels. One pedal can move several swell boxes; learning the same controller for a second shoe keeps the first.
- Manual buttons. One message steps a keyboard through several manuals.
Learning a message that an object of another kind uses moves it to the new object. A shoe learns only from controllers; a key pressed while a shoe’s learn is armed plays as usual.
What a stop does with each message
The MIDI window’s What it does and the right-click Learn one message as use the same words.
| Label | What happens |
|---|---|
| Toggle | A press flips the switch from its state at that moment. The release is ignored. After a cancel or a click has moved the stop, the next press flips it from its actual state. A piston toggled this way is pressed and released on each press. |
| Press and release toggle | The on value flips the switch, and so does the off value: for a tab that sends one message going down and another coming up, each a change. Offered in the MIDI window. |
| While held | The switch is on while the button is down and off on the release. This is a piston’s behaviour. On a latching stop, a program change or system exclusive message (which have no release) leaves the stop drawn. |
| Draw only | The press draws the switch; the release is ignored. |
| Cancel only | The press cancels the switch; the release is ignored. |
A rocker tab, or a console with separate draw and cancel buttons per stop, is two rows: one Draw only and one Cancel only. Learn on and off (two messages)… fills both at once. Learning Draw only leaves an existing Cancel only alone, and the reverse, so both can be taught in turn. Any other learn replaces what the object had. The mapping lines at the top of the right-click menu end in the same word: Note 36 ch 1 (toggle), CC 20 (while held).
A new row in the MIDI window starts as Toggle for a latching switch and While held for a momentary one. Pistons and program buttons other than switches start as Fires when pressed. Learning is saved within a moment of the message arriving.
Shoes, wheels and sliders
A shoe is operated by a controller value, or by the velocity of a note (a sequencer can write the swell into the velocities of the notes it plays; the note-off does nothing). The binding maps the incoming range onto the control’s whole travel.
| Name | What it does | Default | Range |
|---|---|---|---|
| Closed at | The incoming value at which the shoe is closed. | 0 | 0 to 127 |
| Open at | The incoming value at which the shoe is open. | 127 | 0 to 127 |
| Invert | Reverses the sense, for a pedal wired backwards. | Off | On, off |
A console’s shoe seldom sends the whole 0 to 127, so set the two ends to the values the pedal actually sends. Values outside the window clamp to its ends. Only the span matters; the order in which the two values are entered has no effect, and Invert reverses the sense. Closed position: where the pedal is now and Open position: where the pedal is now in the right-click menu fill in the values from the pedal’s last position and set Invert when the closed end is the larger value. A program change or system exclusive message arrives with the value 127 and drives the shoe fully open.
The MIDI window for one object
MIDI window… opens a window titled <object> - MIDI with the tabs Receive, Send and Shortcut. Every edit takes effect at once and is saved with the organ; the program’s own buttons are saved in the console file (see The MIDI map files).
Receive tab
One row per message that operates the object. New event adds a row and starts listening at once. A row whose message is not set yet is skipped.
| Column | What it does | Default | Options |
|---|---|---|---|
| Device | The input the message must come from. | Any console | Any console and every input known to the mapping |
| Channel | The channel of the message. | Any | Any, 1 to 16 |
| Event | The message type. Shows Listen… until a message is set. Controller, one value is offered for stops and switches, and for the generals, divisionals, cancels and sequencer buttons; Controller, one bit for stops and switches. See Message types. | Note, Controller, Controller, one value, Controller, one bit, Program change, System exclusive, RPN, NRPN | |
| Number | The note (shown as a name with its number), controller number (0 to 127), program number (1 to 128) or parameter number. For System exclusive it shows Learned message, which only Listen can set. For a shoe with Note it offers Any note, which takes the velocity of every note on the channel, and with Program change a Range of programs. | ||
| On at, Off at | Controller, one value: the value your console sends for on, and for off. | 0 to 127 | |
| What it does | The behaviour (see the table above). For a stop, coupler, tremulant or switch: Toggle, Press and release toggle, While held, Draw only, Cancel only. For the program’s pistons and cancels: Fires when pressed. For the setter: Fires when pressed and Toggle. | Follows the switch, see above | |
| Debounce ms | A press within this time of the last one this row took is contact chatter, and is dropped. A release is never dropped. | 0 (off) | |
| Closed at, Open at, Invert | Shoes only; see above. These replace What it does. | ||
| Listen | Takes the next press from a console and fills the row with it. The button reads Listening… until a message arrives; press it again to cancel. The press is taken, not acted on, and its release is swallowed. | ||
| X | Removes the row. |
Add a row for every message that operates the object. A message that another stop, coupler or shoe already uses works both; one used by an object of another kind moves here, and the row says Moved here from <object>, which no longer answers it.
Send tab
The messages Masterpiece sends to the MIDI outputs when the object changes, one event each. The line at the top reads Sent to <output> or No MIDI output is chosen: choose one in Settings, MIDI.
The tab is there for every object with a state a console can show: stops, couplers, tremulants, shoes, the player’s generals and divisionals, Set, Pedal with manual and the recorder’s buttons. For a stop, coupler or piston, the message goes out whenever the object comes on or goes off, however it moved: the console, a piston, the crescendo, a click or the control API. For a lamp in a drawstop or an LED by a piston. A general or divisional is on while it is the piston last pressed. For a shoe, the message goes out whenever the shoe moves. When the list changes, and each time an organ has loaded, Masterpiece sends the present state of every lamp, so the console’s lamps match the drawn stops. A piston with no event of its own lights as the message it is learned on: note on at velocity 127, or controller 127, and 0 when it goes out.
The events are listed on the left: New event adds one, Duplicate copies the chosen one (the same state to a second lamp or device) and Delete removes it. A new event starts from the object’s first receive row (type, number and channel), because a lamp usually answers on the message that operates the stop; a shoe’s starts as a controller. The form on the right sets the chosen event, and shows only the fields its type uses.
| Field | What it does | Default | Options |
|---|---|---|---|
| Device | The MIDI output this event goes to: one console, or every MIDI output. | Every MIDI output | Every MIDI output and each output port |
| Event | The message type. | The type of the receive row, else Note | Note, Note, off as a Note Off (8n), Controller, Program change, RPN (registered parameter), NRPN (non-registered parameter), Hex messages, SysEx or any other; for a stop or a shoe also Display, 32 characters and Display, 16 characters |
| Channel | The channel it goes out on. | The receive row’s channel, else 1 | 1 to 16 |
| Note, Controller, Parameter | The note, controller or parameter number. | The receive row’s number, else 0 | 0 to 127; a parameter 0 to 16383 |
| When on (stop, piston) | The velocity (note) or value (controller, parameter) sent when it comes on. On a pad grid, the velocity is the colour. | 127 | 0 to 127 |
| When off (stop, piston) | The velocity or value sent when it goes off. Note on at velocity 0 is the usual lamp off. | 0 | none, 0 to 127 |
| Program when on, When off (program change) | The program sent when it comes on, and the one sent when it goes off. | 1 and none | 1 to 128; none |
| Closed, Open (shoe) | The values sent at the two ends of the shoe’s travel. A shoe is sent across them, so a fader that wants 0 to 100 gets 0 to 100. | 0 and 127 | 0 to 127 |
| When on, When off (hex) | Whole MIDI messages in hex, one or several separated by commas: F0 7D 01 F7, B0 14 7F. A message that does not read is outlined in red, and the one before it is kept. | Empty: nothing | Any messages |
| Sends | The bytes the event sends in each state, as they will go out. | ||
| Copy the received event | Takes the type, channel and number of the object’s first receive row. | ||
| Send on, Send off (Send open, Send closed for a shoe) | Send the bytes now, to check a lamp’s colour or a fader. |
With none in When off, nothing goes out when the stop goes off. Note, off as a Note Off (8n) sends the off state as a note-off message at the When off velocity, for a console whose lamps go out only on a note off. An RPN or NRPN event sends three controllers: the parameter number on 101 and 100 (RPN) or 99 and 98 (NRPN), then the value on data entry, controller 6. For a shoe, Program change sends the scaled value as the program number. Hex messages go out again after each load, so a controller’s mode message (a pad grid’s programmer layout) reaches it every time. The display events send the object’s name, or a control’s value, to a console’s text display, in the format GrandOrgue uses for its displays.
Shortcut tab
A key of the computer keyboard that operates the object.
Click the key button (it reads None or the current key), then press the key, with Ctrl, Alt or Shift if wanted. The button reads Press a key… while it waits; Escape leaves the setting as it was. Clear removes the key. The key works while the console window is in front. One key can operate several objects at once. Saved with the organ.
| Name | What it does | Default | Range |
|---|---|---|---|
| Draws or cancels it (stops) | Flips a latching switch; fires a piston as one click would. | None | Any key |
| Opens it (shoes) | Moves the shoe up by the step. | None | Any key |
| Closes it (shoes) | Moves the shoe down by the step. | None | Any key |
| Each press moves it by (shoes) | The size of one step on the 0 to 127 travel. | 8 | 1 to 64 |
A stored key operates organ switches (stops, couplers, tremulants and the organ’s own pistons) and shoes, and the player’s generals, divisionals, cancels, setter and sequencer buttons, as their MIDI message does: a console whose pistons are wired to a computer-keyboard encoder plays them this way.
Sending to a console
These send to the MIDI outputs: the events of the Send tabs (lamps, faders, key echo), the echo option of the MIDI tab, the text displays, the ready lamp, the messages on organ load and unload, and the score page turns. All of them need a port ticked under MIDI outputs.
Console displays
Many consoles have text displays on the jamb that a system exclusive message drives. The Console display tab of the settings window (Settings > Console display…) describes one display and what it shows.
Each message is F0 <prefix> <display number> <line number> <text> F7: the prefix bytes, one byte for the display, one byte for the line (counting from 0), and the line’s text as ASCII padded with spaces to the line width. The prefix, display number and line width belong to the console hardware, so the tab asks for them.
| Name | What it does | Default | Range or options |
|---|---|---|---|
| Drive a console display | Switches the display on. | Off | On, off |
| Display number | The display’s number on the console, sent as one byte. | 0 | 0 to 15 |
| Characters per line | The line width. Longer text is cut, and shorter text is padded so it overwrites the previous tail. | 32 | 16, 20, 32, 40 |
| Sys-ex prefix (hex) | The bytes after F0, in hexadecimal, separated by spaces. | 7D | 1 to 8 bytes, each 00 to 7F. An invalid entry falls back to 7D. |
| Lines | Four boxes, one per line, choosing what the line shows. | Organ, Temperament, Pitch, Crescendo | (blank), Organ, Temperament, Pitch (A=440.0 Hz), Transpose (+2, 0, -3), Stops drawn (a count), Crescendo (the step; 0 when the shoe is closed), Combination set |
| Send to display | Sends all four lines again, changed or not. Use it after connecting a console during a session. | ||
| What the display reads | A preview of the four lines, with bars at the line width so a cut is visible. |
7D is the manufacturer id that the MIDI specification reserves for non-commercial use; it is the default because a console’s own prefix is not known. Only lines whose text changed are sent, checked four times a second. Letters with accents are written with the accent removed (ä as ae, ß as ss, Kraków as Krakow), because system exclusive carries seven bits per byte and a byte above 7F would end the message. Characters with no Latin equivalent become ?.
Changes in this tab take effect at once. The setup is kept in settings.mpglobal as lcd <on> <display> <width> <line1> <line2> <line3> <line4> <prefix> and is read again at the next start. The main window sends the display four times a second whether or not the tab is open, so the display follows the organ with any window open or none; a port must be ticked under MIDI outputs. The Transpose line shows the transposition as +2, 0 or -3, and the Combination set line shows the name of the combination set in use ((default) for the default set).
A console with no screen
The Console MIDI tab of the Settings window has these rows for a console that is turned on and played without a monitor.
- Ready lamp: Off, Note or Controller, a channel and a number, sent to the ports ticked under MIDI outputs. The lamp is lit (note on at velocity 127, or the controller at 127) once an organ is loaded and playable, blinks once a second while an organ loads, blinks four times a second while a quit or power-off button is held, and is dark with no organ (note off, or the controller at 0). Kept in
settings.mpglobalasreadylamp <note|cc> <channel> <number>. - Lit: hex messages and Dark: hex messages, beside the ready lamp: further MIDI messages in hexadecimal, sent as the lamp lights and as it goes dark, several separated by commas (
90 3C 7F, B0 14 7F). Kept asreadylamplitandreadylampdarklines. - Learn quit and Learn power off, under Power: buttons that save and quit Masterpiece, or save, quit and shut the computer down. So that a noisy input learned for one cannot turn a console off at every start, a button is obeyed only once Masterpiece has run two minutes, and only when it is held three seconds; letting go sooner does nothing. A button whose message has no release (a program change or a system exclusive message) is pressed twice within two seconds. A press before the two minutes is written to the log with the time left. The power-off button also needs Allow quitting Masterpiece and shutting the computer down on the Remote control tab, as the control API’s power-off does; without it the hold is written to the log and nothing happens. Quitting needs no permission.
- A button for one temperament: Temperament: <name> under the MIDI button of the tuning panel.
Messages on organ load and unload
| Name | What it sends | Kept as |
|---|---|---|
| On organ load | MIDI messages in hexadecimal, sent each time an organ loads, in the new organ’s first audio block, before any stop moves or lamp lights: for a controller that needs a mode set first, such as a pad grid’s programmer layout. | loadmessage in settings.mpglobal |
| On organ unload | MIDI messages in hexadecimal, sent when an organ unloads: before the next organ loads, and when the program quits. For a relay that turns the speakers off. | unloadmessage in settings.mpglobal |
Several messages are separated by commas (F0 ... F7, B0 07 7F); empty sends nothing. A message takes effect when Enter is pressed or the box loses focus. A text that does not read as whole MIDI messages is outlined in red and the messages before it are kept. Send now beside each box sends its messages at once, to try them.
Bringing an organ over from GrandOrgue
From GrandOrgue… on the MIDI tab of Organ settings reads GrandOrgue’s settings file for the organ that is loaded and brings over what Masterpiece can use. The organ must be loaded from its GrandOrgue .organ file. GrandOrgue keeps the settings file in its Data folder as <hash>-0.cmb, compressed or plain; Masterpiece reads both.
The import replaces what it brings: the MIDI mappings of the objects the file names, the pistons it holds, and the voicing of each rank it holds. Everything else stays as it was. A window titled From GrandOrgue then lists what came over and what was left out, one line each.
| From GrandOrgue | In Masterpiece |
|---|---|
| Each object’s MIDI events, its lamps and display messages, its computer keys | The object’s MIDI window, and the Console MIDI tab for the ready lamp |
| The organ’s generals and divisionals, as the player set them | The organ’s own pistons |
| The setter’s generals 1 to 100 (banks A and B) | The player’s generals 1 to 100 |
| The setter’s sequencer frames 1 to 999 | The sequencer’s steps 1 to 999 |
| The setter’s divisionals 1 to 20 of each manual (banks A and B) | The player’s divisionals 1 to 20 of that manual’s division |
| The crescendo’s bank A, steps 1 to 32 | The steps of the player’s crescendo |
| Amplitude and UserGain, at the organ, windchest group, rank and pipe | Level on the Voicing tab, for the rank and the pipe |
| ManualTuning and AutoTuningCorrection | Tuning |
| ToneBalance | Brightness for a negative value, Bass for a positive one |
| AudioGroup | The rank’s route, to the output of the same name |
| The organ’s volume | The master volume, as a change from GrandOrgue’s default of -15 dB |
| The temperament | The temperament of the same name |
| Each swell’s position, each drawstop’s state | The swell, and the drawstop, as GrandOrgue left them |
| The metronome’s tempo and bar | The metronome’s Tempo and Beats per bar |
Levels and tuning add up over the four levels, as in GrandOrgue: the organ’s and the windchest group’s change goes to every rank on them. A value beyond Masterpiece’s range (a level from -24 to +12 dB, tuning of 50 cents either way, a shelf of 12 dB) is taken to the edge of the range, and the window counts them.
ToneBalance is a one-pole filter in GrandOrgue, a low-pass for a negative value and a high-pass for a positive one. Masterpiece takes it as the cut that filter gives at 6 kHz (Brightness) or at 100 Hz (Bass).
A player’s piston in Masterpiece holds every element: what a GrandOrgue registration does not name is stored as retired. The organ’s own pistons keep GrandOrgue’s way, and move only what the registration names.
Left out, and counted in the window:
- the setter’s generals past 100, divisionals past 20 and frames past 999;
- the crescendo’s banks B to D;
- divisional couplers, and registration entries that name nothing in this organ;
- each pipe’s Delay and ReleaseTail;
- a temperament Masterpiece does not have.
Not read: the sample loading options (bits per sample, channels, loops, compression, attack and release loading), window places and sizes, and the setter’s own buttons (Regular, Scope, Insert, Delete, the banks).
The MIDI map files
A mapping is stored in the player’s data folder, never inside a sample set:
| System | Data folder |
|---|---|
| Windows | %APPDATA%\Masterpiece |
| macOS | ~/Library/Masterpiece |
| Linux | ~/.config/Masterpiece |
Two files in the midi folder of the data folder hold it:
| File | Holds |
|---|---|
midi/<organ>.mpmidi | What belongs to this organ: the mappings of its stops, couplers, tremulants and shoes, the entries of its manuals, the manual buttons, the divisionals, and the sends and shortcuts of those objects. |
midi/console.mpmidi | What belongs to the player’s console on every organ: the sequencer and its digits, the generals and general cancel, the setter, Pedal with, the page, layout, panel, keyboard, combinations, transpose and temperament buttons, the voicing EQ preset buttons, the recorder’s Record and Play, quit and power off, the score page turns and the level faders, and their sends and shortcuts. |
<organ> is the organ’s name followed by its unique organ id, for example Nancy-12345. An organ that declares no id uses its name and a hash of its path. Renaming or moving the sample set keeps the file.
Every change in a MIDI dialog is saved at once, and a learn is saved within a moment of the message arriving. Save mappings on the MIDI tab writes both files. Clear all mappings removes every binding, send and shortcut from memory and keeps the manual entries; the files change at the next save. Both buttons are shown in the Advanced display mode.
When an organ loads, its .mpmidi file is read, then console.mpmidi. An organ with no file starts from the default console and the organ’s own channels. A mapping carries over to another organ or computer by copying the file to the midi folder under the other organ’s file name; devices travel by name.
When an organ loads, Masterpiece repairs a file that names a manual the organ lacks, or lists an identical manual entry twice. It logs midi: repaired the saved mapping and keeps the original beside the new file as <organ>.mpmidi.before-repair.
The files are plain text, one record per line, with # for comments. A binding line has these fields:
<kind> <channel> <number> <target> <id> <latching> <invert> <trigger> <closed> <open> <device> [<identifier>]
| Field | Values |
|---|---|
kind | note, cc, pgm, sysex, rpn, nrpn |
channel | 0 for any, else 1 to 16 |
trigger | toggle, toggle-both (press and release toggle), momentary (while held), on (draw only), off (cancel only) |
device | any, or the input’s name with each space written as _ |
Other lines start with manual (a manual entry: manual id, channel, low key, high key, transpose, low velocity, high velocity, ignore velocity, short octave, debounce, device), send (target, id, kind, channel, number, low, high, then the hex messages of a system exclusive row or the off program of a program change row) or shortcut (target, id, step, key). Edit through the dialogs; a line that cannot be read is skipped and the rest loads.
Split keyboard
The split keyboard plays a whole organ from one keyboard. It divides the keyboard into up to four zones, sends each zone to a manual or the pedal, transposes each zone, can take a pedal bass from the lowest key the left hand holds and a solo melody from the highest key the right hand holds, and can move the dividing point to follow the hands. This page covers the window, every field in it, the presets, the MIDI controls that switch the split and its presets, and the files that hold the settings.
Open the window with Window > Split keyboard. The window can stay open or be closed; closing it hides it and the split carries on.
How it works
The split sits between the MIDI inputs and the organ. It reads the notes of one keyboard (the Keyboard box) and sends them on as notes of its own MIDI input, Split keyboard, with one channel per role:
| Role | Channel on the Split keyboard input |
|---|---|
| Lower | 11 |
| Upper | 12 |
| Solo | 13 |
| Pedal | 14 |
The MIDI map sends each of those channels to a manual, as it does for any console. The Manuals on this organ rows of the window set the manual of each role. The split knows nothing about the organ beyond that; a role can be sent to any manual, including the pedal.
The split takes the notes of the chosen keyboard only. These pass through unsplit:
- Controllers, program changes and other messages from the keyboard (a sustain pedal, an expression pedal mapped to a shoe).
- Notes and messages from any other input.
- Messages from a plug-in host, from a MIDI file played back and from the on-screen keyboard.
- Notes on the
Split keyboardinput itself.
All Notes Off and All Sound Off (controllers 123 and 120) from the keyboard release everything the split sounds and then pass on. The Panic button of the main window releases it too.
Switching it on and off
| Way | Effect |
|---|---|
| Split keyboard on tick box | Switches the split on or off. |
| A learned On and off control | Toggles the split from a key, button or pedal. It works while the split is off. See MIDI controls. |
The setting is the same for every organ and is saved at once in split-keyboard.txt (on 1), so the split comes back as it was left. Default: off. With the split off, the keyboard plays as the MIDI map says. A key pressed before the split came on is released the way it was pressed. Switching the split off releases every note it sounds.
The first time the split is on for an organ, each role that has no mapping receives one:
| Role | Manual proposed |
|---|---|
| Lower | The organ’s first manual |
| Upper | The second manual; the first when the organ has only one |
| Solo | The third manual; the last manual when the organ has fewer than three |
| Pedal | The organ’s pedal keyboard, found by its assignment code or a name that contains “pedal”; no mapping when the organ has none |
Manuals are taken in the organ’s own order, from the keyboards its key flow plays: the same manuals the Keyboards rows of Organ > MIDI… list. An organ whose definition gives no key count for its manuals (the Nancy demo, for one) lists them too. The proposal is saved with the organ and can be changed in the Manuals on this organ rows.
Window fields
Every change takes effect at once and is saved. The window’s rows follow the panel from top to bottom.
Keyboard and on/off
| Name | What it does | Default | Options |
|---|---|---|---|
| Split keyboard on | Switches the split on. | Off | On, off |
| Keyboard | The input whose notes are split. | Any input | Any input (every input except the split’s own) and every input the mapping knows. Saved by name in split-keyboard.txt (source). Changing it while the split is on releases what the old keyboard holds. |
Choose a named input when more than one keyboard is connected and only one should be split.
Presets
Nine slots shared by every organ. Slots 1 to 3 are factory layouts and cannot be changed. Slots 4 to 9 are the player’s own and start empty.
| Slot | Name | Layout |
|---|---|---|
| 1 | Two manuals and pedal | Two split points, at F3 and C5. Below F3: pedal. F3 to B4: lower manual. C5 and above: upper manual, one octave down. Written for a 61-note keyboard that starts at C2. |
| 2 | Two manuals and bass | One split point at C4. Lower manual below, upper manual above. The lowest key held up to B3 also plays the pedal. |
| 3 | Two manuals | One split point at C4. Lower manual below, upper manual above. |
An organ with no saved layout starts from preset 2.
| Name | What it does |
|---|---|
| Buttons 1 to 9 | Recall the preset: its layout is copied into the organ’s layout. A button is dimmed when its slot is empty, and highlighted when the layout is the preset last recalled and unchanged. The tooltip shows the preset’s name. |
| Save as… | Opens a dialog titled Save as a preset: Name (default My layout) and Slot (4 to 9, with the name of any preset already there). The first free slot is offered, otherwise the preset recalled, otherwise slot 4. Save replaces the preset in the slot with the organ’s current layout and marks it as the preset in use. Cancel leaves everything as it was. |
| Delete | Empties the slot of the preset in use. Enabled only when that preset is in slot 4 to 9. |
A preset holds the layout: split points, zones, Transpose all, the follow option, the bass and the melody settings. It leaves out the on/off state, the keyboard, the manual assignments and the MIDI controls. Recalling a preset copies it, so a later edit of the organ’s layout leaves the preset as saved, and the preset highlight goes out. The presets are saved in split-keyboard.txt.
The keyboard picture
The picture shows 88 keys, A0 to C8, whatever the real keyboard has. Each zone has a colour: blue, green, amber and purple for zones 1 to 4, grey for a zone that plays nothing. The role of each zone is written above it. A white handle with a round head marks each split point.
- Drag a handle to move a split point. A handle stops before the neighbouring split point.
- While the split is on, the keys that are held light in the colour of the zone they went to.
- With bass from the hands on, an amber line under the keys marks the bass range, and a black dot on a key marks the note the pedal is sounding.
- With melody from the hands on, a blue line under the keys marks the melody range, and a black dot on a key marks the note the solo is sounding.
- While the split is on, the first handle shows where the split point is at the moment, which differs from the set point when the first split follows the hands.
Zones
| Name | What it does | Default | Range or options |
|---|---|---|---|
| Split points | The number of dividing points. N points make N + 1 zones; 0 points make one zone. Zone rows appear for the zones in use. | 1 (preset 2) | 0, 1, 2, 3 |
| Split point sliders | The first key of the next zone, shown as a note name (C4 is note 60). One slider per point. A point cannot pass its neighbour. | C4 (60) for the first | Notes 1 to 127 (C#-1 to G9) |
| Press a key | Sets the split point from the next key pressed on the keyboard. The button reads Press a key now… while it waits; press it again to cancel. The split has to be on. A key that falls outside the neighbouring points is ignored. | ||
| Transpose all | Moves every zone and the bass. | 0 | -12 to 12 semitones |
| The first split follows the hands | See Following the hands. Dimmed with 0 split points. | Off | On, off |
Each zone has a row, headed Zone N: <lowest note> to <highest note>, with these fields:
| Name | What it does | Default | Range or options |
|---|---|---|---|
| Plays | The role the zone sends its keys to. | Lower for zone 1 and Upper for zone 2 (preset 2); Nothing for further zones | Nothing, Lower, Upper, Solo, Pedal |
| And also | A second role played by the same keys, to sound one key on two manuals. The same role as Plays is ignored. | Nothing | Nothing, Lower, Upper, Solo, Pedal |
| Octaves | Moves the zone by octaves. | 0 | -3 to 3 |
| Semitones | Moves the zone by semitones. | 0 | -12 to 12 |
The note sent is the key pressed plus Semitones, plus 12 times Octaves, plus Transpose all. A note outside 0 to 127 is dropped. A key keeps the zone it was pressed in until it is released, so the release goes where the press went. When two keys send the same note to one role (zones moved onto each other by octaves), one note-on goes out and the note ends with the last key.
A zone whose role is Nothing and whose second role is Nothing plays nothing: the keys are silent.
Following the hands
With The first split follows the hands on, the split point between zone 1 and zone 2 moves to the gap between the hands. Masterpiece looks for the widest gap of more than an octave between two keys held next to each other; the split point moves to the middle of that gap, and never above the second split point minus 1. With keys in one hand only, the split point stays where it is. The moved point stays for 3 seconds after the last key is released and then returns to the set point. A key already down keeps its zone when the point moves; a key pressed in the gap goes to the zone the moved point gives it. Changing the layout puts the point back. Only the first split point follows.
Bass from the hands
The lowest key held in the bass range plays the pedal as well, one pedal note at a time. The pedal note is the key plus Transpose all; the octave and semitone fields of zones do not apply to it. The note goes to the Pedal role (channel 14).
| Name | What it does | Default | Range or options |
|---|---|---|---|
| The lowest key held plays the pedal | Switches the bass on. | Off (on in preset 2) | On, off |
| From the bottom up to | The bass range runs from note 0 up to this key. | B3 (59) | 0 to 127, shown as a note name |
| The bass key also plays its manual | On: the bass key sounds on its manual and the pedal. Off: the bass key sounds on the pedal only. When the bass key is no longer the lowest and is still held, it plays its manual from then on. | On | On, off |
| After the hand lifts | What the pedal note does when no key in the range is held. | The pedal note ends | The pedal note ends; It holds until the next bass note; It holds for a time |
| Time box (ms) | The hold time for It holds for a time. Enabled with that choice only. | 1500 ms | 50 to 10000 ms in steps of 50 |
When the lowest key changes, the previous pedal note ends and the new one starts. When the lowest key is released while another key in the range is held, the pedal passes to the lowest key still held and is struck again. A bass held after the hand lifts ends with the next bass note.
The four bass fields are dimmed while the bass is off.
Melody from the hands
The highest key held in the melody range plays the solo as well, one solo note at a time: the top note of a chord carries the melody on a manual of its own. The solo note is the key plus Transpose all; the octave and semitone fields of zones do not apply to it. The note goes to the Solo role (channel 13).
| Name | What it does | Default | Range or options |
|---|---|---|---|
| The highest key held plays the solo | Switches the melody on. | Off | On, off |
| From this key to the top | The melody range runs from this key up to note 127. With the bass on too, the range starts above the bass range. | C4 (60) | 0 to 127, shown as a note name |
| The melody key also plays its manual | On: the melody key sounds on its manual and the solo. Off: the melody key sounds on the solo only. When the melody key is no longer the highest and is still held, it plays its manual from then on. | On | On, off |
When the highest key changes, the previous solo note ends and the new one starts. When the highest key is released while another key in the range is held, the solo passes to the highest key still held and is struck again. The solo note ends when no key in the range is held.
The two melody fields are dimmed while the melody is off.
Manuals on this organ
| Name | What it does | Default | Options |
|---|---|---|---|
| Lower, Upper, Solo, Pedal | The manual of this organ that each role plays. | The proposal described under Switching it on and off | Nothing and every manual the organ’s key flow plays |
The lists fill again each time an organ loads, so they always name the manuals of the organ loaded now. The choice is a mapping of the Split keyboard input and channel to the manual. It is saved in the organ’s MIDI map (see The MIDI map files) and also appears in the Keys tab of the manual’s dialog, with Console set to Split keyboard. A role set to Nothing plays nothing.
MIDI controls
Twelve controls can be operated from any key, button or pedal on any MIDI input:
| Control | What it does |
|---|---|
| On and off | Toggles the split. It acts while the split is off. |
| Next preset | Recalls the next preset that holds a layout, skipping empty slots and wrapping from 9 to 1. With no preset recalled it starts at slot 1. |
| Previous preset | Recalls the previous one, wrapping from 1 to 9. |
| Preset 1 to Preset 9 | Recall that slot. An empty slot does nothing. |
Each control has a learn button and an x button:
- Click the learn button, then press the key or button (the button reads Press it now…). A note, a controller with a value above 0 or a program change is learned, from any input. The learned press plays nothing, and neither does its release.
- The button then shows the message:
Note C4, channel 1,Controller 64, channel 1orProgram 3, channel 1. Before a message is learned it reads Learn. - x forgets the control.
- One message operates one control; learning it for a second control clears the first. The message is stored with the name of its input, so a control can be tied to one console.
A controller acts on a value above 0, a note on a note-on, and a program change on every arrival. The controls are saved in split-keyboard.txt.
Exclusive input
The Split keyboard input is exclusive. Only mappings that name it take its notes. A manual mapped from Any device on any channel receives no notes from the split, and a control mapped from any input ignores the split’s messages. A role that is mapped nowhere plays nothing. The rule keeps a manual that is mapped from every input from sounding the notes of all four roles.
A recording of the split made with the MIDI recorder holds the notes as the split sent them, on channels 11 to 14. On playback they are treated as the split’s input again and reach the same manuals.
Where the settings are saved
Two files in the data folder (see The MIDI map files for its location):
| File | Holds |
|---|---|
split/<organ>.mpsplit | The organ’s layout: split points, zones, Transpose all, the follow option, the bass settings and the preset the layout came from. Written at every change. |
split-keyboard.txt | What every organ shares: on or off, the Keyboard, the learned controls and the player’s presets (slots 4 to 9). |
<organ> is the organ’s name followed by its unique organ id, as for the MIDI map. The manual assignments of the roles are in the organ’s midi/<organ>.mpmidi.
Both split files are plain text with one record per line. An organ’s file looks like this:
splits 2 53 72 84
zone 0 pedal none 0 0
zone 1 lower none 0 0
zone 2 upper none -1 0
zone 3 none none 0 0
transpose 0
follow 0
bass 0 59 1 off 1500
preset 1
| Line | Fields |
|---|---|
splits | The number of points, then the three points |
zone | The zone (0 to 3), the role, the second role (none, lower, upper, solo, pedal), octaves, semitones |
transpose, follow | Transpose all; 1 when the first split follows the hands |
bass | On (1 or 0), top key, also on the manual (1 or 0), sustain (off, next, timed), time in ms |
melody | On (1 or 0), bottom key, also on the manual (1 or 0) |
preset | The slot the layout was recalled from (1 to 9), when there is one |
A line the program does not know is skipped, and a value out of range is brought into range when the file is read: split points sorted and kept between notes 1 and 127, octaves between -3 and 3, semitones between -12 and 12, the hold time between 50 and 10000 ms.
Audio, room and mixer
This page covers everything between the organ and the loudspeakers: the audio device and its latency, the signal chain, the outputs and the mixer, the impulse-response room, the player’s voicing of ranks and pipes, the master level, the metronome, and what to do when the sound breaks up. Use it to set up a device for low latency, to place a dry organ in a room, and to find the cause of dropouts.
The controls described here are on the Audio and Performance tabs of Settings, on the Outputs, Voicing, Organ EQ and Reverb tabs of Organ settings (each opened from the Organ menu), and in Window > Metronome. The memory and loading choices that decide how many voices a machine can render are in Organ settings > Loading; see Memory, loading and streaming and Small, medium and large organs.
The signal chain
Each audio block passes through these stages, in this order.
| Stage | What it does | Bypassed by Bypass all effects |
|---|---|---|
| Voices | Every sounding pipe is rendered on the output its rank is routed to (see Output routing) and, where its rank is enclosed, filtered by its swell shades | Shades and tremulants are bypassed; the voices play |
| Sends into the output | What other outputs play into this one, through its fader | No |
| Output room | The room of an output past the first, on the Reverb tab under Other output pairs | Yes |
| Output EQ and crossover | The output’s own EQ, then its high-pass, low-pass, delay and polarity; then its meter | No |
| Organ EQ | The ten-band equaliser of Organ settings > Organ EQ | Yes |
| Reverb | The organ’s impulse-response room, on the first output | Yes |
| Organ trim and master level | The organ’s own output trim and the master fader, applied as one multiplication | No |
| Output compressor | Brings the loud passages towards the quiet ones, where the compressor is switched on | No |
| Output limiter | Holds the output under a ceiling, where the limiter is switched on | No |
| Audio recorder | Captures the signal at this point, so a recording does not contain the metronome | No |
| Metronome, load-progress clicks, speaker keep-alive tone | Added after the fader | No |
| Level meter | Reads the finished block | No |
The Bypass all effects box in Organ settings > Loading switches off wind model, tremulants, enclosures, the Organ EQ, the rooms and detuning; the output EQ and crossover stay, because they correct the speakers. The per-rank and per-pipe level and tuning of the Voicing tab, the organ trim and the master level stay active, because each is a single multiplication or ratio taken when a note starts. The shelves, pan and width of the Voicing tab are filters, so they need the effects. The per-rank and per-pipe voicing follows the Voicing box of Organ settings > Loading; see Relation to the Equalizer.
The output compressor and limiter follow their own switches on Settings > Audio… and keep working with Bypass all effects on.
The audio device
Open Settings > Audio…. The tab is the device selector with two additions below it, a latency line and the Keep portable speakers awake control, and under them the output preset, compressor and limiter (Output compressor and limiter).
Driver types
The Audio device type box lists the driver types the system offers. It appears when more than one type exists.
| System | Driver types | Notes |
|---|---|---|
| Windows | Windows Audio, Windows Audio (Low Latency Mode), Windows Audio (Exclusive Mode), DirectSound, ASIO | ASIO is compiled into every Windows build and lists the ASIO drivers installed on the machine. With an ASIO driver the Control Panel button opens the interface’s own panel. |
| macOS | CoreAudio | |
| iPhone and iPad | iOS Audio | |
| Linux, Raspberry Pi | ALSA, JACK | JACK is compiled into the Linux builds and listed when the JACK library (libjack.so.0) is present, which includes the JACK layer of PipeWire. The JACK client is named Masterpiece. |
| Android | Android Oboe | Oboe prefers AAudio, which Android provides from version 8.0 (API 26), the lowest version the app supports. |
Selector controls
| Control | What it does | Takes effect |
|---|---|---|
| Audio device type | Chooses the driver type | At once |
| Output (Device on drivers that join inputs and outputs) | Chooses the output device | At once |
| Active output channels | Lists the device’s output channels as stereo pairs. The program opens two, and as many as the outputs name when the device has them. | At once |
| Sample rate | The rates the device offers | At once |
| Audio buffer size | The buffers the device offers, each shown as N samples (X ms) | At once |
| Test | Plays a test tone on the output | At once |
| Control Panel, Reset Device | Shown for drivers that have their own control panel (ASIO) |
The selector offers one to 64 output channels and no input channels. On Linux the Output list shows only the ALSA devices that open: each is tried once, the device in use and the default and pulse entries always stay, and the full list returns when every test fails. A device plugged in or out refreshes the list. The advanced options are visible. The MIDI inputs and the MIDI outputs are on the MIDI tab; see MIDI and consoles. A change to device, rate or buffer size stops the device and starts it again; sounding notes stop while the engine rebuilds its voice pool.
Latency
The line under the selector reads: Note delay: X ms (buffer Y ms, output Z ms). X is the sum of the buffer length and the output latency the driver reports. The line updates whenever the device changes. The convolution of the room is partitioned with a head at the audio block size, so it adds no latency of its own.
The keyboard-to-sound time also contains the delay of the MIDI interface and of the console, which the line does not include.
| Goal | Choice |
|---|---|
| Lowest latency | A native low-latency driver (ASIO on Windows, CoreAudio on macOS, ALSA or JACK on Linux) with a small buffer. At 48 kHz, 128 to 256 samples gives 2.7 to 5.3 ms of buffer. |
| Safety | A buffer of 256 to 512 samples. The first-run wizard recommends this range for most machines. |
| Large organs, many stops, convolution | The larger buffer. A buffer that is too small makes late blocks (see Audio dropouts). |
A first start, and any start where the saved setup failed, sets the buffer to the available size nearest 10 ms (480 samples at 48 kHz). A setup that the player saved is left as it is.
What happens at start and when the device changes
- The setup (driver, device, rate, buffer, channels) is written to
audio.xmlin theMasterpiecefolder of the user’s application data when the program exits. A crash loses the changes of that session. - At start the saved setup is opened. If it fails to open, or opens with no active output channel, the factory default device is used and the reason is written to the log.
- A device that opens below 44.1 kHz (some virtual outputs default to 8 kHz) is moved to 48 kHz, or to 44.1 kHz when 48 kHz is missing.
- A MIDI input that another program holds is retried every three seconds.
- The latency line follows every change the device manager reports and is empty while no device is open.
The program renders at the device’s sample rate. A sample set recorded at another rate is converted as it loads when Sample rate in Organ settings > Loading is set to 48 kHz or 44.1 kHz; with As recorded each voice is resampled during play.
Keep portable speakers awake
| Field | Value |
|---|---|
| Name | Keep portable speakers awake, with a level slider beside it |
| What it does | Adds a 20 Hz sine under the organ so that a battery speaker on a cable never sees silence, switches itself off, and swallows the first notes while it wakes. The tone is added after the recorder, so recordings do not contain it. |
| Default | Off |
| Range | The slider runs from -80 dB to -40 dB in 1 dB steps and is shown at -60 dB when the box is off |
| Takes effect | At once |
| Stored | Program-wide, as speakerkeepalive in settings.mpglobal |
| Advice | Raise the level when the speaker still sleeps; lower it when the tone is audible |
The audio engine
Settings > Performance sets how the engine uses the processor. Its Performance preset moves the four settings below together; Settings lists the presets.
Faster audio engine renders several samples per instruction with the processor’s vector unit. The box label shows what was found: Faster audio engine: using AVX2, using SSE2 or using NEON, or Faster audio engine: not available on this processor.
| Unit | Processors |
|---|---|
| AVX2 | x86-64 processors with AVX2, checked at start |
| SSE2 | Every x86-64 processor without AVX2, four frames at a time |
| NEON | ARM processors |
| Field | Value |
|---|---|
| Default | On |
| Takes effect | At once; a chord can be played with the box on and off to compare. The state is written to settings.mpglobal as fasterengine |
| Stored | Program-wide |
| Environment | MASTERPIECE_SIMD=0 forces the per-frame path whatever the box says |
| Advice | Leave it on. It gives more polyphony for the same CPU. Turn it off to rule it out when something sounds wrong. The log records the active path as audio engine: faster (AVX2) or audio engine: per-frame. |
Real-time render threads
A large organ is rendered by the audio thread and several render threads that share each block. The audio thread is a real-time thread; the render threads are ordinary threads, and the system may run other work first, or put them on slower cores, while the audio thread waits for them. Real-time render threads, under Faster audio engine, makes them real-time threads the way each system offers it.
| System | What the box does |
|---|---|
| Windows | Registers each render thread with MMCSS as “Pro Audio”, the class Windows gives audio threads, and asks the system never to slow it down to save power. On Intel processors since the 12th generation, that keeps it off the efficiency cores. |
| Linux, Raspberry Pi | SCHED_FIFO at priority 40, or the highest the user may have, for the render threads and for the audio thread when it is an ordinary thread (ALSA). A thread JACK has made real-time keeps the priority JACK gave it. When the user has no real-time rights, the program asks rtkit, the service most desktops run for this (priority 20 by default); in the Flatpak it asks the desktop’s realtime portal. |
| macOS, iOS | The time-constraint policy for each render thread, and a place in the audio device’s workgroup, so the system runs them with the audio thread, to its deadline, on the performance cores of Apple silicon. |
| Android | Not available; the box is hidden. |
| Field | Value |
|---|---|
| Default | On, where the system offers it |
| Takes effect | At once: each thread changes at its next share. The state is written to settings.mpglobal as realtimethreads |
| Stored | Program-wide |
| Label | With the box on, it says what it found: Real-time render threads: using SCHED_FIFO (or MMCSS Pro Audio, rtkit, the realtime portal, Mach time constraint), or Real-time render threads: no real-time rights on this system |
| Log | real-time render threads: on (MMCSS Pro Audio) and the like at load and when it is turned on; each late blocks line adds how many render threads are real-time and how many are in the audio workgroup |
| Advice | Leave it on. To find out whether it is the cause of a problem, compare the late blocks count in the status bar with the box on and off on a heavy registration. |
It helps when another program gets in the way of the organ. A registration too large for the processor stays too large: on a 2-core i3 with every stop of a large organ drawn, half the blocks were late with the box on or off.
Render threads and polyphony
Render on every logical processor (on by default) renders the organ on every logical processor, with none kept for the interface, disk streaming and the system: more polyphony on a machine doing nothing else. Off, the organ renders on every processor but one, eight at most. It is written to settings.mpglobal as everyprocessor. The Steady preset turns it off, for a computer that runs other programs beside the organ.
Polyphony limit is the most pipes that sound at once, applied as soon as it is chosen; a number can also be typed in the box. Audio dropouts gives its default and range.
Real-time rights on Linux. The label reads no real-time rights on this system when the user may not have SCHED_FIFO and no rtkit answers. ulimit -r in a terminal prints the user’s limit; 0 means none. Most audio distributions give the audio group a limit in /etc/security/limits.d/audio.conf:
@audio - rtprio 95
@audio - memlock unlimited
On Debian and Ubuntu the jackd2 package writes this file as audio.conf.disabled when its question about real-time priority is answered no; sudo dpkg-reconfigure jackd2 asks again, or the file can be renamed. Add the user to the group with sudo usermod -aG audio $USER, then log out and in again.
Output routing and the mixer
The outputs are where the organ leaves the program. Organ settings > Outputs sets them up, routes the ranks to them and holds the mixer; Organ settings: Outputs describes every control. No sample set declares an audio routing, so the layout is the player’s, in the way a MIDI mapping is.
| Part | What it is | Kept |
|---|---|---|
| Output | One of up to 64, stereo or mono, on device channels of its own, with a name | For every organ, in settings.mpglobal |
| Send | An output also playing into another output, at a level of its own | With the outputs |
| Room | An impulse response for an output past the first (see The room) | With the outputs |
| Output EQ | Ten bands for the speaker on one output | With the outputs |
| Crossover | High-pass, low-pass, delay and polarity of one output | With the outputs |
| Speaker group | Outputs that share the pipes sent to them, note by note | With the outputs |
| Route | Where a rank plays: an output, a speaker group, or the default destination (Ranks play through) | Per organ, in its .mporgan file |
| Mix | A set of ranks with a fader of its own | Per organ |
Each output is rendered on its own, with the enclosure processing of its ranks, then in this order: what the other outputs send into it, its room, the copy it sends on to other outputs, its EQ, its crossover, its meter. On a device with the channels an output names, the output plays on them; on a device with fewer channels, and in the plugins, the outputs past them are mixed into the first two channels. An output with no channels of its own that plays into others is heard through them only.
A rank is routed when a note starts, so notes already sounding keep the output they began on. A rank with no route of its own plays through the default destination, so an organ is audible before the Outputs tab is opened. The output of a rank is independent of its enclosure: a Swell rank stays behind the Swell shades whichever output carries it. The sum of the outputs is the whole organ, so splitting the ranks over more outputs leaves the total unchanged.
An organ file from an earlier version that still holds outputs gives them to the global file once, when the global file has none; after that the organ file’s outputs are left alone.
A subwoofer, or a speaker of several ways
The crossover splits the organ into bands in the program, so no crossover is needed between the interface and the amplifiers. Nothing is decided for you: each band is an output of its own, fed by the output that carries the ranks. An output plays into others through its sends; one that already plays into this output, itself or through others, cannot be sent back to, so no loop is made: its box in Outputs… is greyed.
A subwoofer under a stereo pair, crossing at 80 Hz:
- Outputs…: two outputs. Output 1 stereo on channels 1-2; output 2 mono on the subwoofer’s channel, for example 3.
- Outputs…: output 1 plays into output 2, at +6 dB: a mono output takes half of each side, and the send puts the level back.
- Crossover…: output 1, High-pass 80 Hz, Linkwitz-Riley 24 dB. Output 2, Low-pass 80 Hz, Linkwitz-Riley 24 dB, and if the subwoofer stands nearer than the speakers, a Delay to bring it in time: 1 ms for every 34 cm it is nearer.
The two speakers and the subwoofer then add up to what the pair carried alone. A three-way speaker is built the same way, with an output per driver and a band on each: low-pass on the lowest, high-pass and low-pass on the middle, high-pass on the highest, the edges that meet at the same frequency. A Linkwitz-Riley filter of 12 dB an octave needs one of the two outputs at a crossing inverted. Never connect a tweeter to an output without its high-pass: the organ’s lowest notes would reach it.
The room
The Reverb tab of Organ settings (Organ > Reverb…) places the organ in a room by convolution with an impulse response (IR). Most sample sets are recorded in the room they live in, and several sets ship close, far and rear perspectives that are the room. Use the Reverb tab for a dry set or for headphones. A wet fraction far below what a reverb plug-in would use is usually enough.
| Name | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Impulse-response reverb | Switches the room on | Off | On, off | At once |
| Load impulse response… | Opens a file chooser for WAV, AIFF or FLAC files, and switches the room on when the file loads | No IR | At once | |
| Clear | Removes the IR; the label reads No IR loaded | At once | ||
| IR label | IR: and the file name | |||
| Wet | The share of the convolved signal in the output | 0.25 | 0 to 1 in steps of 0.01 | At once |
| MIDI | Learns a knob or a pedal for the wet level | At once | ||
| Other output pairs | Shown with two outputs or more: a row per output past the first, Pair N, with Load impulse response…, the file and a Wet slider. Ticked with no file of its own, a row takes the room above; with none there either, it asks for a file. | Off | At once |
How the IR is used:
- Mix. The output is the wet signal times Wet plus the dry signal times 1 minus Wet, an equal-gain crossfade. At the default 0.25 the room’s tail follows each release, and at 1 the room alone plays, at about the organ’s own level. At 0 the room is bypassed.
- Channels. A mono file feeds both sides. A two-channel file is an ordinary stereo room. A file with four or more channels is read as true stereo: channels 1 and 2 carry the left input to the left and right outputs, channels 3 and 4 the right input to the left and right outputs.
- Level. The file is scaled by its power where the organ sounds, octave by octave, with one gain for all channels so that a true-stereo room keeps its balance. At full wet a pipe’s tone comes out of the room at about the level it went in. Leading silence is trimmed.
- Sample rate. When the chosen file is named
<room>-48000Hz.wav(a rate in hertz before the extension) and a sibling for the device’s rate exists, that sibling is loaded. The file’s own sample rate is passed to the convolution engine with its samples. - Position. The organ’s room plays on the first output, after the Organ EQ and before the master fader; the room of another output plays on that output, after what the other outputs send into it. Bypass all effects bypasses it. Convolution is the most expensive stage of the audio callback; the engine uses partitioned convolution with a 256-sample head.
The chosen file, the wet fraction and the on/off state belong to the loaded organ: they are written to its .mporgan file as the reverb line, saved automatically, and restored when that organ opens. Save as default in Organ settings > Loading copies them to the defaults that organs without settings start from. The file is stored as a path, so the IR must stay where it was chosen. The rooms of the other outputs belong to the machine: they are kept with the outputs in the global file as busir lines, for every organ.
If a file cannot be read, a warning titled The impulse response was not loaded gives the reason, either The file could not be read where it is. or <name> is not an impulse response Masterpiece can read (WAV, AIFF or FLAC). The same reason goes to the log (impulse response not loaded: <path>: <reason>). The previous IR and the state of the box stay as they were. When an organ’s saved IR is missing at load time, the log records reverb: the impulse response saved with this organ was not found: <path> and an IR loaded earlier stays in use, with the wet fraction and the on/off state saved with the organ.
Voicing
Organ settings > Voicing is the voicer’s tab: a level, a tuning, two shelves, a pan and a width for a whole rank, a stop, a division, a windchest or one pipe, in two sets for comparison. Organ settings: Voicing describes every control. How it fits into the sound:
- A rank adjustment and a pipe adjustment add.
- Level is a gain and tuning a pitch ratio, both taken once when a note starts. Notes already sounding keep what they began with. Both work with Bypass all effects on and cost nothing while a note sounds.
- Voicing is stored per organ, as
voicingadjlines for both slots,voicingdivlines for the divisions and the live slot (voicingslot), because a rank number has no meaning in another instrument. The tab changes the live set at once; Save for this organ writes it. - The tab sets where each rank and each division stands: Pan, a constant-power law with the middle at unity, and Width, by mid and side. They are heard at once with the EQ, need the DSP, and are stored with the voicing. In the middle and at 100% nothing is processed.
- The tab holds an equaliser for each rank and each division: a shelf for the treble and one for the bass. It is heard at once, it needs the effects, and it is stored with the voicing. See EQ, pan and width.
Relation to the Organ EQ
The Organ EQ tab of Organ settings is a different tool. It is a ten-band equaliser for the whole organ (31.5 Hz to 16 kHz, plus an output gain, up to 12 dB per band), with ten presets and the player’s own, off by default, applied before the room. It can be kept for every organ (Save as default) or for one organ (Save for this organ). The same tab holds the attack’s emphasis, which makes each pipe begin louder or softer. The Voicing tab changes single ranks and pipes in level and pitch, and holds an equaliser for each rank and each division. What it changes is stored per organ. See Organ settings for the equaliser.
The Voicing box among the switches of Organ settings > Loading is saved with the organ. With the box off, the organ plays as recorded: the per-rank and per-pipe level and tuning of the Voicing tab are not applied. The adjustments stay in the voicing sets and apply again when the box is ticked. A change reaches the notes that start afterwards.
Level
| Control | Where | Range | Default | Stored |
|---|---|---|---|---|
| Master volume slider | Top bar of the main window | -40 dB to +24 dB in steps of 0.1 dB; -40 dB is silence | 0 dB | Per organ, as gain; written on its own, apart from the other settings |
| Organ trim | Not adjustable | The organ definition’s own output trim, limited to -24 dB to +24 dB | The definition’s value | Not stored |
| Level meter | Top bar | 14 lamps per channel, from -48 dB; lamps 10 to 12 amber, 13 and 14 red |
The organ trim is the producer’s calibration, which brings sets recorded at different levels to comparable loudness. It is applied under Bypass all effects as well. The meter shows the finished output, metronome included; it rises instantly and falls with a time constant of 0.3 s.
The wind model’s depth has no control in the program; the engine uses the physics as solved (depth 1).
Output compressor and limiter
Settings > Audio holds a compressor and a peak limiter for the output, in the standalone application. Both are off until they are switched on, and while off the engine does not touch the signal at all. Output preset sets them together: Both off, Limiter only, Gentle, Small speakers, Laptop speakers and Headphones, quiet practice. Settings lists every control and the values of each preset.
In the VST3, LV2 and AU plugins neither runs, whatever the program’s settings hold: the host’s own effects shape the output there.
The compressor
| Control | What it does | Default | Range |
|---|---|---|---|
| Output compressor | Switches the compressor on | Off | On, off |
| Threshold | The level the compression begins at | -18 dBFS | -40 to 0 dBFS |
| Ratio | How much a level over the threshold is held down | 3:1 | 1.5:1 to 10:1 |
| Attack | How long the gain takes to come down | 10 ms | 1 to 100 ms |
| Release | How long the gain takes to come back | 200 ms | 50 to 1000 ms |
| Make-up gain | Lifts the whole output after the compression | 0 dB | 0 to 18 dB |
| Bass left out | The pitch below which the compressor does not listen | Below 120 Hz | None, Below 80 Hz, Below 120 Hz, Below 200 Hz |
The compressor brings the loud passages towards the quiet ones, and the make-up gain lifts the whole, so small speakers can play louder without a full organ reaching the limiter. It sits after the master fader and ahead of the limiter. The level it listens to leaves out the bass below Bass left out, so a 32’ or a full pedal leaves the manuals at their level; the bass itself sounds in full. Reduction N dB beside the switch shows how far it holds the level down now, before the make-up gain.
The limiter
| Control | What it does | Default | Range |
|---|---|---|---|
| Output limiter | Switches the limiter on | Off | On, off |
| Ceiling | The level the output is held under | -1 dBFS | -0.1 to -12 dBFS in steps of 0.1 dB |
| Release | How long the gain takes to come back after a peak | 100 ms | 50 to 1000 ms in steps of 10 ms |
The limiter sits after the master fader and the compressor, and before the recorder, so a recording carries it as well. It watches the two channels of a pair together: the louder of them sets the gain and both channels get it, so a loud left channel does not leave the right one to clip on its own.
The gain that holds a sample down is the one that sample asks for, so no part of the signal is delayed and the limiter needs no look-ahead. The knee is 3 dB wide: a level just under the ceiling is barely touched, and the reduction grows smoothly to the full amount. Once the loud passage is over the gain comes back at the release rate; after one release time it has closed about two thirds of the distance back to where it was.
With the compressor and the limiter off the output is bit for bit what the engine made.
The metronome
Window > Metronome adds a click to the output; Metronome describes the window and its controls.
The click is added after the master fader, so the master level does not change it, and after the audio recorder, so recordings do not contain it. It plays on the first output, on both channels. The click starts silent at each start.
Audio dropouts
A late block is an audio block that took longer to compute than the audio in it lasts. Each late block is a click or a gap in the sound. The engine counts blocks on the audio thread and reports the figures below.
The figures the program shows
| Figure | Where | Meaning |
|---|---|---|
voices N | Status line of the main window | Voices sounding now |
dropped N | Status line | Note starts that found no free voice at all |
no audio N | Status line | Note starts whose samples were not resident |
late blocks N | Status line | Blocks that took longer than their audio since the program started |
streamed releases fell behind Nx: turn off "Stream release tails" in Organ settings | Status line | The disk did not deliver a streamed release in time; the release went quiet partway |
Resident samples: ... | Organ settings > Loading, under the controls | Memory held, with N streamed, M MB left on disk and DISK TOO SLOW: N underrun(s) when the disk fell behind |
Voice pool: N voices, M MB | Same readout | The size of the voice pool and its memory |
audio: N late block(s) of M; the slowest took P% of its time | The log, at most once every five seconds | A figure of 100% or more is a late block |
The log is masterpiece.log in the Masterpiece folder of the application data (the previous session is masterpiece.previous.log). The Open the log folder button on the Diagnostics tab of Settings opens that folder.
While an organ loads, the engine answers with silence and drops notes that arrive.
Causes and remedies
| Cause | Sign | What to change |
|---|---|---|
| Buffer too small | Late blocks with few voices | Raise the buffer size on the Audio tab, one step at a time |
| Polyphony | voices high on full organ, late blocks rising, or dropped above 0 | A lower Performance preset in Settings > Performance, or Polyphony limit there. The default is 725 voices per logical processor and at least 1,536 (1,536 when release streaming is on), at most 16,384; the box offers 256 to 10,240 voices, and a number from 64 to 16,384 can be typed. A lower value keeps a small computer from falling behind; a higher value raises CPU use. Past the limit a new pipe takes the place of one that is dying away, or of the quietest. Each choice shows the memory its voices take; the limit applies at once. |
| Processor | Late blocks on every busy passage | Turn on Faster audio engine. Turn off the room, or switch Bypass all effects on to find out whether the effects are the cause. Use Release tails end below (default -90 dB; at -80 dB the last decay of a full chord can end audibly early), Releases and Release length to end sounding tails sooner. |
| Convolution | Dropouts after the room is switched on | A shorter IR, or Clear; the room is the costliest stage |
| Disk streaming | DISK TOO SLOW or the status line message about streamed releases | Raise the share each release holds in memory (Hold 25% to Hold 75% of each release), or a longer Release buffer, or turn off Stream releases from disk and load the organ again; see Memory, loading and streaming |
| Memory | Dropouts together with heavy disk use | A smaller Quality preset in Organ settings > Loading, such as Compact or Small, or a smaller set of ranks; see Small, medium and large organs |
| Other work on the computer | Late blocks while other programs run | The Steady preset in Settings > Performance, which leaves one processor free |
| Other programs | Irregular late blocks | A native low-latency driver, and the larger buffer |
The voice-rendering threads follow Render on every logical processor: on, every logical processor; off, every processor but one, at most eight.
The sample cache writing “in silence, while it plays” waits for silence and takes no voices from the organ; Save the sample cache on the General tab of Settings chooses between this and writing before the organ plays.
Platform notes
- Plug-ins. The host owns the audio device and the MIDI ports. The plug-in’s Settings window has no Audio or MIDI tab, so the device selector, the compressor and the limiter of this page are not there: the host’s own effects shape the output. See Plugins in a DAW.
- Phones and tablets. The same selector is used with the driver types above; see Phones and tablets.
- Raspberry Pi. The faster audio engine uses the NEON unit.
Memory, loading and streaming
This page explains how Masterpiece holds an organ in memory, what each loading choice costs and saves, and how loading, compression, the sample cache, release streaming, the memory limit and the voice pool fit together. Use it to decide the settings on the Loading and Stops, ranks and perspectives tabs of Organ settings, and on the Performance and General tabs of the settings window, to read the memory figures Masterpiece shows, and to understand a load that stops for memory or a stream that falls behind. Small, medium and large organs turns these mechanisms into recommended settings per computer.
Where the settings are
The settings on this page are in three places.
| Place | What it holds |
|---|---|
| Loading tab of Organ settings (Organ > Loading…, available while an organ is loaded) | Quality, Preloaded per sample, Resident format, Sample rate, Notes loaded, Releases, Release length, Release tails end below, Stream releases from disk and its hold, Release buffer, Load in mono (halves memory, gives up the stereo image), Lossless compression in memory, Keep a portable copy of this organ and Organ folder. Saved per organ. |
| Stops, ranks and perspectives tab of the same window | Which stops, perspectives and ranks are loaded, with a memory estimate per entry. Saved per organ. |
| Performance tab of the settings window (Settings > Performance…) | Performance, Faster audio engine, Real-time render threads, Render on every logical processor, Memory limit for samples and Polyphony limit. The same for every organ. |
| General tab of the settings window (Settings > General…) | Sample cache, Save the sample cache, Cache folder with Delete the cache, and Click at each 10% while loading. The same for every organ. |
The Diagnostics tab of the settings window (also Help > Diagnostics…) reports the cache folder and the cache files.
The Display mode box on the General tab decides how much of this is shown. In Simple mode the Loading tab shows the Quality box and the memory readout, the Performance tab shows the Performance box, and the General tab shows Sample cache and Save the sample cache; Custom in the two preset boxes is greyed out. Advanced shows every setting, each one that a preset sets indented under it.
The choices take effect in four ways.
| Group | Takes effect |
|---|---|
| Quality, Resident format, Preloaded per sample, Sample rate, Notes loaded, Releases, Release length, release streaming, its hold and Release buffer, Load in mono, Lossless compression in memory, stops, perspectives and ranks left out | At the next organ load. The button Load the organ to apply on the Loading tab loads the organ at once; it reads Load the organ while nothing is waiting. |
| Release tails end below | At once, and saved with the organ. |
| Performance, Faster audio engine, Real-time render threads, Render on every logical processor, Polyphony limit | At once. Written to settings.mpglobal. |
| Memory limit for samples, Sample cache, Save the sample cache, Cache folder | Written at once to settings.mpglobal; used at the next load. |
A change on the Loading tab stays live for the session. Revert changes puts back the values the window opened with. Keep changes closes the window. Save for this organ writes the choices to the organ’s settings file (organs/<organ>.mporgan in the settings folder). Save as default writes them to settings.mpglobal, where an organ without settings of its own starts. An organ that has settings of its own keeps them.
In Advanced mode, while a change on the Loading tab decides what the sample cache holds, the tab says The cache is rebuilt when this window closes. It can take several minutes. When the window closes before the organ is loaded again, Masterpiece asks Rebuild the sample cache? with the buttons Rebuild and load again and Back to settings. The choices that trigger the question are the resident format, mono, compression, release streaming and its hold, Preloaded per sample, the sample rate, Notes loaded, Releases and Release length, with an organ loaded and a sample cache in use.
What an organ costs in memory
A sample set is the audio of every pipe: an attack with a sustain loop, and one or more releases, for each pipe of each rank, in some sets for several microphone positions. Masterpiece reads the files once, converts them, and holds the result in memory. Drawing a stop changes nothing in memory: every loaded rank is resident whether its stop is drawn or not. A rank whose samples are nowhere (not on disk, not in the archive, not held from the cache) counts as having no pipes, and its stops are shown as not available. In the measurement on Friesach with Masterpiece 0.3.3, peak process memory with one stop drawn and with all 44 stops drawn differed by 2 MB at 24-bit and by 12 MB at 16-bit, both with streamed releases.
The memory an organ takes follows from these choices, in this order of effect:
- The resident format: 32-bit float, 24-bit, 20-bit or 16-bit.
- Lossless compression of the held samples.
- Whether release tails are streamed from disk.
- Mono folding.
- Which stops, perspectives and ranks are loaded, and how many notes of each rank.
- The sample rate and the release choices.
- The voice pool, which counts against the memory limit together with the samples.
Resident format
The Resident format box chooses what one held frame costs.
| Option | Bytes per sample | What it holds |
|---|---|---|
| As recorded (16 or 24-bit) | 3 for a 24-bit file, 2 for a 16-bit file | The integers of the file unchanged, at the file’s own width. The audio in memory is bit-for-bit what the file holds. A 16-bit file is held at 2 bytes whenever its samples still fit 16 bits after reading; folded to mono or converted in rate, it usually takes 3. |
| 20-bit | 2.5 for a 24-bit file, 2 for a 16-bit file | Each sample requantised to 20 bits against its own file’s peak, packed so two samples take five bytes. A 16-bit file is held at its own sixteen bits, bit-for-bit. |
| 16-bit | 2 | Each sample requantised to 16 bits against its own file’s peak, so a stop recorded 20 dB down keeps all sixteen bits. The scale folds into the voice gain and costs nothing while playing. |
| 32-bit float | 4 | The decoder’s floating-point result. |
Default: As recorded. Takes effect: at the next load. The settings file stores the width (storage 16, storage 20, storage 24 or storage 32).
Measured on 60 files chosen at random from Friesach, 24-bit is bit-for-bit identical to the source file, and 16-bit has a signal to quantisation noise ratio of 78.1 dB (median) and 75.2 dB (lowest). Processing runs in 32-bit float whatever the resident format is.
Note
Resident format changes only what is held. A streamed release tail is read from its file at the file’s own precision and joined to the resident head, which is held in the chosen format.
Tip
Advice: 16-bit is the usual choice when the organ does not fit at 24-bit. 32-bit float costs a third more than 24-bit and adds no content to a 24-bit set; keep it for a set whose files are floating point.
Lossless compression in memory
The toggle Lossless compression in memory holds 16-bit and 24-bit samples in a compressed form and decodes them as they play. The sound is identical to the bit. The codec is split Rice coding: blocks of 4,096 frames, each standing alone so a loop can jump back into any block, with a fixed predictor of order 0 to 3 per block and channel, and stereo held as left and right or as left and side, whichever is smaller. On a tenth of the Friesach set the compressed bytes are a third of plain 24-bit storage.
Default: off. Takes effect: at the next load. The settings file stores compress 1 or compress 0. The toggle is greyed out while Resident format is 20-bit or 32-bit float, which are held as they are; it keeps its tick, so a return to 16-bit or As recorded finds it as it was. The command line option is --compress-samples <on | off>.
Each voice that plays a compressed sample decodes into two windows of its own, about 50 KB a voice, so the voice pool grows a little. The decoding costs processor time on every voice: a fuller tutti needs more processor with compression on. The readout on the Loading tab counts the samples held this way: %1 held compressed.
Compression combines with every other setting: 16-bit and compressed, or as recorded and compressed with releases streamed, are presets of the Quality box. The sample cache holds compressed samples compressed, so a compressed organ’s cache is smaller too.
Quality
The Quality box sets five choices at once: the resident format, mono, release streaming, compression and Releases. It also sets Preloaded per sample to Whole samples (most memory).
| Preset | Resident format | Compression | Mono | Release streaming | Releases |
|---|---|---|---|---|---|
| Best: as recorded, all in memory | As recorded | Off | Off | Off | As the organ has them |
| High: as recorded, compressed, releases streamed | As recorded | On | Off | On | As the organ has them |
| Recommended: 16-bit, releases streamed | 16-bit | Off | Off | On | As the organ has them |
| Compact: 16-bit, compressed, releases streamed | 16-bit | On | Off | On | As the organ has them |
| Small: 16-bit mono, compressed, releases streamed | 16-bit | On | On | On | As the organ has them |
| Smallest: as Small, short releases only | 16-bit | On | On | On | The shortest only |
| Custom | Any other combination |
Default: Best: as recorded, all in memory. Takes effect: at the next load. The box shows Custom whenever the settings match none of the presets, and in Simple mode Custom cannot be chosen. The box does not change the sample rate, Notes loaded, Release length, the cache or the limits.
Preloaded per sample
Preloaded per sample limits how much of each attack is resident. Whole samples (most memory) holds the file from its start to its end. Up to the loop (less memory) holds each attack from its start to the end of its sustain loop plus a margin of 8,192 frames for the loop crossfade, which is all a held note plays.
Default: Whole samples (most memory). Takes effect: at the next load.
The setting has a small effect. In an organ sample the loop runs nearly to the end of the file, so the part after the loop is short. A sample whose release is in the same file (marked by a cue point) is always held whole, and a release in a file of its own is held whole or streamed as described below. Earlier versions offered Loop + 1 s and Loop + 2 s; the box shows them as Loop + 1 s (earlier choice) and Loop + 2 s (earlier choice) while a saved organ still uses them.
Mono folding
The toggle Load in mono (halves memory, gives up the stereo image) folds every stereo file to one channel as it is read. The channels are averaged, which avoids the clipping a sum of two correlated channels can cause. A streamed tail is folded the same way, so the join from the resident head to the tail does not step from a downmix to one bare channel.
Default: off. Takes effect: at the next load.
Mono halves the memory of stereo files and has no effect on files that are already mono. It does not reduce the disk reads of streamed tails, because both channels are read to make the average.
Caution
Mono folding gives up the recorded stereo image. For a set recorded in a building the image is part of the sound, and folding it changes the character of the room. Use mono when the choice is between mono and an organ that does not load.
Sample rate
The Sample rate box converts every sample to one rate as it is read, with a Lagrange interpolator. Conversion happens once, at load, where nobody listens.
| Option | Effect |
|---|---|
| As recorded | Each file keeps its own rate. |
| 48 kHz | Every file is converted to 48,000 Hz. |
| 44.1 kHz | Every file is converted to 44,100 Hz. |
Default: As recorded. Takes effect: at the next load. The settings file stores the rate in Hz (rate 48000); --load-rate <Hz> accepts any rate.
Memory is in exact proportion to the load rate. A 96 kHz set converted to 48 kHz takes half the memory. Verified on five ranks of our reference sample set, converted from their native 48 kHz:
| Load rate | Held in memory |
|---|---|
| 48 kHz, as recorded | 1,599.7 MB |
| 44.1 kHz | 1,469.8 MB |
| 24 kHz | 799.9 MB |
Pitch and level are unchanged at every rate. Nothing above half of the chosen rate survives the conversion. Conversion goes both ways: a file whose rate differs from the chosen one by more than 1 Hz is converted up or down. Memory changes by the ratio of the rates, so a conversion that raises the rate (44.1 kHz material at 48 kHz) increases the memory by 8.8% and adds no content, and a conversion that lowers it (48 kHz material at 44.1 kHz) reduces the memory by 8.1%.
Playback also converts the rate of any voice whose sample rate differs from the audio device’s rate, so pitch is correct at every setting, and the setting saves memory and processor time.
Notes loaded
Notes loaded reads only some notes of each rank. A note that is not loaded plays the samples of its nearest loaded neighbour, retuned to its own pitch, so the samples it would have played are never read.
| Option | What is loaded |
|---|---|
| All | Every note. |
| Every second note | Half the notes of each rank. |
| Every third note | A third of the notes of each rank. |
Default: All. Takes effect: at the next load. The settings file stores sparse 2 or sparse 3, and nothing for All. The memory estimate on the Stops, ranks and perspectives tab follows the choice.
Tip
Advice: a note that is not loaded sounds the pipe a semitone away, retuned, so each recorded pipe’s own character is lost on those notes. Use it to fit a large set on a small computer, or to try a set before loading it whole.
Releases
A release is the sound of a pipe after its key is let go. Many sets record several releases per pipe, chosen by how long the key was held. Three settings control which releases are loaded and how much of each.
Releases chooses which of each pipe’s releases are loaded.
| Option | What it loads |
|---|---|
| As the organ has them | All releases. |
| The longest only | The release written for the longest hold time. It answers a key held for any time. |
| The shortest only | The release written for the shortest hold time. It answers every key. |
| None: notes fade when let go | No release samples. A note fades from where it is. |
Default: As the organ has them. Takes effect: at the next load. The settings file stores the choice as a number from 0 (all) to 3 (none) in the key releases.
Release length keeps each release up to a given length after its start and fades it out over its whole length, a straight line in gain from the start of the release to silence at its end.
| Option | Kept |
|---|---|
| Whole | The whole release. |
| Up to 0.15 s, Up to 0.3 s | The first 0.15 or 0.3 seconds: a note ends quickly, as on a tracker action, for fast repeated notes. |
| Up to 0.5 s, Up to 1 s, Up to 1.5 s, Up to 2 s, Up to 3 s, Up to 4 s | The first 0.5, 1, 1.5, 2, 3 or 4 seconds. |
Default: Whole. The settings file stores the length in milliseconds in releaselength; a length in the file that is none of the choices is shown as itself. Takes effect: at the next load. A release shortened this way is always held in memory. A Release length other than Whole therefore turns off release streaming for the releases it shortens, and the memory estimate follows the shortened length.
Release tails end below stops a release tail once it has stayed below a level for a twentieth of a second.
| Option | Level |
|---|---|
| Never: every tail plays out | No cutoff. |
| -80 dB | |
| -90 dB | Default. |
| -100 dB |
Default: -90 dB. Takes effect: at once, and is saved with the organ. A tail only fades, so one that is far down stays there. A fast passage on many stops leaves hundreds of tails sounding far below hearing, each costing as much processor time as a note. Each tail is judged on its own level, measured from sixteen of the frames the voice is about to play. With many stops drawn, -80 dB can end the last decay of a full chord audibly early, which is why -90 dB is the default. The cutoff applies to release samples; a note that fades because no release is loaded is not cut.
Tip
Advice: a set recorded in a reverberant room carries the room in its releases. A shorter Release length or The shortest only removes part of that reverberation. Use them with an impulse-response reverb, or when memory leaves no other choice.
Memory figures before a load
The Stops, ranks and perspectives tab estimates what the organ will take before it is loaded, at the settings on the Loading tab. The estimate reads the sizes and the WAV or WavPack headers of the sample files and decodes nothing. It runs on a worker thread while the tab shows Estimating the memory each stop takes…. File names are matched in any case, as the load matches them.
For each sample the estimate takes the frame count, the bit depth, the channels and the rate from the file header, and applies the current settings:
- the resident format: 2, 2.5, 3 or 4 bytes per sample, and 2 for a 16-bit file at As recorded that is neither folded to mono nor converted in rate;
- compression: half the plain size, the larger end of what the codec reaches, so a set that fits by the estimate fits;
- mono, the load rate and Notes loaded;
- Releases: a release the choice leaves out counts nothing;
- Release length, and, for a release played only as a release, the streamed head. A release inside a package is held whole and counted whole.
It does not apply Preloaded per sample, so Up to the loop is not reflected. A file that exists only inside an archive has no header to read and is taken to be 24-bit stereo; a WavPack file without a readable header is taken to be 55% of its uncompressed size. A file that several pipes play is read once by the load and counted once.
The footer shows About 5.6 GB for this choice (the limit is 12.7 GB), in the form About %1 for this choice (the limit is %2). The figure turns red when it exceeds the limit. The total is worked out the way the load decides what to read, so it is what the load takes. Each stop, perspective and rank shows its own figure. A sample used by a rank that stays loaded is counted once and stays in the total even when another stop that uses it is left out. When the ranks left out would leave nothing to play, the footer adds The ranks left out would leave nothing to play, so they load.
The figure covers the samples. The load itself is checked against the memory limit minus the memory of the voice pool (see The memory limit), so a total just under the limit can still stop a load.
Release streaming
A release tail is several seconds of room sound, played once from its start to its end and never looped. Masterpiece can hold only the first part of each such release in memory and read the rest from the file on disk while the release sounds. An attack cannot be treated the same way: its sustain loop has to be resident, and the loop is most of the file.
The settings
The toggle Stream releases from disk turns streaming on. Default: off. Takes effect: at the next load. The Quality presets from High down turn it on.
A release streams from a sample file on disk. An organ opened straight from a RAR package reads its samples from the archive, so its releases are held whole with streaming on or off. Installing the package into a folder lets its releases stream.
The box beside it, enabled while streaming is on, chooses how much of each release stays resident.
| Option | Resident part of each release |
|---|---|
| Hold the first second | The first 48,000 frames (one second at 48 kHz). |
| Hold 25% of each release | A quarter of its length, and at least the first 48,000 frames. |
| Hold 50% of each release | Half. |
| Hold 75% of each release | Three quarters. |
Default: Hold the first second. Takes effect: at the next load. The fixed head is the floor for every option: the resident part of a release is the larger of 48,000 frames and the chosen share. A release no longer than its head is held whole and has nothing to stream.
Release buffer, enabled while streaming is on, sets how much of each streamed release a voice reads ahead of where it plays.
| Option | Buffer |
|---|---|
| Automatic | Sized at each load from timed reads of the organ’s own release files: a quarter of a second on a solid-state drive, up to 2 s on a hard disk. With an organ loaded the box shows the length chosen, for example Automatic (0.25 s). |
| 0.25 s, 0.5 s, 1 s, 2 s | That length for every voice. |
Default: Automatic. Takes effect: at the next load. Saved with the organ as releasebuffer in seconds, 0 for Automatic. A longer buffer gives a busy disk more time and takes more memory per voice. When the memory left after the samples allows no more, the buffer is made shorter than the one asked for, never below 0.25 s, and the log says streaming: rings of ... s, shorter than the release buffer chosen: the memory left allows no more.
For Automatic, the load times reads of up to 16 of the organ’s streamed release files, past their resident heads, three rounds over the files so each read is a seek to another file. From the fixed cost of a read and the rate past it, it takes the shortest buffer with which the streaming thread keeps 256 releases fed while using at most half of the disk’s time, rounded up to a twentieth of a second, between 0.25 s and 2 s. The log records the measurement: streaming: reads of N release files, ... ms each plus ... ms a second of sound, ...; rings of ... s.
What is held and what is read
| Part | Where it is while playing |
|---|---|
| Attacks and their sustain loops | In memory, always. |
| The resident head of a release | In memory, in the resident format. |
| The rest of a release | In the sample file on disk. |
| A release that is also used as an attack | In memory, whole. One buffer serves both uses. |
| A release inside the same file as its attack | In memory, whole. |
| A release shortened by Release length | In memory, shortened. |
A sample read out of an archive (a RAR or .orgue package) | In memory, whole. There is no file to stream from. |
Every voice has a ring buffer the length of the release buffer for its streamed release. When a key is let go, the voice plays the resident head while one streaming thread reads the rest of the release into the ring. A ring is topped up once half of it is free, in one read of all that is free, so a hard disk makes a few long reads where it would otherwise make many short ones; a ring whose file ends within the room it has is due at once. Each pass serves the eight voices closest to running out, then looks again. A pass that found nothing due waits up to 10 milliseconds, and a voice that starts streaming ends the wait. A plain 16-bit or 24-bit PCM WAV is read straight from the file into the ring. Any other file, a WavPack file for example, goes through its decoder on the streaming thread. A voice that reaches material the thread has not delivered plays silence for the shortfall and adds one to the underrun count. Only a streamed release can underrun.
The ring is part of the voice pool, and its memory is counted with the voices. Its size is the release buffer of stereo 32-bit float at the audio device’s rate: 96,000 bytes a voice at 0.25 s and 768,000 bytes at 2 s, at 48 kHz. At the default 1,536 voices the rings take about 141 MB at 0.25 s and about 1.1 GB at 2 s. The Polyphony limit box shows the exact figure for each choice. This memory is counted against the memory limit, and it is why a streamed organ takes more process memory than the sample figure alone. A load counts the shortest ring, or the release buffer chosen, against the limit before it reads the samples; a longer automatic ring comes out of what is left once they are in.
Streamed tails open their files on first use and keep them open while they are played. The number of tail files open at once is half of the process’s file limit, between 96 and 4,096; when the limit is reached the tail read longest ago is closed and reopens when it is needed again.
The disk it needs
A streamed release is read at the rate of its source file, whatever the resident format and whether the set is folded to mono.
| Source file | Read while one release plays, at 48 kHz |
|---|---|
| 24-bit stereo | 288,000 bytes per second |
| 16-bit stereo | 192,000 bytes per second |
| 24-bit mono | 144,000 bytes per second |
| 16-bit mono | 96,000 bytes per second |
A chord of 100 pipes let go together is 100 releases in 100 different files. At 24-bit stereo that is about 29 MB per second sustained, and the first read of every one of them has to arrive before the resident head ends, one second at the default. The load is many reads from many files, each a seek on a hard disk. Release buffer set to Automatic measures the disk at each load and sizes the rings for it; the bandwidth figures above are worked from the file formats. Advice: use a solid-state drive. A hard disk, an SD card or a network drive may not keep up, and the underrun messages below report it.
A larger share (Hold 25%, 50%, 75%) gives a slow disk longer before a release reaches the end of its resident part, and costs memory in proportion. Hold 75% leaves a quarter of each release on disk. A longer Release buffer gives a busy disk more time on every read, and costs memory per voice.
The two places Masterpiece reports a disk that falls behind:
- The Loading tab’s readout line shows DISK TOO SLOW: %1 underrun(s).
- The status line shows streamed releases fell behind %1x: turn off “Stream release tails” in Organ settings. The setting it names is Stream releases from disk on the Loading tab.
Warning
A streamed release that underruns goes quiet partway. When either message appears, choose a longer Release buffer, raise the hold share, move the sample files to a faster drive, or turn streaming off.
Savings
Streaming is the largest single saving. On our reference sample set it leaves 56% of the sample data on disk. The Loading tab’s readout shows how many samples stream and how much stays on disk: %1 streamed, %2 MB left on disk.
The note on the Loading tab states that on the Nancy demo streaming takes the memory from 12.2 GB to 5.6 GB, with the rendered audio identical sample for sample.
Memory by configuration
Measured on our reference sample set: 44 stops, three manuals and pedal, 17.0 GB and 12,148 WAV files on disk, 24-bit, 48 kHz, stereo. Machine with 15.9 GB of RAM, Windows. Masterpiece 0.3.3. The figures are the sample library’s own accounting at the end of each load (the log line memory: resident ...).
| Configuration | Held in memory | Left on disk | Time to open |
|---|---|---|---|
| 32-bit float, resident | 21,606.5 MB | 77.1 s | |
| 24-bit, resident | 16,204.9 MB | 55.8 s | |
| 24-bit, streamed | 6,976.0 MB | 8,891.9 MB | 28.9 s |
The settings multiply, and each step is an exact ratio of the one before.
| Step | Before | After | Ratio |
|---|---|---|---|
| 32-bit float to 24-bit | 21,606.5 MB | 16,204.9 MB | 0.750 |
Relative to 24-bit resident, which equals about the size of the WAV files on disk, the other configurations take 1.33 (32-bit float) and 0.43 (24-bit streamed). These ratios depend on how much of a set is release data. Small, medium and large organs uses them to estimate organs of other sizes. The figures in this section were measured with Masterpiece 0.3.3.
Lossless compression in memory multiplies again. The estimate counts a compressed sample at half its size; on the whole reference set the codec holds about a third. Measured with Masterpiece 0.9.0, every stop loaded, opened straight from its RAR package, so every release is held whole:
| Configuration | Plain | Compressed | Ratio |
|---|---|---|---|
| 24-bit, resident | 16,204.9 MB | 5,394.5 MB | 0.333 |
The compressed column is the memory: resident line of the log. Streaming the releases of the installed set as well, the 24-bit samples take 3,615.2 MB (4.5x less than as recorded), and 2,844.7 MB with the shortest release only (5.7x less), bit for bit.
Resident format at 20-bit takes 2.5 bytes a sample, five sixths of 24-bit.
The files of a WavPack set are about 55% of their uncompressed size (the estimate’s assumption for a file without a readable header), so such a set takes about twice its disk size in memory at 24-bit resident.
The sample cache
Loading decodes every file and converts it. The result depends only on the files and the settings, so Masterpiece can keep it. The sample cache is a decoded, converted copy of the organ’s samples in one file. The next load of the same organ with the same settings reads that file in one sequential pass, and skips the file opens, the WavPack decoding, the archive reading and the conversion.
What the file holds
The cache holds the resident form of every sample: the audio in the chosen resident format, the channels, the rate, the loop points, the release marker, the pitch the file declares, and a checksum of each sample’s audio. For a streamed release it holds the resident head and, beside it, the path of the source file and the rates needed to reopen the tail when a note asks for it. The cache therefore has about the size of the resident memory. On a five-rank load the cache file was 437.7 MB at 24-bit.
Time saved on our reference sample set at High, 24-bit compressed with releases streamed, measured with Masterpiece 0.9.0 on a 4-core Debian machine; the cache file is 3,617 MB:
| Decoded from the files | Read from the cache | Speed-up | |
|---|---|---|---|
| Sample loading | 42.7 s | 3.3 s | 13x |
| Whole organ | 43.2 s | 3.8 s | 11x |
The rest of a load (reading the definition, building the wind model, wiring the console, building the console artwork) takes the same time whether or not a cache is read, which is why the whole organ gains less than the sample loading.
Settings
The cache settings are on the General tab of the settings window, the same for every organ, and each choice is written to settings.mpglobal at once. Sample cache and Save the sample cache show in Simple mode too.
Sample cache chooses how many caches Masterpiece keeps.
| Option | What it does |
|---|---|
| One cache, replaced as organs change | One file, samples.mpcache. Loading a different organ, or the same organ with different settings, replaces it. This keeps the disk use at the size of one organ. |
| One cache per organ (uses more disk) | One file for each organ, samples-<organ name>-<organ id>.mpcache, replaced when that organ’s settings change. Several organs stay fast. |
| Off | No cache is read or written. |
Default: One cache, replaced as organs change. Takes effect: at the next load. settings.mpglobal stores the mode as the number in samplecache (0 off, 1 single, 2 per organ). The command line option --cache <off | single | per-organ> holds for that session over the setting and is never written. The cache line that organ settings files carry from earlier versions is passed over.
Save the sample cache chooses when a new cache is written.
| Option | What it does |
|---|---|
| Before the organ plays | The load writes the cache before the organ can be played. The first load of an organ takes longer, and nothing competes with the sound. The loading dialog shows Creating the sample cache with the bytes written, the rate and the time left. The button Skip the cache opens the organ at once and stops the write; the next load reads the samples again. |
| In silence, while it plays | The organ plays at once. The write runs on its own thread at the system’s lowest scheduling class and waits while any voice sounds. The status line shows creating the sample cache: N% with the time left. Until the write finishes, the next load reads the samples again. |
Default: Before the organ plays. Takes effect: at the next load. Stored as cachewhileplaying in settings.mpglobal.
Cache folder shows the folder that holds the cache files. Default (the button) returns to the usual place, shown in the box as Default (<path>). Choose… opens a folder chooser titled Where should the sample cache be written?. The choice is written at once to settings.mpglobal as cachedir. Delete the cache removes every cache file in the folder; its tooltip gives their size, and each organ reads its samples again on its next load. The button is greyed out while a cache is being written and while the folder holds none.
The usual place is the cache folder inside the Masterpiece folder of the user’s application data: %APPDATA%\Masterpiece\cache on Windows. On the other systems the parent is the system’s user application data folder. The Diagnostics tab of the settings window shows the folder in use, whether it can be written, the free space, and the number of cache files in it with their total size.
On iPhone and iPad, Choose… opens the system folder picker, which is the Files app. The folder it returns is lent to Masterpiece, held for the session and lent again at the next start, so the choice persists across restarts.
How the cache is keyed
A cache is read only when its stored fingerprint equals the fingerprint of the load that wants it. The fingerprint is one string built from everything that changes the bytes in memory:
- The organ’s stamp,
loadedStamp: the definition’s path, its size and its modification time. For a GrandOrgue organ the stamp also holds a hash of the converted sample table, so a cache made by an older importer has a different fingerprint. For an organ opened from its kept copy (see below) the stamp is the original’s. - The resident format, mono, the load rate and Preloaded per sample.
- Lossless compression in memory: a compressed organ’s cache holds the samples compressed.
- The loop selection.
- Release streaming, the fixed head, the hold share, Releases and Release length.
- Notes loaded.
- Whether the publisher’s licence was confirmed for the organ, and how many samples wait for it.
- The packages a composite organ found with other organs.
- The set of ranks loaded. Each distinct set of ranks left out is its own fingerprint.
The cache file also carries a format version. The memory limit, the polyphony, Release buffer, Release tails end below and the cache mode are outside the fingerprint and do not rebuild the cache.
When the cache is rebuilt
Any difference in the fingerprint is a miss. The load decodes the files and writes a new cache over the old one. Every mismatch rebuilds, so a stale cache is never played. Verified on a five-rank load: a 16-bit cache is reused at 16-bit and rebuilt at 24-bit and at 16-bit mono. Because one file holds one fingerprint, switching back to the earlier settings rebuilds again.
A cache is also rebuilt when:
- the definition file changes (size or modification time);
- a sample inside the cache fails its checksum. Masterpiece logs
cache: sample N is damaged on the disk; the samples are read instead and the cache written again; - the cache file is truncated or has another format version.
A cache is written only after a complete load: one that was not cancelled, did not stop for memory, read at least one sample and had no file fail to read. A partial or damaged installation is therefore cached only as what it is, and only a complete one is trusted on later loads. The write goes to a file with the extension .part and is moved into place when finished, so an interrupted write, including one cut short by quitting, leaves the earlier cache as it was. The next load then reads the samples again. A cache that cannot be written whole is removed.
Before a byte is written, the write checks the room on the disk: the cache, its sample records, and a margin of a twentieth of the disk, between 64 MB and 512 MB. The cache it replaces counts as room, and is removed first when the disk needs it. When even that is too little, nothing is written, the log says cache: not written: it needs ... MB, and the status line shows sample cache not saved: the disk is full until the next load.
Size, disk space and clearing
A cache has about the size of the resident memory of the organ. A cache per organ for several large organs fills a disk. The one-cache default keeps the use to a single organ’s size. The Diagnostics tab shows the free space of the cache folder and the sum of the .mpcache files in it.
To clear the cache, press Delete the cache on the General tab, or close Masterpiece and delete the .mpcache files in the cache folder. The next load of each organ rebuilds its cache. Off stops reading and writing caches and leaves existing files in place.
Failures
A problem with the cache does not fail a load.
- A cache folder that cannot be created, for example on a drive that is unplugged, falls back to the usual folder. The Diagnostics tab reports
The cache folder chosen in Loading cannot be used, so the usual one is: .... - A cache that cannot be written logs
cache: could not be written to <path>, and the status line shows sample cache not saved. - A cache of the wrong fingerprint, version or size is ignored, and the samples are read.
- A cache larger than the memory limit stops the load before reading it, like any other load.
Playing an organ when its drive is unplugged
The toggle Keep a portable copy of this organ, on the Loading tab, gives the organ a cache of its own, whatever Sample cache says, and keeps a copy of the organ’s definition and console pictures. With its cache, the organ opens without its installation files: unplug the drive that holds the sample set and open the organ from its usual place or from File > Open organ…. Masterpiece opens the kept copy.
Default: off. Takes effect: at the next complete load. The copy is made only after a load that read every sample and was not incomplete. It holds everything under the organ’s folder except the audio and archive files (.wav, .wv, .aif, .aiff, .flac, .hbw, .hbx, .rar, .zip, .orgue), in the Portable folder of the Masterpiece settings folder. It costs the size of the cache on that disk.
Warning
Streamed release tails still read the installation files. Turn release streaming off for an organ that must play without them. With streaming on, the notes sound and the releases go quiet after their resident part.
The memory limit
The box Memory limit for samples, on the Performance tab of the settings window (Advanced mode), is the most memory the samples and the voices of one load may take. A load that would take more stops and says so, which keeps the computer from running out of memory.
| Option | Limit |
|---|---|
| Default: 80% of memory (%1) | 80% of the computer’s RAM, and at least 512 MB. |
| 50% of memory, 60%, 70%, 90% | That share of the RAM, with the figure in GB beside each. |
| A size from the file | A memlimit value in megabytes in settings.mpglobal that matches none of the above is shown as itself. |
Default: 80% of RAM, at least 512 MB. On iPhone and iPad, where the system ends a program at a ceiling of its own, the default stays under that ceiling with the reserve below kept free. Takes effect: at the next load; the choice is written at once to settings.mpglobal as memlimit.
The budget of a load is the limit minus the memory of the voice pool, because both come from the same memory; the pool is counted with the shortest ring, or the release buffer chosen. The loader charges every sample against the budget as it lands. A cached load charges the size of the cache file before it reads it.
A load also watches the memory the system has free, on every platform, and stops before it runs short. It keeps a reserve free for the program and the system: the larger of 256 MB and a twentieth of the computer’s memory. On Windows the memory free is the smaller of the physical memory free and the commit still open, so memory paged out counts too.
When the budget is exceeded, or the free memory runs low, the load stops at the sample that crosses it.
- If some samples were read, the organ is kept as it stands. The status line ends with INCOMPLETE (memory limit), or INCOMPLETE (memory low) when the system ran low, and a window titled Only part of this organ fits states how many of the samples (and what percentage) were loaded, with the ways to load all of it. At the limit, the window names the limit and ends with raising it on the same tab if the computer has the memory to spare; for low memory, it names the reserve kept free and starts with closing other programs. The organ plays, and some stops or notes are silent. No cache is written for it.
- If no sample was read, the load fails. A window titled Not enough memory for this organ names the limit, or says the computer had too little memory free. The console is drawn without sound so that Organ settings can be opened from the Organ menu.
After the samples are in, the voice pool is built under the same limit and in the memory still free. When fewer voices fit than the polyphony asks for, the pool is made smaller, never below 64 voices, and the log says voices: N of the M asked for: the memory free allows no more.
A Cancel during the sample loading keeps every sample read, in the same way: the status line ends with INCOMPLETE (load cancelled) and the stops whose samples arrived play.
The ways to make an organ fit, in order of cost to the sound: leave out perspectives, stops or ranks on the Stops, ranks and perspectives tab; stream release tails; hold the samples compressed; load 16-bit; load fewer notes; load in mono; raise Memory limit for samples on the Performance tab when the computer has the memory. The Quality presets apply the middle steps in order.
On Linux, the memory of an organ that is let go is handed back to the system at the next load or unload, so loading an organ again finds the memory free.
Caution
The limit is a ceiling for the samples and the voice pool. The program, the console artwork, the audio system and other programs use memory of their own. A limit above the default leaves less room for them; the 90% choice can slow a computer that starts to swap.
The voice pool and polyphony
Each sounding pipe, attack or release, uses one voice. The pool of voices is built when audio starts and when the polyphony limit grows. It is allocated once, because the audio thread allocates nothing.
Polyphony limit, on the Performance tab of the settings window (Advanced mode), sets the number of voices in the pool, which is the most pipes that sound at once.
| Option | Voices |
|---|---|
| Default: %1 voices (%2 MB) | Chosen from the computer, see below. |
| 256, 512, 768, 1024, 2048, 3072, 4096, 6144, 8192, 10240 | That number, each with the memory of the pool in MB. |
| A typed number | Any number typed over the list, kept between 64 and 16,384. |
| A number from the file | Any value from 64 to 16,384 in polyphony of settings.mpglobal; one that matches none of the choices is shown as itself. |
Default: 725 voices for each processor thread, at least 1,536 and at most 16,384; 1,536 when release streaming is on. On a computer with 4 threads without streaming that is 2,900. A value equal to the default is stored as the default. Takes effect: at once. A smaller number limits the pool that exists. A larger number builds a new pool at once with the organ staying loaded; the voices sounding at that moment stop. The choice is stored in settings.mpglobal.
The memory shown with each choice is the memory the voices take. With release streaming on it includes the rings described above, at the release buffer’s length: 96,000 bytes a voice at 0.25 s and 768,000 bytes at 2 s, at 48 kHz, so a pool of 4,096 voices takes from about 0.4 GB to about 3 GB. With compression on, each voice adds its two decoding windows.
The Performance box above it sets the polyphony with the engine’s threads, and applies at once.
| Preset | Threads | Voices |
|---|---|---|
| Most voices: every processor core, 8192 voices | Every logical processor | 8,192 |
| Balanced (default): every core, the default number of voices | Every logical processor | The default |
| Steady: one core left free for the system and other programs | Every processor but one, eight at most | The default |
| Fewer voices: 1024 | Every processor but one, eight at most | 1,024 |
| Fewest voices: 512, for a Raspberry Pi or a tablet | Every processor but one, eight at most | 512 |
| Custom | Any other combination |
Every preset turns on Faster audio engine and, where the system allows it, Real-time render threads. Default: Balanced. The box shows Custom whenever the four settings match none of the presets; in Simple mode Custom cannot be chosen. Advice from the box’s own help: start with Balanced; if the sound crackles in a full chord, move down the list until it plays clean; Steady helps when other programs run beside the organ.
When a pipe starts and the pool (or the limit) is full, a voice is taken over, in this order:
- A voice that is already dying away in its release: the one released longest ago, which is the most decayed.
- If none is releasing, the quietest sounding voice, the oldest first among equals.
A voice that started in the current audio block is left alone. If nothing can be taken, the new pipe is dropped, and the status line shows dropped %1. A passage with more simultaneous pipes than the limit therefore loses its oldest and quietest pipes first. A fuller tutti with couplers needs several hundred voices to over a thousand.
Note
Fewer voices make a thinner tutti on a full organ. More voices than the computer can render make the audio fall behind: the status line shows late blocks %1. Lower the limit, raise the audio buffer or turn on Faster audio engine, which renders several samples at a time with the processor’s vector unit (AVX2 on a PC, NEON on ARM) and is on by default. The panel shows which unit it found: Faster audio engine: using %1.
Release tails that end below the Release tails end below level free their voices early. A cutoff that ends a tail before its natural end can be heard as a decay that stops short, most easily on the last chord of a piece with many stops drawn; -90 dB is the default for that reason.
Loading only some ranks or stops
The Stops, ranks and perspectives tab of Organ settings chooses what is loaded. The choices are saved for the organ and take effect at the next load, with the button Load the organ on the tab (marked when the choice here or on another tab differs from what is loaded).
| Entry | What leaving it out does |
|---|---|
| Perspectives (Windchest groups for a GrandOrgue organ) | Leaves out every rank recorded from that microphone position, or in that windchest group. The stops still play from the others. At least one position stays. |
| A stop under its division heading | Leaves out the ranks that only left-out stops use, including the alternate ranks a tremulant swaps in. The stop keeps its drawstop, dimmed, and makes no sound. A rank shared with a stop that stays loaded, a noise and a rank wired to the pallets always load. |
| Effects and noises | Stops nobody draws: key-action noises, coupler and tremulant effects. They keep their own choice. |
| Ranks | Leaves out one rank, whichever stop plays it. This is the finest choice, for the rear ranks of a few stops or a set’s tremmed copies. |
The buttons All stops, No stops and Only the stops drawn now set the stop ticks; the filter box and the buttons Load only shown ranks, Load shown ranks and Leave out shown ranks act on the ranks that match the filter; Load only shown ranks also leaves out every rank that does not. Clicking a division heading selects or clears its stops. A Shift-click sets every row from the one clicked before to this one, and a drag over the ticks sets every row it passes, within its own list of stops or ranks.
A set recorded from three or four places holds the whole organ that many times over, so leaving out a perspective can decide whether the organ fits. Each entry shows its estimated memory. A left-out perspective or stop costs no memory; a stop shown dimmed was left out of the load and plays again once it is ticked and loaded.
A partial load is a different set of samples from a full one and has its own cache fingerprint. Leaving a stop out is therefore a cache miss the first time.
Load time
The loading dialog names each phase and shows its progress.
| Phase | What happens |
|---|---|
| Opening the archive, Reading the archive, Extracting definitions and artwork | Only for an organ opened from a RAR or .orgue package: the archive is indexed and the definitions and artwork are unpacked once. |
| Reading the organ definition | The definition is parsed. |
| Building the wind model | The wind system is solved. On a large set this is about ten seconds. |
| Wiring the console | Linkages, couplers and the key-flow walk. |
| Finding the samples | The previous organ’s audio is released, then the samples the pipework plays are listed and looked for on disk and in the cache. |
| Loading samples from the cache | A valid cache is read in one pass, with a progress bar. |
| Loading samples | The long phase, with a count of samples and an estimate of the time left. |
| Creating the sample cache | The cache is written, when Before the organ plays is chosen and no valid cache existed. The button reads Skip the cache during this phase; it stops the write, and the organ opens without its cache. |
| Preparing to play | The audio graph, MIDI map and combinations. |
| Building the console | The console artwork is decoded. |
The log, masterpiece.log in the settings folder, records a stage: line with the seconds spent in each phase and a load: TOTAL line, and for a cache the line cache: read ... MB, samples not decoded. Between the phases the dialog names the shorter steps: Letting the previous organ go, Setting up %1 voices, Checking the releases, Checking which stops have samples and Restoring the combinations.
The toggle Click at each 10% while loading, on the General tab of the settings window, plays a short click at every tenth of the sample loading, so a long load can be followed by ear. It is off by default.
On iPhone and iPad a load holds while Masterpiece is in the background and goes on when it comes back to the front.
What makes a load slow
- Number of files. A large set is ten thousand files or more. Each is opened, read and converted.
- Archives. Samples inside a RAR or
.orguepackage are read in one pass per archive, front to back, with one reading thread per archive, and decompressed in memory. Nothing is written out. These samples are always resident. - WavPack decoding. WavPack files cost processor time. The loader uses twice as many threads as the computer has processor threads, between 4 and 32, because loading waits on disk as much as on the processor.
- The disk. A hard disk or a network drive is much slower than a solid-state drive for many small files. On Linux and Android the pages of every file read whole are released from the system’s file cache after reading, so a cold load does not push the program’s own code out of memory.
- The cache write. On the first load of an organ, Before the organ plays adds the time of writing the cache.
How the cache and streaming change it
Streaming leaves unread the part of each release that stays on disk, which is more than half the data on our reference sample set, and so shortens the load: 55.8 s at 24-bit resident became 28.9 s at 24-bit streamed. A cache replaces the file reads with one sequential read: sample loading fell from 13.0 s to 2.6 s on Friesach. The time of the other phases remains. These times were measured with Masterpiece 0.3.3 on a Windows computer with 15.9 GB of RAM.
Caveats
- Streaming on slow disks. A hard disk, an SD card and a network drive are unsuited to release streaming, as the derivation above shows. The status line and the Loading tab report underruns; turn streaming off, or raise the hold share, when they appear.
- Streaming and WavPack. A streamed tail in a file that is not a plain 16-bit or 24-bit PCM WAV, a WavPack file for example, is read through its decoder on the one streaming thread while playing.
- Streaming and the installation files. A streamed organ needs its sample files on disk while it plays, even when its cache is present. Samples read from archives are always resident.
- Mono folding. Mono loses the stereo image of a stereo set, and saves nothing on a set that is already mono.
- 16-bit. The quantisation step is set by the file’s peak, so the signal to noise ratio of a passage falls with its level. The measured ratios (78.1 dB median, 75.2 dB lowest, over 60 files) are for whole files.
- Release length and the cutoff. A shortened release and a release cutoff end a tail before the recording does, and can be heard as a decay that stops short.
- Cache disk space. The cache has the size of the resident memory. A cache per organ for several large organs fills a disk; keep the cache folder on a drive with the room.
- Plugins. Each plugin instance holds its own copy of the organ’s samples. In the plugin editor, the Organ menu opens Organ settings without its MIDI tab, so the Loading tab is there. A plugin loads an organ with the settings files in the same folder as the standalone application, so choose the loading settings in either and save them for the organ.
- Phones and tablets. The memory limit follows the device’s RAM, 80% by default, and the Memory limit for samples box offers 50%, 60%, 70% and 90% as well. The sample files are read where they are, from the Files app on iPhone and iPad. Phones and tablets covers the platform details.
- Process memory. The memory figures are those of the sample library. The process takes more: the voice pool and its rings, the console artwork and the program itself. On whole Friesach with compression on, the pool of 5,800 voices takes 277 MB; with Stream releases from disk on, each voice carries a ring as well, and the pool takes 1,198 MB for 1,536 voices.
- Streaming and compression. A compressed sample is decoded into two small windows per voice as it plays, which costs processor time on every voice.
Related pages: Audio, room and mixer, Organ settings, Files and folders, Troubleshooting and caveats.
Small, medium and large organs
This page gives recommended loading settings for three sizes of organ on computers from 8 GB of RAM to 64 GB, on the Raspberry Pi 4 and 5, and on phones and tablets. The settings are the Quality preset and the settings it chooses (resident format, compression, mono folding, release streaming), the notes loaded, the sample cache, the polyphony limit and the audio buffer. The figures come from the mechanisms and measurements on Memory, loading and streaming; read that page for what each setting does. The recommendations are advice, and the page marks where a figure is derived and where a choice is a judgement.
How the sizes are defined
An organ’s size for this page is the memory it takes at 24-bit with every sample resident, which for a set of WAV files is about the size of the files on disk. Use Organ > Stops, ranks and perspectives… to read the figure for a particular organ: it shows About %1 for this choice at the settings on the Loading tab, before the organ is loaded.
| Size | Organ | Taken as |
|---|---|---|
| Small | Fewer than about 10 stops, or a few GB | 3 GB |
| Medium | About 10 to 50 stops, up to about 20 GB | 12 GB |
| Large | 50 or more stops, or more than 20 GB | 30 GB |
The three sizes in the last column are the examples used in the tables below. A WavPack set is about 55% of its uncompressed size on disk (the estimate’s assumption for a file without a readable header), so its size in this table is its disk size divided by 0.55.
What each configuration takes
The ratios were measured on Friesach (44 stops, 17.0 GB on disk) with Masterpiece 0.3.3 and are applied here to the three example sizes. A set whose releases are a larger or smaller share of its data than Friesach’s gains more or less from streaming. Check the real figure on the Stops, ranks and perspectives tab. The Nancy demo, which the Loading tab gives as 12.2 GB down to 5.6 GB with streaming (a ratio of 0.46), is close to the 24-bit streamed ratio of 0.43.
| Configuration | Ratio to 24-bit resident | Small (3 GB) | Medium (12 GB) | Large (30 GB) |
|---|---|---|---|---|
| 32-bit float, resident | 1.33 | 4.0 GB | 16.0 GB | 40.0 GB |
| 24-bit, resident | 1.00 | 3.0 GB | 12.0 GB | 30.0 GB |
| 20-bit, resident | 0.83 | 2.5 GB | 10.0 GB | 25.0 GB |
| 16-bit, resident | 0.67 | 2.0 GB | 8.0 GB | 20.0 GB |
| 24-bit, releases streamed | 0.43 | 1.3 GB | 5.2 GB | 12.9 GB |
| 16-bit, releases streamed | 0.29 | 0.9 GB | 3.4 GB | 8.6 GB |
| 16-bit mono, resident | 0.33 | 1.0 GB | 4.0 GB | 10.0 GB |
| 16-bit mono, releases streamed | 0.14 | 0.4 GB | 1.7 GB | 4.3 GB |
| 20-bit mono, resident | 0.42 | 1.2 GB | 5.0 GB | 12.5 GB |
The 20-bit resident and the 16-bit resident rows follow from the exact ratios 0.833 (24-bit to 20-bit) and 0.667 (24-bit to 16-bit), and the mono rows from 0.500 (stereo to mono). A set recorded at 16 bits takes the 16-bit figure at 24-bit too, because Masterpiece holds its 16-bit samples as recorded.
Lossless compression in memory shrinks every resident row further, with the sound unchanged. The estimate counts a compressed sample at half its size. Measured on whole Friesach with Masterpiece 0.9.0, the codec holds 24-bit samples in 0.333 of their plain size and 16-bit samples in 0.306, mono or stereo:
| Configuration | Ratio to 24-bit resident | Small (3 GB) | Medium (12 GB) | Large (30 GB) |
|---|---|---|---|---|
| 24-bit, compressed, resident | 0.33 | 1.0 GB | 4.0 GB | 10.0 GB |
| 16-bit, compressed, resident | 0.20 | 0.6 GB | 2.4 GB | 6.1 GB |
| 16-bit mono, compressed, resident | 0.10 | 0.3 GB | 1.2 GB | 3.1 GB |
Those three rows apply the ratios measured on Friesach; the ratio of another set depends on its recordings.
Notes loaded set to Every second note or Every third note takes about a half or a third of any row.
Those figures are the samples only. The voice pool adds to them, and streaming makes the pool larger, because every voice carries a ring as long as the Release buffer: 96,000 bytes at 0.25 s and 768,000 bytes at 2 s, at 48 kHz. Automatic, the default, sets it from the speed of the disk.
| Polyphony | Rings at 0.25 s | Rings at 2 s |
|---|---|---|
| 512 voices | about 0.05 GB | about 0.4 GB |
| 1,024 voices | about 0.1 GB | about 0.8 GB |
| 1,536 voices (the default with streaming) | about 0.15 GB | about 1.1 GB |
| 3,072 voices | about 0.3 GB | about 2.2 GB |
Without streaming there are no rings, and the pool takes much less. The Polyphony limit box shows the exact figure for every choice.
What each computer can hold
The memory limit is 80% of the RAM by default. The load budget is the limit minus the pool, and the samples have to fit in it. A load also stops when the memory the system has free falls to the reserve: the larger of 256 MB and a twentieth of the RAM. The columns below use the default polyphony with streaming at the longest release buffer, 1.1 GB of rings.
| RAM | Memory limit | Room for samples with streaming at 1,536 voices | Room for samples at 512 voices |
|---|---|---|---|
| 4 GB | 3.2 GB | 2.1 GB | 2.8 GB |
| 8 GB | 6.4 GB | 5.3 GB | 6.0 GB |
| 16 GB | 12.8 GB | 11.7 GB | 12.4 GB |
| 32 GB | 25.6 GB | 24.5 GB | 25.2 GB |
| 64 GB | 51.2 GB | 50.1 GB | 50.8 GB |
The operating system reports somewhat less than the nominal RAM (the Friesach test computer, a 16 GB machine, reported 15.9 GB), so the real limit is a little lower. On Friesach the process also took about 1.3 GB more than the samples in both streamed runs (Masterpiece 0.3.3, Windows).
Tip
Advice: keep the whole process at about 70% of the RAM or lower, so that the operating system and other programs keep room. The default limit of 80% is a ceiling for the samples and the pool, and the program takes more memory on top. On a computer that also runs other programs (a DAW with the plugin, for example), choose the 60% or 50% entry of Memory limit for samples, on the Performance tab of the settings window in Advanced mode.
Recommended settings
Each cell gives the resident format, mono folding and release streaming. They are advice for the example sizes. The label in bold is the Quality preset that matches, where one does; in Simple mode the preset is the one loading setting shown. The figures are without compression; the presets with compression take less.
| Computer | Small (3 GB) | Medium (12 GB) | Large (30 GB) |
|---|---|---|---|
| 8 GB | 24-bit, stereo, resident (Best: as recorded, all in memory) | 16-bit, stereo, streamed (Recommended: 16-bit, releases streamed): 3.4 GB | 16-bit, mono, streamed: 4.3 GB, less with compression (Small: 16-bit mono, compressed, releases streamed); leave out perspectives or ranks if the Stops, ranks and perspectives tab shows a total near the limit |
| 16 GB | 24-bit, stereo, resident (Best: as recorded, all in memory) | 24-bit, stereo, streamed: 5.2 GB, less with compression (High: as recorded, compressed, releases streamed); or 16-bit, stereo, resident (8.0 GB) when the disk is slow | 16-bit, stereo, streamed (Recommended: 16-bit, releases streamed): 8.6 GB |
| 32 GB | 24-bit, stereo, resident (Best: as recorded, all in memory) | 24-bit, stereo, resident (Best: as recorded, all in memory): 12 GB | 24-bit, stereo, streamed: 12.9 GB, less with compression (High: as recorded, compressed, releases streamed); or 16-bit, stereo, resident (20 GB) when the disk is slow |
| 64 GB or more | 24-bit, stereo, resident (Best: as recorded, all in memory) | 24-bit, stereo, resident (Best: as recorded, all in memory) | 24-bit, stereo, resident (Best: as recorded, all in memory): 30 GB |
| Raspberry Pi 4 or 5, 4 GB | 16-bit, mono, resident: 1.0 GB | 16-bit, mono, streamed: 1.7 GB, on a solid-state drive, at 512 voices | Does not fit. Leave out perspectives and ranks until the total is under 2 GB, with 16-bit mono streamed |
| Raspberry Pi 4 or 5, 8 GB | 24-bit, stereo, resident | 16-bit, stereo, streamed: 3.4 GB, on a solid-state drive | 16-bit, mono, streamed: 4.3 GB, on a solid-state drive, with perspectives left out when the total nears 5 GB |
| Phone or tablet | 16-bit, stereo, resident (2.0 GB), or mono (1.0 GB) when the device has 4 GB | 16-bit, mono, streamed: 1.7 GB | Load a part: leave out perspectives and ranks until the total fits, with 16-bit mono streamed |
A Raspberry Pi with 16 GB of RAM follows the 16 GB row for memory; its processor still decides polyphony and buffer. The rows for the Raspberry Pi and for phones and tablets are advice derived from the ratios above; they have not been measured on those devices.
Reasoning
Small organs. A small organ fits at 24-bit on any computer with 8 GB or more, and 24-bit keeps the audio bit-for-bit as recorded. Streaming saves little on a small organ and adds the memory of the rings, so leave it off. On a Pi with 4 GB, 16-bit mono resident takes 1.0 GB and leaves room for the system; 24-bit stereo takes 3.0 GB against a limit of 3.2 GB.
Medium organs. An organ of 12 GB does not fit resident at 24-bit on 8 GB. The two lines of attack are 16-bit with streaming (3.4 GB) and, on a slow disk, 16-bit resident (8.0 GB, which fits only from 16 GB). At 16 GB the choice is between 24-bit with streaming (5.2 GB) and 16-bit resident (8.0 GB). The first keeps the 24-bit audio of the attacks and needs a solid-state drive; the second reads nothing from disk while playing. Advice: take streaming on a solid-state drive, and 16-bit resident on a hard disk, a network drive or an SD card. This is a judgement; the two have not been compared by measurement.
Large organs. An organ of 30 GB needs streaming on every computer under 64 GB, or 16-bit resident (20 GB) on 32 GB. At 8 GB only 16-bit mono streamed (4.3 GB) fits within the 5.3 GB of room, so a large organ on 8 GB is a trade of the stereo image for the whole organ. With Lossless compression in memory, at the ratio measured on Friesach, 16-bit stereo held whole takes 6.1 GB, which keeps the stereo image on 16 GB; on 8 GB, streaming the releases as well cuts it further. The other way is the Stops, ranks and perspectives tab: a set recorded from several positions holds the whole organ for each, and leaving out one or two perspectives cuts the total in proportion while keeping the stereo image of the others. Advice: try leaving out perspectives before folding to mono, because the other perspectives are complete stereo organs.
Mono. Folding saves exactly half on stereo files and gives up the recorded image, so it is the last choice for a set recorded in a building. It also leaves the disk reads of streaming unchanged: a streamed tail is read from its stereo file and folded while playing.
Streaming. The disk has to deliver about 288 kB per second for each sounding release of a 24-bit stereo file at 48 kHz, and deliver the first read of every release within the resident first second. A chord of 100 pipes let go together is about 29 MB per second from 100 files. A solid-state drive meets that. A hard disk, an SD card and a network drive do not, in the derivation on the memory page; the Loading tab then shows DISK TOO SLOW and the status line says the releases fell behind. Advice: where the disk is slow, raise the hold to Hold 50% of each release or Hold 75% of each release, or choose 16-bit resident. A Release length shorter than Whole also holds the releases in memory and turns streaming off for them. Release buffer at Automatic times the disk at each load and gives a slow disk a longer ring, up to 2 s.
Cache. The cache settings are on the General tab of the settings window and hold for every organ. Keep the cache on for every large and medium organ: the first load writes it and later loads read one file. On Friesach sample loading fell from 13.0 s to 2.6 s. Use One cache, replaced as organs change when a computer plays one organ at a time. Use One cache per organ (uses more disk) when several organs alternate; each cache has about the size of the resident memory, so three large organs at 16-bit streamed take about 26 GB of disk. On a computer with a small disk (a phone, a Pi with a small card) leave One cache, replaced as organs change and place the Cache folder on the largest drive. Choose In silence, while it plays for Save the sample cache when the first load must finish quickly, and Before the organ plays otherwise; Advice: on a Pi choose In silence, while it plays, because the write at the system’s lowest priority then waits while any voice sounds.
Polyphony. The default is 725 voices per processor thread with at least 1,536, and 1,536 when streaming is on. A four-thread Pi therefore defaults to 2,900 voices without streaming and 1,536 with it. Advice: lower the limit on a Pi and on a phone to 512 or 1,024 voices, with the Performance presets Fewest voices: 512, for a Raspberry Pi or a tablet or Fewer voices: 1024, which cuts the rings with streaming by up to 0.4 to 0.8 GB and keeps the processor from falling behind on a full organ; raise it above 1,536 on a large computer only when a full chord is heard to lose pipes. The voices taken over first are the releases that decayed longest ago and then the quietest voices; dropped %1 on the status line counts the pipes that found no voice to take. The figures of 512 and 1,024 voices are advice; the rendering capacity of a Raspberry Pi 4 or 5 has not been measured.
Buffer size. The audio buffer is set in the audio device settings of the standalone application (see Audio, room and mixer); a plugin takes the host’s buffer. A larger buffer gives the processor more time per block at the price of latency. Advice: start with the device’s default on a PC, Mac or Linux computer; on a Raspberry Pi and on a phone or tablet start at 1,024 frames and raise it to 2,048 when the status line shows late blocks %1. The status line is the test: play a full-organ chord with the stops of the heaviest registration and watch it. The Faster audio engine toggle is on by default and uses NEON on ARM and AVX2 or SSE2 on a PC. The figures of 1,024 and 2,048 frames are advice.
Phones and tablets. The memory limit follows the device’s RAM. Advice: choose the 50% entry of Memory limit for samples, because the device keeps its system and other apps in the rest. Load a small or medium organ, or load a part of a large one. The sample files are read where they are, and an iPhone or iPad lends the Files app’s folder to Masterpiece. See Phones and tablets.
Plugins. Each plugin instance holds its own organ, so two instances take twice the memory. Choose the loading settings in the standalone program and save them for the organ; the plugin loads the organ with the saved settings from the same folder. In the plugin editor, the Organ menu opens the Organ settings window without its MIDI tab.
Checking a choice
- Open Organ > Stops, ranks and perspectives…. The footer shows About %1 for this choice and (the limit is %1). It turns red when the total passes the limit. Keep the total under the room figure in the table above, because the load itself is checked against the limit minus the voice pool.
- Click Load the organ on that tab, or Load the organ to apply on the Loading tab.
- When the organ is loaded, the readout line of the Loading tab shows the resident samples, the streamed count and the megabytes left on disk, and the voice pool. Compare it with the estimate.
- Play a full-organ chord and a fast passage. Watch the status line for late blocks, dropped and streamed releases fell behind.
A load that passes the limit stops, keeps what it read, and shows INCOMPLETE (memory limit); one that finds the system short of free memory shows INCOMPLETE (memory low). Change the settings, or close other programs, and load again. The page Memory, loading and streaming lists what to change in order of cost to the sound.
Related pages: Organ settings, Troubleshooting and caveats.
Organ settings
The Organ settings window holds the settings of the organ that is loaded: how its samples are held in memory, which stops, ranks and perspectives are loaded at all, the outputs and the mixer, the voicing of its ranks and pipes, an equaliser for the whole organ, the room, and the MIDI of its keyboards. This page lists every control on every tab in the order the window shows them: what it does, its default, its range or options, when it takes effect and where it is stored. Memory, loading and streaming explains the loading choices in depth, and Small, medium and large organs helps to pick them for a given computer. The settings of the program and of the player’s console are in Settings.
Opening the window
The Organ menu lists the window’s tabs: Loading…, Stops, ranks and perspectives…, Outputs…, Voicing…, Organ EQ…, Reverb… and MIDI…. Each opens the window on that tab, and each is available while an organ is loaded.
The window opens by itself the first time an organ is loaded, when no settings file exists for it yet. Masterpiece first reads the organ without its audio, so the console appears within seconds and the Stops, ranks and perspectives tab can show this organ’s own stops with the memory each would take. Closing the window starts the load of the audio with the choices made. After that first time the window opens only from the menu.
The window is titled Organ settings, opens at 780 x 560 pixels and can be resized; the Esc key closes it. The ? button at the right end of the tab bar opens this manual at the section of the tab in front (the Reverb tab at The room).
| Tab | Content |
|---|---|
| Loading | How the organ’s samples are held in memory, the engine switches, the releases, the organ’s sample cache and its folder. |
| Stops, ranks and perspectives | Which perspectives, stops and ranks are loaded. |
| Outputs | The outputs and their device channels, where the ranks play, the output EQ and crossover, the speaker groups, the division EQ, and the mixer’s strips. |
| Voicing | Level, tuning, EQ, pan and width for each rank and pipe, and a desk with every pipe of the rank. |
| Organ EQ | A ten-band equaliser for the whole organ, its presets, and the attack’s emphasis. |
| Reverb | The room: an impulse response and its wet level, and a room for each further output. |
| MIDI | What plays each keyboard of the organ, the manual buttons, and the import of GrandOrgue’s settings. Present in the standalone application. |
In the VST3, LV2 and AU plugins the window has the six other tabs and no MIDI, because the host owns the MIDI ports.
Display mode on the General tab of Settings decides how much the Loading and MIDI tabs show. The tables below mark the rows that only Advanced shows.
One organ, one set of settings
Settings belong to an organ definition. Many sample sets ship one organ as several definitions: a definition for each microphone perspective (near, far, surround), or a full and a light version. Each definition is an organ of its own with its own settings, MIDI mapping and combinations. File > Other versions of this organ lists the definitions beside the one loaded (in its package, or in its folder) and loads the one chosen. A package remembers which of its definitions was opened last.
Inside one definition, a set recorded from several microphone positions carries the whole organ once for each position, as separate ranks named for the position (for example Principal 8 (close) or Principal 8 Rear). The Stops, ranks and perspectives tab lists these positions as perspectives, and leaving one out removes its ranks from the load.
The settings file of an organ is named by the organ key: the organ’s name reduced to letters and digits, a hyphen, and the unique organ identifier of the definition (p and a path hash when the definition has none). Two definitions with the same name and identifier share one file; renaming or moving a sample set keeps its file. Settings gives the exact rules.
Loading
The tab scrolls when the window is shorter than its contents. Changes here act on the engine as they are made, and nothing is written to disk until the player chooses. The footer holds the choices: Footer. In Simple the tab shows Quality, the readout and the footer.
Engine switches
Shown in Advanced.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Bypass all effects | Plays the samples with no wind model, tremulants, enclosures or voicing, for a slow computer. While it is on, the switches below it are greyed out. | Off | On, off | At once |
| Wind model | Simulates the wind supply. Off uses the constant-volume fast path. | On | On, off | At once |
| Moving reservoir boards | Treats the reservoir boards as moving bodies: the wind overshoots and wobbles when a chord lands. | Off | On, off | At the next load |
| Tremulants | Applies the organ’s tremulants. | On | On, off | At once |
| Enclosures (swell shades) | Applies the organ’s enclosures. | On | On, off | At once |
| Voicing | Applies the level and tuning of the Voicing tab. With the box off the organ plays as recorded; the adjustments stay in the voicing sets and apply again when the box is ticked. | On | On, off | At once, for the notes that start afterwards |
| Play at the original organ’s pitch | Plays each pipe at the pitch it had on the original instrument; with the box off, each pipe takes a tempered pitch derived from the keyboard. Pipes without that data always use the tempered pitch. | Off | On, off | At once, for the notes that start afterwards |
| Tremulant pitch | Adds a pitch swing to this organ’s tremulants, in step with the level swing its definition sets. Shown for a GrandOrgue organ. | Off | On, off | At once; organ file gotremulantpitch |
| Swell filter | Darkens the tone of this organ’s swell boxes as they close, on top of the level change its definition sets. Shown for a GrandOrgue organ. | Off | On, off | At once; organ file goswellfilter |
Quality
Quality moves the settings indented under it together: Resident format, Load in mono, Stream releases from disk, Lossless compression in memory and Releases. Each preset also sets Preloaded per sample to whole samples. The box shows Custom whenever the settings match no preset. Shown in both modes; in Simple, Custom is greyed. It takes effect at the next organ load.
| Preset | Resident format | Mono | Streaming | Compression | Releases |
|---|---|---|---|---|---|
| Best: as recorded, all in memory (default) | As recorded | Off | Off | Off | As the organ has them |
| High: as recorded, compressed, releases streamed | As recorded | Off | On | On | As the organ has them |
| Recommended: 16-bit, releases streamed | 16-bit | Off | On | Off | As the organ has them |
| Compact: 16-bit, compressed, releases streamed | 16-bit | Off | On | On | As the organ has them |
| Small: 16-bit mono, compressed, releases streamed | 16-bit | On | On | On | As the organ has them |
| Smallest: as Small, short releases only | 16-bit | On | On | On | The shortest only |
| Custom | As set | As set | As set | As set | As set |
Memory
Shown in Advanced.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Preloaded per sample | How much of each sample is held in memory. An attack is always held to the end of its sustain loop, which in an organ sample lies close to the end of the file. | Whole samples (most memory) | Whole samples (most memory), Up to the loop (less memory). A file written by an earlier version may show Loop + 1 s (earlier choice) or Loop + 2 s (earlier choice), which stay as they are. A sample whose release is in the same file is always held whole. | Next load |
| Resident format | What a held frame costs in memory. As recorded keeps each file’s 16 or 24 bits. 20-bit holds a 16-bit file at its own sixteen bits. 16-bit scales each sample by its own peak first, so a quiet stop keeps the full sixteen bits. | As recorded (16 or 24-bit) | As recorded (16 or 24-bit), 20-bit, 16-bit, 32-bit float | Next load |
| Releases | Which of each pipe’s releases are loaded. Many organs record a short and a long release per pipe; keeping one uses less memory and loads faster. | As the organ has them | As the organ has them, The longest only, The shortest only, None: notes fade when let go | Next load |
| Stream releases from disk | Holds only the start of each release in memory and reads the rest from disk while it plays. Releases are the only samples worth streaming: they run several seconds and play once from the start, straight through. Needs a disk that keeps up. | Off | On, off | Next load |
| Stream box (beside the tick) | How much of each release stays in memory when streaming is on. A larger share gives a slow disk longer to catch up. Greyed out while streaming is off. | Hold the first second | Hold the first second, Hold 25% of each release, Hold 50% of each release, Hold 75% of each release | Next load |
| Load in mono (halves memory, gives up the stereo image) | Folds each stereo sample to one channel. | Off | On, off | Next load |
| Lossless compression in memory | Holds 16- and 24-bit samples in a lossless compressed form and decodes them as they play. The sound is identical; memory use is lower. Greyed for 20-bit and 32-bit float. | Off | On, off | Next load |
| Compression box (beside the tick) | How hard the samples are compressed. Light compression takes the least processor time per voice; Medium compression holds the samples in about a third of their memory; High compression and Maximum compression hold 16-bit samples in less memory for more processor time. A 24-bit sample is coded at medium. | Medium compression | Light compression, Medium compression, High compression, Maximum compression | Next load |
| Sample rate | Converts samples to this rate while loading. A 96 kHz set on a 48 kHz device is held at twice the size it needs otherwise. Only the two lower rates are offered. | As recorded | As recorded, 48 kHz, 44.1 kHz | Next load |
| Notes loaded | How many notes of a rank are loaded. A note that is not loaded plays the samples of its nearest loaded neighbour, retuned to its own pitch. Half, by the sides of the organ keeps C and C#, E and F, G# and A; each other note plays its neighbour a whole tone away, which stands on the same side of the chest, so the stereo image stays. A noise, a percussive rank, a rank recorded with a tremulant and a rank of fewer than eight pipes keep every note. | All | All, Every second note, Every third note, Half, by the sides of the organ | Next load |
A change to a setting that decides what the sample cache holds (resident format, mono, compression, streaming, preload, sample rate, notes loaded, releases, release length) rebuilds the cache at the next load. While such a change is pending the tab shows The cache is rebuilt when this window closes. It can take several minutes. The cache itself is set on the General tab of Settings.
Releases
Shown in Advanced.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Release length | Each release is kept up to this length and fades out over its whole length. A shortened release is always held in memory. Useful for an organ played in a room with its own reverberation or under an impulse response. The two shortest end a note quickly, as a tracker action does: for fast repeated notes. Releases set to None: notes fade when let go loads no release at all, for a player with an external reverb. | Whole | Whole, Up to 0.15 s, Up to 0.3 s, Up to 0.5 s, Up to 1 s, Up to 1.5 s, Up to 2 s, Up to 3 s, Up to 4 s; another length set in the file shows as itself | Next load |
| Release tails end below | A release tail stops once it has stayed below this level for a twentieth of a second. A fast passage on many stops leaves hundreds of tails sounding far below hearing, each costing as much as a note. Each tail is judged alone, so with many stops drawn -80 dB can end the last decay of a full chord audibly early. | -90 dB | Never: every tail plays out, -80 dB, -90 dB, -100 dB | At once; saved with the organ |
| Release of a short note | A note let go during its attack has not reached the level its release was recorded from. Scaled to the time held starts the release lower, up to the recorded level at the end of the attack. | At the recorded level | At the recorded level, Scaled to the time held | At once; organ file releaseshortgain 1 while scaled |
| Release buffer | How much of each streamed release a voice reads ahead of where it plays. Automatic times reads of the organ’s own files at each load: a quarter of a second on an SSD, up to 2 s on a hard disk; with an organ loaded it reads Automatic (N s). A longer buffer gives a busy disk more time and uses more memory per voice. Greyed while streaming is off. | Automatic | Automatic, 0.25 s, 0.5 s, 1 s, 2 s | Next load |
Each release starts where it joins the sustain, aligned by phase, and crosses over from the sustain at a length set by the pipe’s pitch. This needs no setting.
Organ
Shown in Advanced.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Extra couplers | Adds the program’s own couplers to this organ. The same switch is in Window > Couplers. See Extra couplers. | Off | On, off | Next load, as Load the organ does it; organ file |
| Keep a portable copy of this organ | Keeps this organ’s own sample cache, whatever the Sample cache setting says, and a copy of its definition and console pictures in the Portable folder, so the organ opens with the drive that holds its installation files unplugged. Made at the next complete load; costs the cache’s size on this disk. Streamed release tails still come from the installation files: turn streaming off for an organ that must play without them. | Off | On, off | At the next complete load; organ file |
| Sample cache for this organ | Whether this organ keeps a sample cache. Its own cache keeps one whatever the Sample cache setting of Settings says, so its next load is quick. No cache loads the organ from its files every time and uses no disk for a cache. | As in Settings | As in Settings, Its own cache, No cache | Next load; organ file organcache 1 or organcache 0, absent for As in Settings |
| Delete this organ’s cache | Deletes this organ’s sample cache. The organ reads its samples again at its next load. The tooltip gives the cache’s size, or No sample cache for this organ. | At once | ||
| Organ folder | The folder that holds this organ’s OrganInstallationPackages. Normally derived from the definition’s path. A set whose folders are linked in from another tree can leave that path pointing away from the audio, and then the folder is named here. | From the definition (PATH) | Choose… opens a folder chooser (the display then reads PATH – loads next time); Default returns to the derived folder | Next load; organ file |
Readout
A line under the controls reads Resident samples: N MB (N samples, FORMAT, mono or stereo, RATE). With compression it adds N held compressed. When releases stream it adds N streamed, N MB left on disk. If the disk could not keep up it adds DISK TOO SLOW: N underrun(s). It ends with Voice pool: N voices, N MB. The line updates twice a second. Shown in both modes.
Footer
| Button | What it does | Takes effect |
|---|---|---|
| Revert changes | Returns every control on the tab to its state when the tab opened. | At once |
| Keep changes | Closes the window and keeps the choices for this session. | At once |
| Load the organ | Appears while an organ is loaded. Reads Load the organ to apply and is highlighted when a loading choice has changed since the tab opened. Closes the window and loads the organ again with the choices. | At once |
| Save for this organ | Writes the organ’s settings file. The button reads Saved for two seconds. | At once |
| Save as default | Writes the current choices into the global file, as the starting point of every organ that has no file of its own. | At once |
Closing the window by any route keeps the loading and engine-switch choices for the loads of this organ in this session; another organ’s load drops them. If the window closes with a change that rebuilds the cache and the organ has not been loaded again, a question Rebuild the sample cache? offers Rebuild and load again and Back to settings.
The Performance tab of Settings holds the faster audio engine, the render threads, the polyphony limit and the memory limit, for every organ.
Stops, ranks and perspectives
Chooses what the load reads. A perspective, stop or rank that is left out costs no memory and makes no sound. A stop left out keeps its drawstop and its place in pistons, dimmed on the console, so that it is not taken for a broken one. The choice is saved with the organ at once, and it takes effect when the organ is loaded again. A rank that a loaded stop shares, and noises and ranks wired to keys directly, are always loaded.
The list has up to four groups.
| Group | Content |
|---|---|
| Perspectives | One row for each microphone position, with the number of ranks. Shown when the set has at least two. For a GrandOrgue organ the heading is Windchest groups, which stand in for perspectives. Leaving one out takes every rank recorded from that position; the stops still play from the others. At least one position always stays. |
| Divisions | The drawn stops, under a heading for each division. Click a heading to select or clear every stop of that division. |
| Effects and noises | Stops that no drawstop reaches: key-action noises, coupler and tremulant effects. |
| Ranks | Every rank by name, the finest choice. A rank left out is left out whichever stop plays it. Each rank’s tooltip names the stops that play it (Played by …), or says Played by no stop: a noise, or wired to a key directly. |
Each row has a tick box and, at the right, the memory it takes. A stop whose ranks ship no pipes in the set is greyed out (This stop’s ranks ship no pipes in this sample set). A rank shows unticked and greyed when something above it leaves it out, and its tooltip says why: Left out with the NAME perspective, Left out with the NAME windchest group, Left out with its stop, or Left out with every stop that plays it. The rank’s own choice waits underneath.
| Control | What it does | Default | Takes effect |
|---|---|---|---|
| All stops | Ticks every stop, including the effects and noises. | At once | |
| No stops | Unticks every drawn stop. Effects and noises keep their state. | At once | |
| Only the stops drawn now | Loads only the stops drawn on the console at this moment. Effects and noises keep their state. | At once | |
| Filter box | Shows only the perspectives, stops and ranks whose name holds the text. The placeholder reads Filter, for example: Rear, tremmed, Pedal. Division headings are hidden while a filter is active. | Empty | At once |
| Load only shown ranks | Ticks every rank in the filtered list and unticks every other rank: filter for middle, then this button, to load one perspective. | At once | |
| Load shown ranks | Ticks every rank in the filtered list; the other ranks keep their state. | At once | |
| Leave out shown ranks | Unticks every rank in the filtered list. | At once | |
| Load the organ | Loads the organ again with the choice. Highlighted when the choice differs from what is loaded. Closes the window. | At once | |
| Total line | About N for this choice, with (the limit is N) appended; red when the figure exceeds the limit. Reads Estimating the memory each stop takes… until the sample files have been measured. The figure is worked out as the load works it out, at the settings of the Loading tab: a sample a loaded rank shares counts once. When every single rank left out would leave nothing to play, it adds The ranks left out would leave nothing to play, so they load. | Updated twice a second |
All stops are ticked by default. The keys work as follows: Space ticks or unticks the focused stop; Up and Down move to the previous and next stop shown; with Shift held, the arrows carry the focused stop’s state onto each stop they reach. A press on a stop dragged across others gives them its new state.
Stored. In the organ file: skipstop <stop id>, skipperspective <name> and skiprank <rank id>, one line for each item left out. The file is written shortly after a change.
Outputs
The outputs of the machine, where the ranks of this organ play, and a mixer with a strip for each output and each division, perspective or mix. No sample set declares an audio routing, so the routing is the player’s. Up to 64 outputs can be set up, each stereo or mono, each on device channels of its own; an output can also play into other outputs through sends. The outputs belong to the machine and are the same for every organ; where the ranks play belongs to the organ. Audio, room and mixer explains how the parts fit together.
The top of the tab
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Outputs | The number of outputs. Lowering the count sends the ranks that played on a removed output to the default destination. | 1 output | 1 output to 64 outputs | At once |
| Ranks play through | The default destination: where every rank with no route of its own plays, on every organ. | Output 1 | Each output, each speaker group | At once |
| Outputs… | Each output’s name, stereo or mono, its device channels and the outputs it also plays into. See Outputs…. | At once | ||
| Rank routing… | The ranks in a list, each to an output or a speaker group, and the mixes. See Rank routing…. | At once | ||
| Output EQ… | Each output’s own ten-band EQ, for the speaker on it. | Off | At once | |
| Crossover… | Each output’s high-pass, low-pass, delay and polarity. | Off | At once | |
| Division EQ… | Each division’s treble, bass, pan and width, which every rank of it hears. | 0 dB, centre, 100% | At once | |
| Speaker groups… | Outputs that share the pipes sent to them, note by note. | None | At once | |
| All to the default | Every rank loses its own route and plays through the default destination. | At once | ||
| Narrow strips | More strips in view: the scales keep their ticks, without numbers. | Off | On, off | At once; global file narrowstrips 1 |
| Save for this organ | Writes the organ’s settings file, the routes and mixes included. | At once | ||
| Status line | N ranks, N routed by hand, with N stale when a rank points at an output that no longer exists. | |||
| Outputs line | Each output’s device channels, such as Output 2: 3-4; a run of stereo outputs on consecutive channels as one entry, such as Outputs 1-24: 1-48; a mono, named or copied output by its name, with (mono) for a mono one. the device gives N channels: the outputs past them play on 1-2 follows when the device has fewer channels than the outputs name. |
Outputs…
One row per output: a button Output N that picks it, a name (placeholder Name, for example: Gallery left; the name shows on its strip and in every list), and Stereo or Mono. The output picked shows its device channels and the other outputs as boxes to tick, under the list: NAME plays on the device channels and NAME also plays into. Stereo takes the channels two at a time: the first two are the output, the rest copies. Each send has its own level, from -60 to +12 dB in steps of 0.5; a double-click sets 0 dB. An output that already plays into the one picked, itself or through others, takes no send back, so no loop can be made: its box is greyed, with the tooltip NAME already plays into NAME: a send back would make a loop.
All stereo, in order and All mono, in order give every output its channels in turn from channel 1, two in stereo and one in mono, without copies.
Rank routing…
A list of the ranks, each with a tick box and where it plays. A box at the top narrows the list to a division (Every division by default), and a filter box narrows it by name (Filter, for example: Rear, tremmed). Tick the ranks on show and Untick all set the boxes. Send the ticked ranks to… sends them to an output, a speaker group or the default. Put the ticked ranks in a mix… puts them in a mix: A new mix, an existing mix, or Out of their mix. A mix is a set of ranks with a fader of its own on the mixer; a rank is in one mix at most. The line under the heading reads A rank with no route of its own plays through the default destination.
A rank is routed when a note starts, so notes already sounding keep the output they began on. The output of a rank is independent of its enclosure: a Swell rank stays behind the Swell shades whichever output carries it.
Output EQ…
One output’s EQ at a time, chosen in the box at the top: the ten bands of the Organ EQ, each with its frequency and width, and a gain. It is a correction for the speaker on that output. It acts after what the output sends to the other outputs, which have their own, and before its meter. The curve shows the output’s crossover filters too. A fader moved turns the EQ on; Flat puts every band back to 0 dB at the frequency and width it came with. Off or flat, the output is not filtered.
Crossover…
One row per output: High-pass and Low-pass, each Off or 20 Hz to 20 kHz, picked from its list or typed in Hz or kHz (80, 1.2k), with its kind: Butterworth 12 dB, Butterworth 24 dB, Linkwitz-Riley 12 dB or Linkwitz-Riley 24 dB; a Delay of 0 to 100 ms; and Invert under Polarity. Butterworth is 3 dB down at its frequency, for keeping the lowest or highest notes from a speaker; Linkwitz-Riley is 6 dB down, so a low-pass and a high-pass at the same frequency add up flat. The delay sets drivers at different depths in time: 1 ms is 34 cm. The filters act after the output’s EQ and before its meter. All off, the output is not touched. Nothing decides the bands: A subwoofer, or a speaker of several ways gives the steps.
Division EQ…
One row per division with pipes: Brightness (a shelf above 3 kHz), Bass (a shelf below 200 Hz), each -12 to +12 dB, Pan and Width. Every rank in the division hears the shelves added to its own; the pans add, held to full left and full right, and the widths multiply. A division of noises alone (a blower, stop and key-action noises) has no row; its noises are voiced on the Voicing tab. Heard at once and kept with the organ’s voicing.
Speaker groups…
A rank sent to a speaker group sounds on the group’s outputs, note by note. Add a speaker group adds one; each group has a box per output to tick, a way to spread the notes, and Remove. A group with no output ticked plays on output 1.
| Spread | What it does |
|---|---|
| Across the octave (default) | Each note of an octave on the next output; each octave and each stop starts one further on. |
| Chromatic | Each note on the next output. |
| By stop | Each stop whole on one output, the stops taking the outputs in turn. |
A stop’s perspectives, tremulant ranks and mixture ranks sound together on one output.
The mixer
Under the buttons, the strips, side by side by kind, each kind under its title: Outputs (with the Master strip, the same as the top bar’s volume), Divisions (a division of noises alone has no strip), Perspectives (Windchest groups for a GrandOrgue organ) and Mixes. A strip has a fader, a meter, Mute, Solo and a MIDI button. A narrow window shows the kinds as tabs, one at a time. A tab, or a right-click on it, opens that kind in a window of its own (Own window), to keep beside the console; closing the window puts it back. Phones and tablets have no such windows.
| Control | What it does | Default | Range | Takes effect |
|---|---|---|---|---|
| Fader | A live level, heard at once: 0 dB is the level as voiced. A drag moves the knob as far as the pointer moves along the fader. A division’s fader acts on every rank in it. A double-click on the readout types a level in dB. | 0 dB | Off, -40 dB to +24 dB | At once |
| Meter | The strip’s level. On the Master strip, the loudest output after the master volume; red near full scale. | Live | ||
| Mute | Silences the strip; the fader stays where it is. | Off | On, off | At once |
| Solo | On an output strip, only the soloed outputs sound; on another strip, only the ranks under a soloed strip sound. | Off | On, off | At once |
| MIDI | Learns a knob or a pedal for the level (Learn: move the knob or pedal), and buttons for mute and solo (Learn: press the button). Clear mapping removes it. | At once |
A double-click on a mix’s name renames it; a right-click on its strip offers Rename and Remove the mix. The box on a strip sends every rank under it to one output or speaker group.
The faders are kept: an output’s with the machine’s outputs, for every organ, and the others (divisions, perspectives, mixes) with the organ, saved a moment after each move. Mute and solo are not kept. The knobs learned for them are kept with the organ’s MIDI mapping; an output’s knob is kept for every organ. The control API reads and sets the same faders as divisions, pairs and ranklevels, and the web console shows the division and output faders under Levels.
Stored. The outputs are the machine’s, in the global file: buses (each output’s number, m for mono, its device channels counted from 0, and its sends with their levels), busname, defaultroute, busir (the rooms), buseq, busfilt, livepair (the output faders not at 0 dB) and groups (the speaker groups). An organ file from an earlier version that still holds outputs gives them to the global file once, when the global file has none. The organ file holds route <rank> bus <n> or route <rank> group <n> for each rank routed by hand, mix lines and livelevel lines; the routes are written by Save for this organ and by any other change that makes Masterpiece rewrite the organ file.
Voicing
The player’s adjustments of level, tuning and tone, for a whole rank or for single pipes, in the way a voicer goes round an organ. A rank adjustment and a pipe adjustment add. Level and tuning are applied when a note starts, so they cost nothing while it sounds, and they work with Bypass all effects on. Notes already sounding keep what they began with. The Voicing box on the Loading tab turns every level and tuning adjustment off while it is cleared; the organ then plays as recorded.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Choose by | Whether the next box picks one rank, or every rank of a stop, a division or a windchest at once. A change reaches each rank chosen; with One pipe it reaches the pipe at that note in each. Ranks of a windchest is offered on an organ with two windchests or more. | One rank | One rank, Ranks of a stop, Ranks of a division, Ranks of a windchest | At once |
| Rank box | The rank, stop, division or windchest, with the ranks it reaches. Ranks left out of the load are not offered. | The first | The items of the loaded organ | At once |
| Test note | A key plays what is chosen here alone; another key moves it there, and the same key again stops it. | Off | On, off | At once |
| Keys choose the note | A key played chooses its pipe, with the test note or without it. Off, the pipe chosen stays, and the test note plays its neighbours beside it. Cleared when Applies to leaves One pipe. | Off | On, off | At once |
| MIDI | Buttons on the console for level and tuning, acting on the rank or pipe chosen here: Voicing: level -, Voicing: level +, Voicing: tuning -, Voicing: tuning +, each with Learn, MIDI window… and Clear mapping. The mapping is the console’s, the same on every organ. | At once | ||
| Applies to | Whether the sliders adjust the whole rank, one pipe of it, or the pipes on one side of the chest. | The whole rank | The whole rank, One pipe, Pipes on the C side, Pipes on the C# side | At once |
| MIDI note | The pipe, chosen by its note, shown with its name. Active when One pipe is selected. A rank without a pipe at that note reports This rank has no pipe at that note. | 60 | 0 to 127 | At once |
| Level | The level change of the rank or of the pipes chosen. | 0 dB | -12 to +12 dB in steps of 0.1 on the slider; -24 to +24 dB on the faders of Every pipe of the rank and with the console’s voicing buttons; -24 to +12 dB through the control API | On the next note |
| Tuning | The pitch change. | 0 cents | -50 to +50 cents in steps of 0.1 | On the next note |
| Brightness | The treble shelf, above 3 kHz, of the rank or of the pipes chosen. A pipe’s own shelf is on top of its rank’s. | 0 dB | -12 to +12 dB in steps of 0.5 on the slider; -24 to +24 dB on the pipe faders and with the console’s buttons; -12 to +12 dB through the control API | At once for a rank, on the pipes sounding too; from the next note for a pipe |
| Bass | The bass shelf, below 200 Hz, as Brightness. | 0 dB | As Brightness | As Brightness |
| Pan | Where the rank stands, from full left to full right. A rank’s only. | 0 | -100 to +100 | At once |
| Width | The rank’s stereo width: 0% mono, 100% as recorded, 200% twice as wide. A rank’s only. | 100% | 0 to 200% | At once |
| A / B | Swaps between the two complete voicing sets A and B, so a change can be compared with what was there before. | Slot A | A, B | At once |
| Copy to other | Copies the live slot to the other, so that B starts as a variation of A. | At once | ||
| Reset this | Returns the selected rank or pipe to 0 dB and 0 cents. | On the next note | ||
| Reset everything | Clears every adjustment in the live slot. | On the next note | ||
| Save for this organ | Writes the organ’s settings file. | At once | ||
| Status line | Slot A - N rank(s), N pipe(s) adjusted - takes effect on the next note, after Changes N ranks or Changes N pipes when a change reaches more than one, and Plays FILE for one pipe: the file it plays, which names the sound of a noise rank’s pipe. |
Every pipe of the rank
Under the sliders, a desk of upright faders: the rank’s own value at the left (Rank), then a fader per pipe, lowest note first, a gap between octaves, the sharps coloured as on a keyboard. Shows chooses what the desk shows and sets: Level, Tuning, Brightness or Bass. The faders go 24 dB either way, or 50 cents for Tuning. Every pipe is named under its fader; the C’s and the chosen pipe are brighter, the sharps dimmer. A click on a pipe’s fader chooses that pipe above and sets it; a drag across the pipes draws them, each note on the straight line between the two values; a double-click puts one back; the wheel moves one a step. With several ranks chosen, a pipe’s fader moves the pipe at that note in every rank chosen.
EQ, pan and width
A shelf for the treble and one for the bass, for each rank, each division and each pipe. The treble acts above 3 kHz, the bass below 200 Hz, each from -12 to +12 dB on the sliders and from -24 to +24 dB on the pipe faders. A rank’s shelves are added to those of its division, and a pipe’s own to its rank’s, so a division can shape every rank in it, a rank can be shaped on its own, and a pipe that stands out from its neighbours can be brought back in line. While no shelf is set anywhere, the organ sounds as recorded and the filters cost nothing; a pipe without shelves of its own is never filtered on its own. The same holds for pan and width: in the middle and at 100% nothing is processed. These need the effects: Bypass all effects switches them off. A division’s shelves, pan and width are set in Division EQ… on the Outputs tab.
Stored. In the organ file, as voicingadj lines for both slots, voicingdiv lines for the divisions and voicingslot b when slot B is live. The voicing is saved with the organ a moment after each change, and by Save for this organ. A rank number has no meaning in another instrument, so adjustments never carry across organs, except between versions of the same organ through Organ > Copy settings from another organ….
Equalizer
The Organ EQ tab.
A correction for the room and the speakers, applied to the whole organ. The organ as recorded is the reference, so the equaliser is off until it is turned on here. The curve in the upper part of the tab shows the combined response from 20 Hz to 20 kHz on a logarithmic scale, over the live spectrum of the organ; it is drawn orange while the equaliser is on and grey while it is off.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| On | Switches the equaliser on. A band moved turns it on too. | Off | On, off | At once |
| Preset | Sets the EQ to a preset at once and turns it on: the program’s ten under Presets, then the player’s own under Your presets. Reads Edited when the sliders no longer match any preset, and Off while the equaliser is off. | The ten below and the player’s own | At once | |
| Save as preset… | Keeps the EQ as it is now as a preset of the player’s own, under a name, for every organ. | At once | ||
| Update | Stores the EQ as it is now in the player’s preset last chosen. The program’s ten cannot be changed. | At once | ||
| Rename…, Delete | Rename or delete the player’s preset last chosen. A deleted preset’s MIDI mapping goes with it. | At once | ||
| MIDI… | Maps a MIDI button to the preset chosen, or to Voicing EQ: next preset and Voicing EQ: previous preset, which go round the whole list. Learn, MIDI window… and Clear mapping, as on a piston. The mapping is the console’s, the same on every organ. | At once | ||
| Reset | Brings the default EQ back, the one kept with Save as default (off and flat when none is kept), and forgets the EQ saved for this organ. The organ then starts from the default at its next load. | At once | ||
| Save as default | Keeps the EQ as it is now for every organ that has none of its own: a correction for the speakers and the room. Reads Saved or Could not save afterwards, and returns to its label at the next change. | At once | ||
| Save for this organ | Keeps the EQ as it is now with this organ, the On box included, for its next load. Reads Saved or Could not save afterwards. | At once | ||
| Ten band faders | One fader for each band, at 31.5, 63, 125, 250, 500 Hz, 1, 2, 4, 8 and 16 kHz as they come. The lowest and highest bands are shelves; the other eight are peaks. A double-click returns a fader to 0. | 0 dB | -12 to +12 dB in steps of 0.5 | At once |
| Frequency knob (under each band) | The band’s frequency. A double-click returns it to the frequency it came with. A value can be typed, in Hz or with k. | As above | 20 Hz to 20 kHz | At once |
| Width knob (under each band) | For a peak, the width as a Q: more is narrower. For a shelf, the slope as a Q: 1.4 the steepest, less a gentler slope. A double-click returns it to 1.4. | Q 1.4 | Q 0.3 to 8 | At once |
| Gain | The output gain, to make up for what the bands add or take. | 0 dB | -12 to +12 dB in steps of 0.5 | At once |
| Attack and over | The attack’s emphasis: each pipe begins this much louder, or softer when negative, and comes to its own level over the time given. More or less chiff, on the pipes’ own speech; noises and releases start as recorded. Applies whether the EQ is on or off. A double-click returns the level to 0. | 0 dB (off), 40 ms | -12 to +12 dB in steps of 0.5; 5 to 300 ms | From the next note |
Every organ starts from the default EQ, which is off and flat until Save as default keeps another. An organ gets an EQ of its own only from Save for this organ; other saves of the organ file leave it on the default. Changes on the tab are live and are kept only by these buttons. A preset changes the live EQ the same way: Save for this organ or Save as default keeps it.
Presets
The program’s ten presets, in dB for the bands from 31.5 Hz to 16 kHz:
| Preset | 31.5 | 63 | 125 | 250 | 500 | 1k | 2k | 4k | 8k | 16k | Gain | For |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Flat | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | The organ as recorded |
| Brighter | 0 | 0 | 0 | 0 | 0 | 0 | +1 | +2 | +3 | +3 | -1 | Upper harmonics, for a set that sounds dull through the speakers |
| Chiff | 0 | 0 | 0 | 0 | 0 | +1 | +2 | +3 | +2 | +1 | -1.5 | The speaking attack of flue pipes |
| Warm | +1 | +2 | +2 | +1 | 0 | 0 | 0 | -1 | -2 | -3 | -1 | A fuller, rounder sound |
| Less boom | -3 | -3 | -2 | -1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | A room whose bass booms, or speakers close to a wall |
| Small speakers | +5 | +4 | +2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | Speakers that cannot reach the pedal’s fundamentals |
| Softer treble | 0 | 0 | 0 | 0 | 0 | 0 | -1 | -2 | -3 | -3 | 0 | Mixtures and reeds that sound harsh in a small room |
| Clarity | 0 | 0 | -1 | -2 | -2 | 0 | +1 | +1 | 0 | 0 | 0 | Less of the low middle that makes a full registration muddy |
| Quiet listening | +5 | +4 | +2 | 0 | 0 | 0 | 0 | +1 | +2 | +3 | -3 | Playing at a low level, where the ear hears less bass and treble |
| Headphones | +1 | +1 | 0 | 0 | 0 | 0 | -1 | -1.5 | -1 | 0 | 0 | Headphones |
A preset of the player’s own can start from any of them: choose it, move the faders, then Save as preset….
MIDI. A button learned for a preset recalls it, and next preset and previous preset step through the list; the status line names the preset recalled. The mapping is kept with the console mapping (eq-preset <id>, eq-preset-next, eq-preset-prev in the .mpmidi files), so the same buttons work on every organ.
Stored. The default is the key defaulteq <on> <gain> <band 1> ... <band 10> in the global file, written while the default is on or not flat. The organ’s own EQ is the key eq <on> <gain> <band 1> ... <band 10> in the organ file, written whatever it is, off and flat included, once Save for this organ has been pressed. When a band’s frequency or width has moved, both lines go on with the ten frequencies and the ten widths. Reset removes the eq line from the organ file. The attack is the key attack <dB> <ms> in the organ file, absent while it is off. The player’s presets are the keys eqpreset <id> <gain> <band 1> ... <band 10> <name> in the global file, one per preset, numbered from 101, and eqpresetnext <id>, the number the next one gets; a number is never given twice. The program’s ten are numbered 1 to 10 and are not written.
Reverb
The room of this organ: an impulse response, its wet level, and a room of its own for each output past the first, under Other output pairs. The room describes every control and how the response is used.
MIDI
The keyboards of the loaded organ. The console’s inputs, outputs and learned actions are on the MIDI and Console MIDI tabs of Settings. MIDI and consoles explains the channel assignment in depth.
| Control | What it does | Takes effect and storage | Shown in |
|---|---|---|---|
| Keyboards heading, then one row for each playable keyboard of the loaded organ | The keyboard’s name, what plays it, one line per entry (Any device ch 2 keys C2 (36) to C7 (96)), or No MIDI device plays it, and MIDI window…, which opens the dialog for the manual. In a plugin a keyboard with no entry reads Default (channel N). | Both | |
| Shared line | When two keyboards answer one channel, a line Shared – Channel N: name, name names them. One keyboard can play two divisions this way. When a keyboard’s channel already plays another, a line says which channel to choose to play both. | Both | |
| Use as default for all organs | Keeps the channel of each keyboard as the starting channels of every organ that has none saved. | At once. Written to the global file as consolechannel <role> <channel>. | Advanced |
| Clear default | Removes that default. The line beside the buttons returns to No default: each organ starts from its own channels. | At once | Advanced |
| Manual buttons | The controls that bring a manual to another keyboard, one line each, or No controls yet. Learn manual buttons… lists the manuals; choosing one opens its dialog at the Controls tab. | At once. Saved with the organ’s MIDI mapping. | Advanced |
| Save mappings, Clear all mappings | Save mappings writes the organ’s mapping to disk. Clear all mappings removes every binding of the mapping in use. | At once | Advanced |
| From GrandOrgue… | Reads GrandOrgue’s settings file for this organ and brings over its MIDI, registrations, voicing, swells and temperament. The organ must be loaded from its GrandOrgue .organ file. See Bringing an organ over from GrandOrgue. | At once | Both |
When a default exists, the line beside the buttons reads Default for organs with no channels saved: followed by entries such as Pedal 1; Manual 1 2.
Where the organ’s settings are kept
The organ file is organs/<organ key>.mporgan in the data folder (see Settings for the folder on each system). It is plain text; each line is a key, a space and a value, and lines that start with # are ignored. When Masterpiece loads an organ it reads the global file first and the organ file after it, so an organ file overrides the global defaults and a value given on the command line overrides both for that run.
Save for this organ on the Loading, Outputs, Voicing and Organ EQ tabs writes the whole file from the live state. So do the automatic writes that follow a change to the stops and perspectives, the voicing, the faders, the release tail cutoff, the reverb, the combinations window and a few other items. A change on the Loading tab that is only kept for the session can therefore reach the file with one of those writes. The stream share, the release tail cutoff and the organ folder write the file themselves.
| Key | Value | Set by |
|---|---|---|
storage | 16, 20, 24 or 32 (32 is float) | Resident format |
mono | 1 or 0 | Load in mono |
compress | 0 off; 1 medium, 2 light, 3 high, 4 maximum | Lossless compression in memory and its box |
releases | 0 all, 1 longest, 2 shortest, 3 none | Releases |
releaselength | Milliseconds, 0 for whole | Release length |
releasecutoff | dB, 0 for never | Release tails end below |
releaseshortgain | 1 while scaled | Release of a short note |
releasebuffer | The release buffer in seconds, two decimals: 0.00 for automatic, 0.25, 0.50, 1.00, 2.00 | Release buffer |
reverb | <on> <wet> <path> | The Reverb tab |
rate | Hz, 0 as recorded | Sample rate |
sparse | 2 every second note, 3 every third note, 4 half by the sides; absent means every note | Notes loaded |
stream | 1 or 0 | Stream releases from disk |
streamhead | Frames of a release held when streaming | Set by Masterpiece |
streamheadpct | 0, 25, 50 or 75 | The stream box |
preload | 0 whole, 1 up to the loop, or a frame count from an earlier version | Preloaded per sample |
root | A folder, written only when set | Organ folder |
simple, wind, bellows, tremulant, enclosure, voicing, originalpitch | 1 or 0 | The engine switches |
gotremulantpitch, goswellfilter | 1, written only while on | Tremulant pitch, Swell filter |
programcouplers | 1 or 0 | Extra couplers |
basscouplers, bassrange, pedalmanual | The bass and melody couplers, the top key of the bass, the manual the pedal divisional follows | Window > Couplers, the Combinations window |
gain | The master gain (linear) | The volume slider in the top bar |
routing, route <rank> bus <n>, route <rank> group <n> | Where a rank plays | Rank routing… on the Outputs tab |
mix | A mix: its number, its ranks and its name | Put the ticked ranks in a mix… |
livelevel | A fader not at 0 dB: rank, division, group or mix, its number and its value | The mixer’s strips |
voicingadj, voicingdiv, voicingslot | The voicing sets A and B, the divisions and the live slot | The Voicing tab, Division EQ… |
pipedetune, windsway | The unevenness of the pipes’ tuning and of the wind, in cents with one decimal; written only when above zero | Unevenness in the tuning panel |
attack | The attack’s emphasis in dB and its length in ms, as attack 4.0 60; absent while it is off | The Organ EQ tab |
eq | The organ’s own equaliser, written whatever it is, off and flat included; absent while the organ plays the default EQ (defaulteq in the global file) | Save for this organ on the Organ EQ tab |
skipstop, skipperspective, skiprank | One item left out | The Stops, ranks and perspectives tab |
portable | 1 | Keep a portable copy of this organ |
organcache | 1 its own cache, 0 no cache; absent for As in Settings | Sample cache for this organ |
combset | The combination set in use | Set in use in the Combinations window |
licenceconfirmed | 1 | Organ > Licence accepted |
temperament, pitchhz, transpose | The tuning chosen for this organ | The tuning controls |
combwindow, pagewindow | The place of the combinations window and of console pages in windows of their own | The windows themselves |
control, switch, state, stopon | Controls and switches the organ asks to remember, and the registration saved as the starting state | The console |
organname, definition | The organ’s name and its definition file, for the player reading the file | Every write |
The outputs (buses, busir, groups and the other output keys) are kept in the global file. The key cache of an earlier version is ignored: the sample cache is a program setting. When the volume slider moves, only the gain line is rewritten, so the slider writes no other unsaved change to disk.
Settings
The Settings window holds the program and the player’s console: the display mode, the folders, the sample cache and the language, the audio device and the output dynamics, the performance of the audio engine, MIDI, the console’s own messages and buttons, the console display, remote control and diagnostics. This page lists every control on every tab in the order the window shows them: what it does, its default, its range or options, when it takes effect and where it is stored. The topics behind the controls have pages of their own (Audio, room and mixer, MIDI and consoles, Memory, loading and streaming, Playing, Remote control); this page links to them for depth. The settings that belong to one organ (how it is read from disk, which stops load, its outputs, voicing, equaliser and room) are in Organ settings.
Opening the window
The Settings button in the top bar opens a menu with one entry for each tab of the window. Each entry opens the window on that tab.
| Application | Entries |
|---|---|
| Standalone | General…, Audio…, Performance…, MIDI…, Console MIDI…, Console display…, Remote control… |
| VST3, LV2 and AU plugins | General…, Performance…, Console display… |
The Diagnostics tab opens from Help > Diagnostics…. The organ’s own settings are in the Organ menu; the metronome, the tuner, the recorder, the couplers and the split keyboard are in the Window menu; the combination sets are in the Combinations window. See A tour of the window.
The window is titled Settings, opens at 960 x 560 pixels and can be resized. Its tabs, in order: General, Audio, Performance, MIDI, Console MIDI, Console display, Remote control, Diagnostics. Opened from the top bar’s button with no tab named, it shows the tab it was last closed on. In a narrow window each tab name keeps its words whole and a two-word name takes two lines. The ? button at the right end of the tab bar opens this manual at the section of the tab in front. The Esc key closes the window. It has no OK or Cancel button: each control acts when it is changed, and the Takes effect column below says whether that is at once or later.
Note
In the VST3, LV2 and AU plugins the window has no Audio, MIDI, Console MIDI or Remote control tab: the host owns the audio device and the MIDI ports. The output limiter and compressor of the Audio tab are a standalone feature; in a plugin the host’s own effects shape the output.
Display mode
Display mode on the General tab chooses how much the window shows. Simple shows the main settings, with the Quality and Performance presets; Advanced shows every setting. The tables below mark the rows that only Advanced shows. In Simple, Custom is greyed in both preset boxes: a preset is chosen whole, and the settings under it are set one by one in Advanced.
General
| Control | What it does | Default | Range or options | Takes effect | Shown in |
|---|---|---|---|---|---|
| Display mode | How much the Settings and Organ settings windows show. | Simple | Simple, Advanced | At once | Both |
| Reopen the last organ when Masterpiece starts | Loads, at start, the organ that last loaded completely, after an unexpected close too. | Off | On, off | At the next start | Both |
| Click at each 10% while loading | Plays a short tap at each 10% of a load, so a large set can be followed by ear. | Off | On, off | At the next load | Advanced |
| Cache folder | Where the sample cache is written, and where organs unpacked from their archives are kept (Packaged/). A folder that cannot be created is replaced by the default for that load. | Default, the cache folder in the data folder | Choose… opens a folder chooser; Default returns to the default folder | At the next load | Advanced |
| Delete all caches | Deletes the sample cache in the folder shown. Each organ then reads its samples again at its next load. The tooltip gives the size, or No sample cache in this folder. | At once | Advanced | ||
| Package folder | Where the player keeps packages. A composite organ looks here, and in the folders directly in it, for the organs it plays. | None | Choose… opens a folder chooser; Clear removes it | At the next load | Advanced |
| Sample cache | Whether organs keep a cache of their decoded samples on disk, so the next load of the same organ is a read. On: each organ keeps one cache, rebuilt in place when its loading settings change. An organ’s own setting, Sample cache for this organ on Organ settings > Loading, can turn its cache on or off. | On | On, Off | At the next load | Both |
| Save the sample cache | When the cache of a new load is written. Before the organ plays: the first load takes longer and nothing competes with the sound. In silence, while it plays: the organ plays at once and the samples are saved whenever nothing sounds; until they are, the next load reads them again. | Before the organ plays | Before the organ plays, In silence, while it plays | At the next load | Both |
Under them, the language and the look of the text:
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Language | The language of the program’s own words. Each language is named in itself, so a player who cannot read the current language can find theirs. Names of organs, stops and pages stay as the organ gives them. | System default | System default (the language of the system when a translation exists, otherwise English), English, then the translations in this version: Čeština, Deutsch, Español, Français, Italiano, Nederlands, Polski | At the next start |
| Text size | Scales the text and the controls of every window. | 100 % | 100 %, 115 %, 130 %, 150 %, 175 %, 200 % | At once on computers |
| Font | The font of the program’s words. | The program’s own | The program’s own and every font of the system | At the next start |
The note under them reads Language and font apply at the next start. A string that a translation lacks appears in English.
Stored. In the global file: displaymode, reopenlastorgan, loadticks, cachedir, packagedir, samplecache and cachewhileplaying; language <code> (en, cs, de, es, fr, it, nl or pl; absent for System default), textsize (absent at 100) and textfont (absent for the program’s own).
Audio
The upper part of the tab is the device selector of the audio library. It chooses where Masterpiece sends sound. Its controls are described here generically; their labels and the choices offered depend on the system and the driver. The MIDI inputs and outputs are on the MIDI tab.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Device type | The driver family, on systems that offer more than one. | The system default | The families the system reports | At once |
| Output device | The sound device. | The system default output | The devices of that family | At once |
| Output channels | Which outputs of the device carry sound. | As the device opens | Up to 64 output channels | At once |
| Sample rate | The rate the device runs at. | The device’s own rate on a first start; a saved setup keeps its rate | The rates the device reports | At once |
| Buffer size | The block the device processes at a time. It sets the delay between a key and its sound. | The size nearest 10 ms on a first start | The sizes the device reports | At once |
| Test | Plays a test tone through the selected channels. | At once |
Below the selector, a line reads Note delay: N ms (buffer N ms, output N ms). It shows the whole delay from a key to the speaker for the open device.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Keep portable speakers awake | Plays a 20 Hz tone, too low and too quiet to hear under the organ, so that a battery speaker does not switch itself off during silence and swallow the first notes. | Off | On, off | At once |
| Level slider (beside the box) | The level of the tone. Raise it if the speaker still sleeps; lower it if the tone is audible. Active while the box is ticked. | -60 dB when first switched on | -80 to -40 dB in steps of 1 dB | At once |
Which device channels each output of the organ plays on is set in Organ settings > Outputs.
Output dynamics
Under them, the compressor and the peak limiter on the output, after the master fader. Both are off until they are switched on, and while off the engine does not call them. A graph beside the compressor draws its transfer curve: input level across, output level up, in dBFS. Audio, room and mixer describes how they work.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Output preset | Sets the compressor and the limiter together. Reads Own settings when the controls match no preset. | Both off | Both off, Limiter only, Gentle, Small speakers, Laptop speakers, Headphones, quiet practice | At once |
| Output compressor | Brings the loud passages towards the quiet ones; the make-up gain lifts the whole. It works ahead of the limiter. | Off | On, off | At once |
| Threshold | The level the compression begins at. | -18 dBFS | -40 to 0 dBFS in steps of 0.5 | At once |
| Ratio | How much a level over the threshold is held down: at 3:1, 3 dB over comes out 1 dB over. | 3:1 | 1.5:1 to 10:1 in steps of 0.1 | At once |
| Attack | How long the gain takes to come down. A longer one lets the speech of the pipes through. | 10 ms | 1 to 100 ms | At once |
| Release | How long the gain takes to come back. | 200 ms | 50 to 1000 ms in steps of 10 | At once |
| Make-up gain | Lifts the whole output after the compression. | 0 dB | 0 to 18 dB in steps of 0.5 | At once |
| Bass left out | The compressor does not hear the bass below this pitch, so a 32’ or a full pedal leaves the manuals at their level. The bass itself sounds in full. | Below 120 Hz | None, Below 80 Hz, Below 120 Hz, Below 200 Hz | At once |
| Reduction readout | Reduction N dB: how far the compressor holds the level down now, before the make-up gain. Shown while the compressor is on. | Ten times a second | ||
| Output limiter | Holds the output below the ceiling. It adds no delay. | Off | On, off | At once |
| Ceiling | The level the output is held under. | -1 dBFS | -12 to -0.1 dBFS in steps of 0.1 | At once |
| Release | How long the limiter’s gain takes to come back after a peak. | 100 ms | 50 to 1000 ms in steps of 10 | At once |
The sliders and the boxes under the compressor are greyed while it is off. The presets:
| Preset | Compressor | Threshold | Ratio | Attack | Release | Make-up | Bass left out | Limiter | Ceiling | Limiter release |
|---|---|---|---|---|---|---|---|---|---|---|
| Both off | Off | Off | ||||||||
| Limiter only | Off | On | -1 dBFS | 100 ms | ||||||
| Gentle | On | -18 dBFS | 2:1 | 20 ms | 400 ms | 4 dB | Below 120 Hz | On | -1 dBFS | 100 ms |
| Small speakers | On | -24 dBFS | 3:1 | 10 ms | 250 ms | 8 dB | Below 120 Hz | On | -1 dBFS | 100 ms |
| Laptop speakers | On | -30 dBFS | 4:1 | 5 ms | 200 ms | 12 dB | Below 200 Hz | On | -1 dBFS | 80 ms |
| Headphones, quiet practice | On | -30 dBFS | 2.5:1 | 10 ms | 300 ms | 10 dB | Below 80 Hz | On | -3 dBFS | 150 ms |
Stored. The device, rate, buffer size and channel choices are written to audio.xml when Masterpiece quits. A saved setup that no longer matches the hardware, or that opens with no live output, is replaced by the defaults. A device that opens below 44.1 kHz is moved to 48 kHz, or to 44.1 kHz where 48 kHz is unavailable. The speaker setting is the key speakerkeepalive in the global file, written only while it is on. The limiter is the key limiter <on> <ceiling> <release> and the compressor the key compressor <on> <threshold> <ratio> <attack> <release> <make-up> <Hz>, both in the global file.
Audio, room and mixer explains choosing a buffer size and a driver.
Performance
How the audio engine uses the processor, and how many pipes sound at once. Every setting on this tab holds for every organ.
| Control | What it does | Default | Range or options | Takes effect | Shown in |
|---|---|---|---|---|---|
| Performance | Sets the audio engine’s threads and the number of voices together. Start with Balanced. If the sound crackles in a full chord, move down the list until it plays clean. Steady helps when other programs run beside the organ. Reads Custom when the four settings below match no preset. | Balanced (default): every core, the default number of voices | The presets below, and Custom | At once | Both |
| Faster audio engine | Renders several samples at a time with the processor’s vector unit. The sound is the same, with more polyphony to spare. The label reads Faster audio engine: using AVX2 (or SSE2, NEON) when the unit is found. | On | On, off | At once | Advanced |
| Real-time render threads | Makes the threads that render the organ real-time threads, so the system runs them first, on the fastest cores: MMCSS on Windows, SCHED_FIFO or rtkit on Linux, the audio workgroup on macOS. The label says what it found: Real-time render threads: using …. Hidden where the system offers none. | On | On, off | At once | Advanced |
| Render on every logical processor | Renders the organ on every logical processor, with none kept for the interface, disk streaming and the system: more polyphony on a machine doing nothing else. Off: every processor but one, eight at most. | On | On, off | At once | Advanced |
| Polyphony limit | The most pipes that sound at once. Past it, a new pipe takes the place of one that is dying away, or of the quietest. Each choice shows the memory its voices take, which is larger with release streaming on. A lower number keeps a small computer from falling behind on a full organ. A number can be typed in the box. | Default: N voices (N MB): 725 voices for each logical processor, at least 1,536, at most 16,384; 1,536 while releases stream | 256, 512, 768, 1024, 2048, 3072, 4096, 6144, 8192, 10240 voices, or a number typed, from 64 to 16,384 | At once | Advanced |
| Memory limit for samples | A load that would take more than this stops and says so, and loads nothing. The voice pool counts toward the figure. | Default: 80% of memory (N GB), with at least 512 MB | Default: 80% of memory, 50%, 60%, 70% and 90% of memory, each with its size; a size set in the file shows as itself | At the next load | Advanced |
The presets:
| Preset | Faster audio engine | Real-time render threads | Every logical processor | Polyphony limit |
|---|---|---|---|---|
| Most voices: every processor core, 8192 voices | On | On | On | 8192 |
| Balanced (default): every core, the default number of voices | On | On | On | Default |
| Steady: one core left free for the system and other programs | On | On | Off | Default |
| Fewer voices: 1024 | On | On | Off | 1024 |
| Fewest voices: 512, for a Raspberry Pi or a tablet | On | On | Off | 512 |
Stored. In the global file: fasterengine, realtimethreads and everyprocessor, each always written as 1 or 0; polyphony and memlimit, written only when set. Audio, room and mixer describes the engine and the threads.
MIDI
The console’s MIDI: the inputs and the outputs, the default channels and devices, and how stops and keys answer and echo. The keyboards of the loaded organ are on the MIDI tab of Organ settings; the console’s own buttons and messages are on the Console MIDI tab. MIDI and consoles explains the channel assignment and learning in depth.
Inputs, channels and outputs
| Control | What it does | Default | Range or options | Takes effect and storage | Shown in |
|---|---|---|---|---|---|
| MIDI inputs | One tick box per MIDI input device, plus inputs Masterpiece opens itself (the JACK MIDI port on Linux, the port made by --virtual-midi). A device another program holds is shown as NAME - in use by another program; opened when it is free and stays ticked; Masterpiece opens it when it is released. | All inputs ticked | Each input on or off | At once. Unticked inputs are kept in the global file as midiinputoff <name>. | Both |
| Bluetooth MIDI… | Opens the system’s pairing dialog for a Bluetooth MIDI device. Shown where the system offers it. | At once | Both | ||
| MIDI outputs | A tick box per output port, beside the inputs (under them in a narrow window): the ports that light a console’s drawstops and receive the console display and the messages of the Console MIDI tab. Ticked ports stay listed while disconnected. Reads None when the system has no output. | None ticked | Each output port of the system | At once. Global file key midioutput <name>, a line per ticked port. | Both |
| Default channels | One box for the pedal and one for each of manuals 1 to 5: the channel each keyboard of an organ comes in on, for organs with no channels saved for them, each with a box for the device it comes from (Any device: every device sending on the channel plays it). An organ’s own choice keeps it. | - (none), Any device | -, 1 to 16; Any device and each device known | At the next organ load. Global file key consolechannel <role> <channel> [<device>], with role 0 for the pedal and 1 onward for the manuals. | Both |
Note
The processor holds the MIDI output ports, so lamps, key echo and the console display work with any window open or none. The ports open again at the next start. A port that is not plugged in keeps its name and its tick.
Answering and echoing
| Control | What it does | Default | Range or options | Takes effect and storage | Shown in |
|---|---|---|---|---|---|
| Send stop changes on the MIDI output | Sends each stop change on the MIDI outputs, on the message the stop was learned on, so that lit drawstops or a pad controller follow the screen. Off by default because a console that echoes what it just received can latch itself into a loop. | Off | On, off | At once. Global file key midifeedback 1, written only while on. | Both |
| Lit, Unlit | The velocity sent to a button when its stop comes on (on a pad grid it picks the colour), and what it is sent when the stop goes off: a Note Off, or a velocity for a dimmer colour. | 127; Note Off | 1 to 127; Note Off, 0 to 127 | At once. Global file key midifeedbackvalues <lit> <unlit>, -1 for Note Off, written when not the defaults. | Both |
| Send events leave out a console’s own message | For a console that lights its own lamps: a stop moved from the console leaves out the Send event that repeats the same message. | Off | On, off | At once. Global file key midisendsholdecho 1. | Both |
| Sustain pedal: controller 64 holds the notes let go | For directing a choir. While controller 64 is held down, the keys you let go keep sounding, and they stop when it is lifted. The controller works on any channel. A controller 64 learned for something else keeps doing this. | Off | On, off | At once. Global file key sustainpedal, written only while on. | Both |
| General Cancel also puts the keyboards back on their own manuals | After controls have moved a keyboard to another manual, General Cancel returns every keyboard to the manual it started on. | Off | On, off | At once. Global file key cancelresetskeyboards, written only while on. | Advanced |
| Stop changes leave the notes already held alone | Off, a stop or coupler moved while keys are held sounds or stops on those notes at once, as on a console with electric action. On, the held notes keep the pipes they started with until their keys are let go, and only keys pressed afterwards play the new registration. | Off | On, off | At once. Global file key stopsleaveheldnotes, written only while on. | Advanced |
| Debounce: when learning, a key counts once held a quarter second | For a console whose contacts send stray notes: a shorter note is not learned. Controllers and program changes are learned at once. Leave it off for pistons that send only a short note. | Off | On, off | At once. Global file key learnnoisefilter, written only while on. | Advanced |
| Archive everything played | Records every MIDI message played into files of their own, one for each stretch of playing. Three boxes beside it: ends after 10 s of silence, 30 s, 1 min, 2 min, 5 min or 10 min (default 30 s); up to 100 MB, 250 MB, 500 MB, 1 GB, 2 GB or 5 GB (default 500 MB); kept 7 days, 30, 90 or 365 days (default 90). Each stretch is a standard MIDI file in Documents/Masterpiece/Recordings/Archive, by date. The oldest files go first when the folder passes its size or age. | Off | On, off | At once. Global file keys archive, archivesilence, archivemb, archivedays. | Advanced |
Under them, Save mappings writes the mapping to disk and Clear all mappings removes every binding of the mapping in use; the empty mapping reaches disk with Save mappings, or with the next learned binding or channel change. The status reads MIDI mappings: N, and adds LEARNING: move a control now while a learn waits. Both buttons are shown in Advanced.
Stored. The mapping is written to the user’s data folder, and the sample set stays untouched. Bindings for one organ’s stops, shoes, manuals and divisionals go to that organ’s .mpmidi file. Bindings for the console’s own actions (the sequencer, generals, page, layout, transpose, temperament, recorder and power buttons) go to midi/console.mpmidi and apply to every organ. The files are rewritten after each learned binding.
Console MIDI
The console’s own buttons, which the organ file never mentions, and the messages Masterpiece sends to the console. Each message goes out on the ports ticked under MIDI outputs. Each learn button opens a menu: the mapping it has (or Not mapped), Learn, Clear and MIDI window…. After Learn, press or move the control on the console. The button is orange while it waits and green once it is mapped. MIDI and consoles covers right-click learning on the console itself; the sequencer and the pistons are learned in the Combinations window, the temperament and transposer buttons in the tuning panel, and the recorder’s buttons in the Recorder.
| Row | Controls | What each does | Shown in |
|---|---|---|---|
| Power | Learn quit, Learn power off | Quit Masterpiece, or quit and shut the computer down, for a console with no screen. Obeyed once Masterpiece has run two minutes, and only on a button held for three seconds; a button whose message has no release is pressed twice within two seconds. Masterpiece saves before it quits. Power off also needs Allow quitting Masterpiece and shutting the computer down on the Remote control tab; while it is off a line under the row says so. | Both |
| Ready lamp | Off, Note or Controller; a channel 1 to 16; a number 0 to 127 | A message that lights a lamp once the organ is ready, blinks once a second while one loads and four times a second while a quit or power-off button is held, and goes out with no organ. | Both |
| Lit: hex messages, Dark: hex messages | MIDI messages in hex sent when the lamp lights and when it goes dark, as well as the one above; several are separated by commas (90 3C 7F, B0 14 7F). | Both | |
| On organ load | Hex messages, Send now | Sent each time an organ loads, before any stop moves or lamp lights: for a controller that needs a mode set first, such as a pad grid’s programmer layout. Empty sends nothing. Send now sends them at once, to try them. | Both |
| On organ unload | Hex messages, Send now | Sent when an organ unloads: before the next organ loads, and when the program quits. For a relay that turns the speakers off. | Both |
| Console | Learn page -, Learn page +, Learn console size | Previous console page, next console page, next console layout. | Advanced |
| Learn panel, Learn keyboard, Learn combinations | Show the stop-list panel, the on-screen keyboard and the combinations window. | Advanced | |
| Score app | Learn score page -, Learn score page +, then Sends: message, channel and two numbers | A piston learned here turns the page in a score app on a tablet or another program: it sends the message chosen (Note, Controller or Program change) on the MIDI outputs, the first number for the next page and the second for the page before. Default: notes 127 and 126 on channel 16. Teach the same message to the score app. The same buttons turn the page of the program’s own score panel. | Both |
A message field that does not read is outlined in red and keeps its last good value.
Stored. In the global file: readylamp note|cc <channel> <number>, readylamplit, readylampdark, loadmessage, unloadmessage and scorepage <kind> <channel> <next> <before>. The learned buttons go to midi/console.mpmidi.
Console display
This tab drives the text display on a console’s jamb, such as a 32-character panel, by system exclusive messages through the MIDI outputs. It drives external hardware only. The framing bytes belong to the display hardware, so they are typed in here. Tick a port under MIDI outputs on the MIDI tab first: the messages leave through the ports that light the drawstops.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Drive a console display | Switches the display on. | Off | On, off | At once |
| Display number | The number of the display on the console, sent as one byte. | 0 | 0 to 15 | At once |
| Characters per line | The width of the display. | 32 | 16, 20, 32, 40 | At once |
| Sys-ex prefix (hex) | The bytes that follow the opening system exclusive byte and introduce a message to this console. 7D is the identifier the MIDI specification reserves for non-commercial use. A prefix that cannot be read falls back to 7D. | 7D | One to eight bytes of 00 to 7F, in hexadecimal, separated by spaces; the field takes up to 23 characters | When the field loses focus or Return is pressed |
| Send to display | Sends every line again, for a console connected after the organ loaded. | At once | ||
| Lines (four boxes) | The content of line 1 to line 4. | Organ, Temperament, Pitch, Crescendo | (blank), Organ, Temperament, Pitch, Transpose, Stops drawn, Crescendo, Combination set | At once |
| What the display reads | A preview of the lines as the hardware shows them, between bars that mark where the panel ends. A value longer than the width is cut and a shorter one is padded with spaces. | Twice a second |
The fields show: the organ’s name; the temperament’s name; the pitch as A=440.0 Hz; the transposition as +2, 0 or -3; the number of stops drawn; the crescendo step (0 with the shoe closed); and the name of the combination set ((default) for the default set). A message is F0, the prefix, the display number, the line number (0 to 3), the text as 7-bit ASCII, F7. Accented Latin letters lose their accents; other characters above 7F become ?. Only lines whose text changed since the last send go out, checked four times a second.
Stored. In the global file as lcd <on> <display> <width> <line1> <line2> <line3> <line4> <prefix>: <on> is 1 or 0, <display> the display number, <width> the characters per line, each <line> the number of the choice in its box (1 for (blank) to 8 for Combination set, in the order of the table above) and <prefix> the hexadecimal bytes, which run to the end of the line. The setup is read again at the next start. The main window sends the display four times a second whether or not this tab is open, so the display follows the organ with any window open or none.
Remote control
The web console and the control API, for a tablet or another program on the same network. Present in the standalone application. Remote control describes the web console, the API, SysEx and OSC in depth.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Serve the web console and the control API on this network | Starts the web server. | Off | On, off | At once |
| Port | The HTTP port of the web console and the API. | 8080 | A port number | At once |
| Token | A word every request that changes something must carry. | Empty | Text | At once |
| Allow changes from the network | Lets the network draw stops and move controls. Off, the network can only read: the stops drawn, the levels, the organ loaded. | On | On, off | At once |
| Allow quitting Masterpiece and shutting the computer down | Lets the API quit the program and power the computer off, and the power-off button of the Console MIDI tab work. | Off | On, off | At once |
| This computer only | Serves the page, the API and OSC on 127.0.0.1 only. | Off | On, off | At once |
| Answer the same requests over MIDI (System Exclusive) | The same protocol over system exclusive messages, on the MIDI inputs and the MIDI outputs, under a unit number. | Off, unit 0 | On, off; unit 0 to 126 | At once |
| Answer the same requests over OSC | The same protocol over OSC, on a UDP port. | Off, port 9000 | On, off; a port number | At once |
| Open in the browser | Opens the web console in the system’s browser. | At once |
Stored. In the global file: api, apiport, apiwrite (0 while changes are refused), apitoken, apipoweroff, apilocal, apisysex, apisysexunit, apiosc, apioscport.
Diagnostics
Masterpiece always keeps a log of the session and the previous one beside it. The log and the report on this tab are what a bug report needs. The tab opens from Help > Diagnostics…. The text at the top of the tab gives the log’s path, or No log is being written.
| Control | What it does | Default | Takes effect |
|---|---|---|---|
| Open the log folder | Shows the log file in the system’s file manager. Absent on phones and tablets. | At once | |
| Run the checks | Tests the folders Masterpiece writes to, the audio, the organ and its files, and prints the result in the box below. | At once | |
| Copy the report | Copies the checks (run first if the box is empty) and the last 200 lines of the log to the clipboard, to paste into a bug report. | At once | |
| Send the report and the log | Shares the report, the log and the previous log through the share sheet. Present only on phones and tablets. | At once | |
| Log every MIDI message and what became of it | The same as --log-midi: which manual, stop or control each message reached and, when nothing sounded, why. For keys or pedals that do nothing, or the wrong thing. | Off | At once; lasts until Masterpiece closes |
| Log every key release: the release played, its length and start | The same as --log-releases: the release chosen for each key release, its length and where it started. | Off | At once; lasts until Masterpiece closes |
| Check for updates daily | Reads the newest version’s number from GitHub, a few bytes, once a day, and offers the download page when it is newer. Help > Check for updates… checks at once. See Files and folders. | On | At the next start; updatecheck in the global file |
The report box is read-only and shows Run the checks to see what Masterpiece finds on this device. until the checks have run. See Command line for the log and its options.
What the checks test
Each line of the report starts with ok for a passed test, FAILED for a failed one, or spaces for a fact with nothing to pass.
| Line | What it tests |
|---|---|
| Header | The Masterpiece version, the operating system and the device; the number of processors and the memory in MB; the time of the check. Facts only. |
| Settings folder | The user’s data folder. The check creates it if it is missing, writes a small file .masterpiece-check, reads it back and deletes it. It reports the path, whether it can be written and the free space in GB. |
| Sample cache | The same write test for the cache folder in use, with the free space. |
| Cache folder chosen | Appears as FAILED when the folder chosen under Cache folder cannot be used and the usual one is in use instead. |
| Temporary folder | The same write test for the system’s temporary folder. |
| Cache files | The number and total size of the .mpcache files in the cache folder. A fact. |
| Organs unpacked from their archives | The number of folders in Packaged, where package archives are unpacked. A fact. |
| Log | Passes when the log file exists; reports its path and size in KB. Fails when no log is being written. |
| Audio | Passes when the audio device runs; reports its rate and block size in frames. Fails with Audio: not running. |
| MIDI inputs | The names of the MIDI inputs the system lists, or none. A fact. |
| Organ | When an organ is loaded: passes when its definition file still exists. Without an organ the line reads No organ is loaded. |
| The organ’s definition | Passes when the definition file can be read. |
| Organ folder | Passes when the folder that holds the organ’s installation packages exists. |
| Organ counts | The number of ranks, stops and console pages. A fact. |
| Samples kept as | The resident format, the memory limit (not set for the default) and the number of stream underruns. A fact. |
| Impulse response | The name of the loaded impulse response, or none. A fact. |
| Wind and tremulants | The state of the wind model and the tremulants of the loaded organ. |
| Documents lent by the Files app | On iPhone and iPad: the number of documents the Files app has lent, with a pass or fail for each according to whether it can be read now. |
Stored. The log is masterpiece.log in the data folder, and the run before it is masterpiece.previous.log. The two logging switches return to off at every start.
Back up and restore
The File menu holds three items for the settings, on computers. Organ > Copy settings from another organ… holds the fourth.
| Item | What it does |
|---|---|
| Export organ settings… | Writes a zip file holding the loaded organ’s own settings: its MIDI map, its combinations, its split keyboard and its organ settings. |
| Export settings… | Writes a zip file holding every setting, the program’s own and each organ’s. The audio device stays with the computer. |
| Import settings… | Reads a zip file written by one of the export items and puts the settings back. A file that is not one of ours is refused, and nothing changes. |
| Copy settings from another organ… | Takes the MIDI map, the combinations, or the mixer and voicing from another organ, each on its own toggle. |
Every import and every copy saves what was there first, in the backups folder, and says where. The export and import dialogs start in the folder used last.
The mixer and voicing of one organ mean something only between versions of the same organ, a demo and the full set: the ids of stops, ranks and pipes must be the same. The dialog says how many of the ranks and pipes the other organ names are in this one.
Where settings are kept
Masterpiece keeps everything in text files in its data folder.
| System | Data folder |
|---|---|
| Windows | %APPDATA%\Masterpiece |
| macOS | ~/Library/Masterpiece |
| Linux | ~/.config/Masterpiece |
The sample sets are left untouched. Files and folders lists the whole folder.
The global file
The global file is settings.mpglobal in the data folder. It holds what belongs to the program and the machine, and the defaults an organ starts from before its own file is applied. The file is plain text. The first line is the comment # Masterpiece defaults for organs that have no settings of their own; every other line is a key, a space and a value, and the value is taken whole so that a path may contain spaces. Lines that start with # are ignored. Masterpiece rewrites the whole file at each change, so edit it only while Masterpiece is closed.
| Key | Value | Written by |
|---|---|---|
reopenlastorgan | 1 or 0. Always written. | Reopen the last organ when Masterpiece starts on the General tab |
updatecheck | 0 when the update check is off; absent while it is on. | Check for updates daily on the Diagnostics tab |
updatecheckedat | Seconds since 1970 of the last update check. | The update check |
api, apiport, apiwrite, apitoken, apipoweroff, apilocal, apisysex, apisysexunit, apiosc, apioscport | The remote control settings. | The Remote control tab |
readylamp, readylamplit, readylampdark, loadmessage, unloadmessage | The messages to the console. | The Console MIDI tab |
speakerkeepalive | The level in dB, -80 to -40. Written only while on. | Keep portable speakers awake |
memlimit | The sample memory limit in MB. Written only when set. | Memory limit for samples on the Performance tab |
defaulteq | <on> <gain> <band 1> ... <band 10>, and the frequencies and widths when a band has moved. Written only while the default EQ is on or not flat. | Save as default on the Organ EQ tab of Organ settings |
polyphony | The voice limit. Written only when set. | Polyphony limit on the Performance tab |
running | The path of the organ being loaded or played. Removed at a clean exit; one still present at the next start means the last session ended unexpectedly, which the log records. | The crash guard |
language, textsize, textfont | The language code, the text size in percent and the font. Written only when not the default. | The General tab |
metronome | <bpm> <beats> <level>, then the sound: the tempo, the beats per bar, the level. | The Metronome window |
limiter | <on> <ceilingDb> <releaseMs>. | Output limiter on the Audio tab |
compressor | <on> <thresholdDb> <ratio> <attackMs> <releaseMs> <makeupDb> <Hz>. | Output compressor on the Audio tab |
loadticks | 1 or 0. Always written. | Click at each 10% while loading on the General tab |
cancelresetskeyboards | 1. Written only while on. | General Cancel also puts the keyboards back on their own manuals |
stopsleaveheldnotes | 1. Written only while on. | Stop changes leave the notes already held alone |
sustainpedal | 1. Written only while on. | Sustain pedal: controller 64 holds the notes let go |
pedalcombinationscoupled | 1. Written only while on. | Pedal with in the combinations window |
learnnoisefilter | 1. Written only while on. | Debounce: when learning, a key counts once held a quarter second |
archive, archivesilence, archivemb, archivedays | The archive switch, and its silence in seconds, size in MB and age in days, each written when it differs from the default. | Archive everything played |
combinationsontop, combinationsview | 1 while on top; the view, 1 combinations only, 2 sequencer only. Written only when not the default. | Always on top and the view box in the combinations window |
cachewhileplaying | 1. Written only while on. | Save the sample cache set to In silence, while it plays |
samplecache | 0 off; on otherwise. Always written. | Sample cache on the General tab |
setoffafterstore | 1. Written only while on. | Set turns off after storing in the combinations window |
pistonsleavebass | 1. Written only while on. | Pistons leave the bass coupler in the combinations window |
pistonsstaylit | 1. Written only while on. | Pistons stay lit until another is pressed in the combinations window |
stepperlevels, levelsize, levelsfromzero | The sequencer as levels of generals, the generals in a level, and levels numbered from 0. Written only when not the default. | The sequencer’s box in the combinations window |
showkeys | 0. Written only while off. | View > Highlight played keys |
smallpagesfill | 1. Written only while on. | View > Scale small pages to fit |
rememberwindows | 0. Written only while off. | View > Remember window positions |
stoplistsize, pistonsize, bigframenumber | The sizes of the stop list and the pistons, 1 Large or 2 Larger, and the large frame number. Written only when not the default. | View > Stop list size, Piston size, Large frame number |
narrowstrips | 1. Written only while on. | Narrow strips on the Outputs tab of Organ settings |
displaymode | simple or professional. Always written. | Display mode on the General tab (professional is Advanced) |
fasterengine, realtimethreads, everyprocessor | 1 or 0. Always written. | The Performance tab |
midiinputoff | A device name. One line per unticked input. | MIDI inputs |
midioutput | The name of a ticked MIDI output port, a line each. A port that is not plugged in keeps its name. | MIDI outputs |
scorepage | <kind> <channel> <next> <before>. | Score app on the Console MIDI tab |
midifeedback, midifeedbackvalues, midisendsholdecho | The echo switch, its lit and unlit values, and the leave-out switch. | The MIDI tab |
learnalsosends | 1. Written only while on. | The learn option of an object’s MIDI window |
consolechannel | A role (0 for the pedal, 1 onward for the manuals), a channel 1 to 16 and, when one is chosen, a device. | Default channels on the MIDI tab, and Use as default for all organs in Organ settings |
eqpreset, eqpresetnext | The player’s EQ presets. | Save as preset… on the Organ EQ tab of Organ settings |
library | A folder holding a sample library (an OrganInstallationPackages folder beside it). Added when an organ is loaded from such a folder, and for the standard library folder of a Hauptwerk-format installation when it exists. | Opening organs |
lcd | <on> <display> <width> <line1> <line2> <line3> <line4> <prefix>. The prefix is the hexadecimal bytes, separated by spaces. | The Console display tab |
cachedir | The cache folder, which also holds Packaged/. Absent for the default. | Cache folder on the General tab |
organsfolder, organsfolderconfirmed | The folder organ packages are installed into, and whether the player has confirmed it. | File > Install organ package… |
packagedir | The package folder. Absent for none. | Package folder on the General tab |
backupdir | The folder the settings exports and imports last used. | Export settings…, Import settings… |
lastorgan | The definition of the organ opened last. | Opening an organ |
openfolder | The folder the last organ was chosen from. | The Open window |
dialogfolder | A kind and a folder: ir, midi, recording or scala, then the folder where that kind of file dialog was last used. | The file dialogs of Load impulse response…, the recorder and the tuning panel |
favourite, favouriteuse, favouritesort | <kind> <slot> <name> | <target>: the kind is organ, temperament or combinationset; how often and when each was used; the order of the list. | The favourites in the Open window and the tuning panel |
favouriteoffered | An organ’s definition, offered once as a favourite on Quit. | The question Add to the favourites? |
lasttab | <tab> | <definition>: the page, panel or score tab last chosen on that organ. | The page tabs |
buses, busname, defaultroute, busir, buseq, busfilt, livepair, groups | The outputs, the same for every organ: their device channels and sends, names, the default destination, rooms, EQ, crossovers, faders and speaker groups. | Organ settings > Outputs, at once |
Save as default on the Loading tab of Organ settings adds the organ-level keys to the global file as well, so that an organ without a file of its own starts from them: storage, mono, compress, programcouplers, releases, releaselength, releasecutoff, reverb, rate, stream, streamhead, streamheadpct, releasebuffer, preload, root, the engine switches (simple, wind, bellows, tremulant, enclosure, voicing, originalpitch) and gain. These are described under Where the organ’s settings are kept. The outputs are always in the global file and need no Save as default. An organ that has a file of its own takes the values from that file. The obsolete keys reopenlast, and cache in an organ file, are ignored when read.
Other files
| File | Content |
|---|---|
organs/<organ key>.mporgan | The settings of one organ: Organ settings. |
midi/<organ key>.mpmidi | The MIDI mapping of one organ. |
midi/console.mpmidi | The console’s own actions, valid for every organ. |
combinations/<organ key>.mpcomb and combinations/<organ key>.<set>.mpcomb | The combination sets of one organ. |
split/<organ key>.mpsplit | The split keyboard of one organ (Split keyboard). |
audio.xml | The audio device setup, written when Masterpiece quits. |
window.txt | The place and size of the main window. |
cache/ | The sample cache, unless Cache folder names another. |
masterpiece.log, masterpiece.previous.log | The logs of this session and the one before. |
The organ key names a file after the organ and keeps the file when the sample set moves or is renamed. It is the organ’s name reduced to letters and digits (spaces, hyphens and underscores become hyphens, at most 48 characters), a hyphen, and the unique organ identifier of the definition. A definition without an identifier uses p and 16 hexadecimal digits that are a hash of its path.
Remote control and the web console
Masterpiece can serve a page that any browser on the same network opens: a phone or a tablet on the music desk draws stops, presses pistons and moves the shoes, and every change made at the organ shows on it at once. The same server answers the control API, which consoles with a network connection, scripts and other programs use to read and change everything the page can.
Available in the standalone program on Windows, macOS, Linux and the Raspberry Pi. Plugins and the phone and tablet versions do not serve it.
Turning it on
Settings > Remote control… opens the Remote control tab of the settings window:
| Control | What it does | Default |
|---|---|---|
| Serve the web console and the control API on this network | Starts the server; off stops it. Kept for the next start. | Off |
| Allow changes from the network | Off, the network can only read: the stops drawn, the levels, the organ loaded. | On |
| Allow quitting Masterpiece and shutting the computer down | The quit and powerOff commands, for a console with no screen. Masterpiece saves and quits; powerOff then shuts the computer down a few seconds later. Both are refused in the first two minutes after Masterpiece starts, so a faulty button cannot shut the computer down at every start. | Off |
| This computer only | The page, the API and OSC answer at 127.0.0.1 only: a browser or a program on this computer reaches them, and no other device on the network does. Windows asks for no firewall rule. | Off |
| Port | The TCP port of the page and the API. Another program already using it shows Not running with the reason. | 8080 |
| Answer the same requests over MIDI (System Exclusive) | For a console with a MIDI cable and no network: requests are read on the MIDI inputs, and replies and changes go out on the console’s MIDI output, chosen on the MIDI tab. | Off |
| Answer the same requests over OSC | For control surfaces and apps that speak OSC, such as TouchOSC and Open Stage Control, on the UDP port beside it. | Off, port 9000 |
| Token | When set, every change needs it. Reading needs none. | Empty |
| Open in the browser | Opens the page on this computer. |
Below the switches the tab lists the addresses to open on the network, such as http://192.168.0.20:8080/. On Windows the firewall asks once whether Masterpiece may accept connections; allow it for private networks. With This computer only the tab shows http://127.0.0.1:8080/, and the firewall does not ask.
While the server is on, anyone on the network can open the page. Without a token, anyone can also change the registration from it. A token keeps changes to those who know it: the page asks for it under Access, at the bottom, and keeps it in that browser.
The web console
The page builds itself from the organ loaded. View, in the top bar, chooses what it shows: Panels, the default, or one of the organ’s own console pages.
Panels
- One panel per division, with its stops, couplers and tremulants as lit buttons. Stops a demo does not ship are greyed out and cannot be drawn. A stop drawn on two panels of the organ, or worked through a gate, is listed once.
- The organ’s pistons, the switches of the organ file that fire and release: those of no division first, then each division’s divisional pistons under the division’s name.
- Shoes and controls: the swell shoes, the crescendo and the organ’s other continuous controls as sliders.
- Levels: a live fader for each division and each output, heard at once.
- Tremulants, enclosures, wind and room: the tremulants as buttons, each swell box’s opening, the wind pressures in a folded list headed with the number of reservoirs and chests and updated twice a second, and Room with its wet share.
- Combinations: the player’s generals with 0 (general cancel) and Set, the divisionals of each division under its name, and the sequencer’s frame, from
000, with its first, previous, next and last buttons. - Every switch and control, folded: every switch, control and rank level of the organ, its internal ones too, with a filter by name or number, and the MIDI channel of each keyboard.
- The top bar: Organ, View, the volume, transpose, the temperament, the EQ preset, Record and Panic. Organ lists the favourite organs of the Open window by name, and choosing one loads it; with no organ loaded the page shows a button per favourite instead, or Favourite organs added in the Open window appear here. Record has Audio, the organ’s sound to a dated WAV file in the recordings folder, and MIDI, the performance; each lights while its recorder runs and turns it on or off. Loading an organ and recording are changes, so they need Allow changes from the network and the token, when one is set. Only the organs’ names leave the computer, never their files or paths.
- The bottom line: the connection, the voices sounding, the late blocks, and Access with the token and the API description.
Console pages
Each of the organ’s console pages, drawn by the program with its own console code. Taps and drags on the page work as clicks and drags on the console, and after a change only the parts drawn anew are fetched. Page only hides the bars and shows the page as large as the screen allows.
Each device keeps its own choice, so one tablet can stay on the left jamb and another on the right. An address ending in #page=2 opens the third page directly. On a screen held upright, an organ that ships portrait layouts shows its portrait layout.
A page opened while an organ loads shows Loading the organ with the percentage, and builds itself when the organ is ready. Loading another organ rebuilds the page by itself.
For console builders and scripts
The API is HTTP with JSON on the same port. Every object of the organ has a type and an index from 0, valid for one organ load: switches, controls, divisions, keyboards, generals, divisionals, EQ presets, temperaments and commands, and the program’s own properties.
| Request | Does |
|---|---|
GET /api/v1 | The program, the protocol version, the session and the organ |
GET /api/v1/switches | Every switch the console shows, with its name, role, division and state; ?all=1 adds the organ’s internal switches, every one the player could move |
GET /api/v1/switches/values | Every switch’s state, in index order |
PUT /api/v1/switches/12/value with {"value": 1} | Draws switch 12; 0 retires it, "toggle" toggles it |
PUT /api/v1/controls/0/value with {"value": 90} | Moves a shoe, 0 to 127 |
POST /api/v1/generals/2/press | Recalls general 3 |
GET /api/v1/generals/2 | General 3, with holds: the switches it draws |
PUT /api/v1/ranks/4/value with {"value": -30} | Rank 4’s voicing level to -3 dB, heard from the next note |
PUT /api/v1/notes/188/value with {"value": 1} | Plays MIDI note 60 on the second keyboard (1 × 128 + 60); 0 releases it |
PUT /api/v1/program/transpose with {"value": -2} | Transposes two semitones down |
POST /api/v1/commands/9/press | Saves, quits and shuts the computer down, when allowed |
GET /api/v1/events | A stream of every change, as server-sent events |
GET /api/v1/pages | The organ’s console pages and their layouts |
GET /api/v1/pages/0/picture | The first console page as a PNG image; layout, x, y, w and h choose a layout and a part of it |
POST /api/v1/pages/0/pointer with {"phase": "down", "x": 120, "y": 340} | A press on the page at those coordinates; move and up follow it |
A request that changes something is sent with Content-Type: application/json, and with Authorization: Bearer <token> when a token is set. The full description is served at /api/v1/openapi.json and can be opened in any OpenAPI tool. The protocol, its object types, properties and errors are described in Control protocol.
A microcontroller on Wi-Fi, such as an ESP32, sends these requests directly. It should keep the Wi-Fi power saving off, which otherwise delays each request by up to a tenth of a second. Notes are played over MIDI as before.
Over MIDI and OSC
The same objects, with the same types and indexes, can be read and changed without HTTP:
- MIDI System Exclusive, for a console whose microcontroller has a MIDI port and no network, such as an Arduino with USB MIDI. A Set of switch 12 to 1 is the 15 bytes
F0 7D 4D 50 00 00 05 05 01 0C 00 01 00 00 F7, and the reply comes back on the console’s MIDI output. Several programs on one MIDI network are told apart by a unit number, 0 by default, set with the lineapisysexunit 1in the settings file. - OSC, for TouchOSC, Open Stage Control and similar apps. Send
/mp/replytowith the app’s port first, then/mp/subscribe; a fader bound to/mp/controls/0moves the first shoe and follows it, and a button bound to/mp/switches/12draws switch 12 and lights while it is drawn.
Allow changes from the network applies to OSC as to HTTP. Each message and its replies are described in Control protocol.
Plugins in a DAW
Masterpiece is also built as a VST3, an LV2 and an Audio Unit (AU) plugin, so that a digital audio workstation (DAW) can host an organ as an instrument track. This page covers where each plugin is installed, how a host loads it, how an organ is chosen inside it, what it stores in the host’s project, which MIDI and audio connections it offers, and what differs from the standalone program.
The standalone program is the main product. The plugins use the same engine, the same console and the same files, and add the limits that come with living inside a host.
Formats and installation
| Format | Systems | Delivered as |
|---|---|---|
| VST3 | Windows, macOS, Linux | Masterpiece.vst3, in masterpiece-<version>-plugins-windows.zip, -plugins-macos-arm64.zip, -plugins-macos-x86_64.zip and -plugins-linux-x86_64.tar.gz |
| LV2 | Windows, Linux | Masterpiece.lv2, in masterpiece-<version>-plugins-windows.zip and -plugins-linux-x86_64.tar.gz |
| AU | macOS | Masterpiece.component, in masterpiece-<version>-plugins-macos-arm64.zip and -plugins-macos-x86_64.zip |
Each archive unpacks to a folder Masterpiece-plugins. Copy the bundles to a folder that the host scans, then rescan the plugins in the host:
| Format | System | Folders hosts scan |
|---|---|---|
| VST3 | Windows | C:\Program Files\Common Files\VST3 |
| VST3 | macOS | ~/Library/Audio/Plug-Ins/VST3 (one user), /Library/Audio/Plug-Ins/VST3 (all users) |
| VST3 | Linux | ~/.vst3 (one user), /usr/lib/vst3 or /usr/local/lib/vst3 (all users) |
| AU | macOS | ~/Library/Audio/Plug-Ins/Components (one user), /Library/Audio/Plug-Ins/Components (all users) |
| LV2 | Windows | %APPDATA%\LV2 (one user), %COMMONPROGRAMFILES%\LV2 (all users) |
| LV2 | Linux | ~/.lv2 (one user), /usr/lib/lv2 or /usr/local/lib/lv2 (all users) |
The program’s packages, the Windows setup program among them, hold the standalone program only. Up to 0.8.1 the plugins came inside the program’s zips and tarballs, and the amd64 .deb installed them to /usr/lib/vst3 and /usr/lib/lv2.
The macOS build is unsigned; see Installing Masterpiece.
The plugins are not built for these packages:
- The Flatpak bundle (the build sets
MP_BUILD_PLUGIN=OFF). - The Raspberry Pi 32-bit and 64-bit Debian packages (their build presets build no plugins).
- Android, iPhone and iPad.
A CLAP plugin can be built from the source with -DMP_BUILD_CLAP=ON; the releases do not carry it. See Building from source.
Plugin identity
| Property | Value |
|---|---|
| Name | Masterpiece |
| Manufacturer code | Mspc |
| Plugin code | Msp1 |
| Bundle identifier | org.masterpiece.player |
| LV2 URI | https://masterpiece.audio/plugins/masterpiece, an identifier that hosts compare; no program contacts this address |
| Category | Instrument (a synthesiser) |
Loading it in a host
Add Masterpiece as an instrument on a new track, as for any sampled instrument. The host shows one output bus, stereo unless the track is given more channels, and a MIDI input. After a rescan, a host lists it under the manufacturer name Masterpiece.
The plugin window is the console of the standalone program. It opens at 1280 by 760 pixels and can be resized; the host decides whether a plugin window may change size. A new instance shows No organ loaded. in the status line.
Choosing an organ
Open File > Open organ… in the plugin window. The window lists the organs saved as favourites, with a button for the file dialog; with no favourite yet, the file dialog opens at once. The plugin accepts the same files as the standalone program: Hauptwerk-format definitions, GrandOrgue .organ files, and .rar and .orgue packages. See Opening an organ.
When an organ has several definitions beside it (perspectives, or full and light versions), File > Other versions of this organ switches between them.
While an organ loads, the load dialog is on screen and the plugin outputs silence. MIDI notes that reach the plugin during the load are dropped, because they were played on the organ being replaced.
A host project reopens the organ that its instance played; see What the plugin saves in the host’s project. An instance in a new track starts with no organ and never reopens the last organ used elsewhere.
Prepare the organ in the standalone program
The plugin reads the settings that the standalone program saved: the global defaults in settings.mpglobal and each organ’s file in organs/. See Files and folders. Open each organ once in the standalone program, choose its memory settings in Organ settings > Loading (see Memory, loading and streaming), save them with Save for this organ, and the plugin loads the organ with them.
The plugin has no first-load settings step. The standalone program opens Organ settings before the first load of an organ; the plugin starts the load at once with the global defaults. An organ that has no settings file loads with 24-bit samples held resident, the format that needs the most memory, under a memory limit of 80% of the computer’s memory.
What the plugin saves in the host’s project
The state that the plugin hands to the host holds one item: the full path of the definition file of the organ the instance has loaded. An instance with no organ stores no path.
When the project opens, the host hands the state back and the instance loads that organ again:
- With the plugin window open, the load runs through the window, as File > Open organ… does, with its load dialog.
- With no plugin window open, the load starts straight away without it.
An instance that already holds that organ does not load it again. A state with no path, or one that does not belong to Masterpiece, changes nothing.
| Item | Where it is kept |
|---|---|
| The organ’s path | In the host’s project. The organ opens again when the project opens. |
| Master gain | In the organ’s file organs/<organ>.mporgan, line gain. It returns when the organ is opened again. |
| Stops drawn, couplers, pistons | Combinations in combinations/<organ>.mpcomb; the starting registration with the Save state button, which writes the organ’s file. |
| MIDI mapping | midi/<organ>.mpmidi and midi/console.mpmidi |
| Last organ used | lastorgan in settings.mpglobal. The plugin writes this line on every successful load. |
Because the plugin and the standalone program share one folder, a project opened on a computer that has the same organ in the same place finds the same settings, combinations and MIDI mapping.
Host parameters
The plugin offers two parameters for automation.
| Name | What it does | Default | Range | Takes effect |
|---|---|---|---|---|
| Master Gain | The master fader, after the organ’s own output trim. | 1.0 (unity, 0 dB) | 0.0 to 16.0 as a linear gain; 16.0 is +24 dB | At once |
| Simple WAV (no DSP) | Bypasses all DSP, including the Organ EQ and the rooms. Same switch as Bypass all effects in Organ settings > Loading. | Off | Off, on | At once |
The volume slider in the console’s top bar moves Master Gain and covers -40 dB to +24 dB; -40 dB is silence. Loading an organ resets the fader to unity, then applies the gain saved for that organ.
MIDI from the host
The plugin declares a MIDI input and produces no MIDI output.
- Notes and controllers from the host’s MIDI stream reach the engine through the same handling as a hardware keyboard. The host’s merged stream carries no device name, so the engine treats it as one unnamed source (“any device”).
- A manual answers to the MIDI channel assigned to it in the organ’s MIDI settings, or to the channel the organ defines. A mapping bound to one named keyboard applies to that hardware input and matches nothing from the host; a mapping bound to any device matches.
- With no mapping, a controller number acts as the control with that number, so a swell shoe can be driven from a controller out of the box.
- All-notes-off (controller 123) and all-sound-off (controller 120) release the notes of that channel.
- The split keyboard (Window > Split keyboard) works on the host’s notes.
- The plugin opens no MIDI device and offers no MIDI output port. The lights and displays of a console (Send stop changes on the MIDI output, console displays) need a MIDI output that only the standalone program opens.
Audio outputs and buses
| Property | Value |
|---|---|
| Inputs | None |
| Outputs | One bus named Out: stereo, or up to 64 channels where the host offers them |
| Reported tail length | 5 seconds |
| MIDI in / out | In only |
The engine renders the organ to this bus. The outputs set on the Outputs tab of Organ settings play on their own channels when the host gives the bus that many, and are summed to the first two otherwise. With the perspectives on outputs of their own, a host can process each one apart: a surround or ambisonic encoder after the plugin places them in space.
The plugin takes the sample rate and the block size from the host. A rate change in the host rebuilds the voice pool.
What differs from the standalone program
| Area | Standalone program | Plugin |
|---|---|---|
| Audio device, rate, buffer | Chosen in Settings > Audio… | Owned by the host |
| MIDI inputs | All enabled by default; selectable in Settings > MIDI… | The host’s MIDI stream only |
| MIDI output | Chosen in Settings > MIDI… | None |
| Output compressor and limiter | On the Audio tab, with the output presets | Left to the host’s own effects: the plugin never runs them, whatever the saved settings hold |
| Settings windows | The Organ menu with one item per tab of Organ settings, and the Settings menu with one item per tab of the settings window | The Organ menu opens Organ settings without its MIDI tab. The Settings menu lists General…, Performance… and Console display…: the settings window has no Audio, MIDI, Console MIDI or Remote control tab, because the host owns the audio device and the MIDI ports. |
| Remote control and the web console | Settings > Remote control… | Absent |
| Help > Diagnostics… | Available | Greyed out |
| First-run wizard | Shown at the first start | Not shown |
| Startup | Opens the last organ when Reopen the last organ when Masterpiece starts is on | Opens the organ stored in the host’s project when a project opens, and no organ otherwise |
| Crash guard | Remembers the organ being loaded and writes a note to the log after a crash | Absent |
| Log | masterpiece.log and masterpiece.previous.log | No log file is written |
| Command-line options | All | None |
| Pages in their own windows | Any console page can open in a window of its own | Pages stay tabs in the plugin window |
| Window position | Remembered in window.txt | Decided by the host |
--virtual-midi, JACK MIDI | Available on macOS and Linux | Not applicable |
The recorder (Window > Recorder), the Combinations window (Organ > Combinations), the split keyboard, the on-screen keyboard and Organ > Temperament and tuning… work as in the standalone program. The audio recorder captures the plugin’s output after the master fader.
Several instances
Each instance holds its own copy of the samples. Two instances that load the same organ use twice the memory; the memory limit is checked per load and does not count what other instances hold. Choose the 16-bit and streamed-release settings for organs that several instances share, and read Small, medium and large organs before loading more than one large set.
All instances share the files in the settings folder. Set Sample cache to One cache per organ (uses more disk) in the standalone program when instances load different organs; with One cache, replaced as organs change, each load replaces the cache of the other instance’s organ.
Limitations
- The host’s project stores the organ’s path and nothing else; the stops drawn and the settings come from the files in the settings folder.
- The settings window has no Audio, MIDI, Console MIDI or Remote control tab and Organ settings has no MIDI tab, because the host owns the audio and MIDI devices.
- The output compressor and the output limiter are left to the host, which chains its own effects. The Organ EQ and the voicing work as in the standalone program.
- No log is written, so a fault inside a host leaves no
masterpiece.log. Reproduce it in the standalone program and attach that log, as described in Troubleshooting and caveats. - A console’s lights and displays need the standalone program, which opens the MIDI output.
Phones and tablets
This page describes Masterpiece on Android, iPhone and iPad: how the window is laid out for a touch screen, how a sample set reaches the device, how audio and MIDI work there, what the device’s memory allows, and where the app differs from the desktop program. For the files and the installation procedure, see Installing Masterpiece.
The mobile app is the standalone program, built from the same source as the desktop one. It plays the same Hauptwerk-format sample sets and GrandOrgue organs through the same engine. The plugin formats, the command line and the test tools have no mobile build.
The window
Screen and orientation
The console fills the screen with no title bar and no resize border. The window has a fixed size and keeps no remembered place.
| System | Screen handling |
|---|---|
| Android | Full-screen mode. The system bars are hidden until a swipe from the screen edge brings them back. |
| iPhone and iPad | The window covers the whole scene, and the console sits inside the display’s safe area, clear of rounded corners, the home indicator and, since iPadOS 26, the window controls drawn over the top-left corner. The area is recalculated when the iPad turns or its window changes size. The status bar is hidden and the app requires full screen. |
The iPhone and iPad builds are landscape only (left and right). The Android manifest sets no orientation.
The console picks its layout from the shape of the room it has. In a window taller than wide it shows the organ’s portrait layout, when the set ships one; in a wider window it shows the main layout. A layout chosen by hand holds until the shape changes. The layout box in the top bar appears only when the organ has more than one layout, and names a portrait layout as such.
Touch sizes
Controls are enlarged for a finger. The code states the target as about 48 logical pixels, the size both platforms recommend.
| Element | Phone or tablet | Desktop |
|---|---|---|
| Title bar of a panel or dialog | 48 | native |
| Row of a popup menu | at least 48, font 20 | system default |
| Menu buttons (File, Organ, View, Settings, Help) | As wide as the name, at least 84 | As wide as the name, 52 to 88 |
| Icon on a page’s tab that opens the page in its own window | 44 wide, the tab’s full height | 16 wide |
| Sequencer step buttons (previous, next) | 44 wide | 30 |
| Set button | 64 wide | 56 |
| Panic and Save state buttons | 46 wide | 38 |
| Favourites row | 56 high | 46 |
| Rename and Remove buttons in the favourites | 86 wide | 74 |
| Search field and bottom bar of the favourites window | 44 high | 34 |
| Toolbar of a panel | 44 high | 34 |
| Stop cell in a panel | 64 high, columns at least 150 wide | 58 high, 170 wide |
The top bar is one row while the volume fader keeps at least 174 pixels beside the menus and the buttons on the right. In a narrower window the menus and the fader take a row of their own.
Panels and dialogs
Every panel and dialog opens inside the main window, in a layer over the console. One window is on screen at a time, filling the screen, with a 48-pixel title bar and a close button within reach. Dialogs have a fixed size, and a dialog keeps no remembered size. The windows that float over the console on a desktop (Recorder, Combinations, Split keyboard, and a page opened in its own window) open the same way, as full-screen panels.
The pop-out button of a panel is hidden, and panels cannot be detached into windows of their own.
Menus and alerts keep windows of their own. On Android, the back button closes the front panel as Escape does on a desktop. The load progress dialog stays open; back does nothing while it shows.
Playing on the screen
The drawn console takes touches: drawstops, pistons, shoes and keys. A stop changes as the finger lifts. A finger held still for half a second opens what a right-click opens on a desktop, on the drawn console and on the generated panels, such as a stop’s MIDI menu; the stop under the finger stays as it was.
On Android, a console label whose typeface the set names and the device lacks is drawn in the system’s default typeface.
View > Keyboard shows the on-screen keyboard, with a selector for the manual it plays when the organ has several. See Playing and A tour of the window.
First start
The first-run wizard appears on a phone or tablet as on a desktop, as a panel. See Installing Masterpiece.
Getting sample sets onto the device
What opens
A phone or tablet opens an organ from one package: a RAR archive (.rar, RAR 4 or 5, including solid and multi-part sets) or a GrandOrgue .orgue package. The file chooser is titled Choose an organ package and filters *.rar and *.orgue. A loose installation of thousands of files is slow to bring onto the device and slow to read through the system’s document layer, so loose definitions (.Organ_Hauptwerk_xml, .organ) stay out of the chooser. Masterpiece reads the samples from the package where it is. See Opening an organ.
The favourites window (File > Open organ…) works as on a desktop. Its button Open an organ file… opens the chooser. The last organ and the favourites reopen at the next start when their access is still granted.
Android
Android hands the app a document, which has no path. Masterpiece handles it in one of two ways.
| Case | What happens | Disk space used |
|---|---|---|
| The document is a regular, seekable file on the device’s storage | It is read where it is. The system opens a file descriptor for it, and a link named like the package, in the Linked folder of the app’s data folder, points at that descriptor. The archive reader asks the system for a fresh descriptor each time it opens the package. | none |
| The provider streams the document (a cloud drive) and cannot seek | The package is copied into the Organs folder of the app’s data folder. A progress window titled Copying the organ shows the bytes copied of the total and has a Cancel button. A copy with the same name and size that is already there is reused. | the size of the package |
During a copy the file carries the suffix .part and is renamed at the end, so a cancelled or failed copy never looks finished.
For a package read in place, Masterpiece asks the system for read access that survives restarts and keeps the list of documents in Linked/documents.txt. At the next start it makes the links again, so the last organ and the favourites reopen. A document that has gone, or whose access was withdrawn, is dropped from the list.
The picker cannot always filter by extension, so the choice is checked after it. Alerts titled Organ not copied report a failed import:
| Message | Cause |
|---|---|
| This document has no name. | The provider gave no file name. |
| Masterpiece opens an organ from its package: a .rar or .orgue file. | The chosen file has another extension. |
| The document could not be read. | The system gave no input stream. |
| There is no room to copy it. | The target file could not be opened for writing. |
| The copy stopped: the device may be full. | A write failed. |
| The copy could not be finished. | The final rename failed. |
The app declares READ_EXTERNAL_STORAGE up to Android 12L (API level 32) for reading shared storage by path.
Android picks one document at a time and reads or copies that document alone. The question for the folder of a multi-volume set exists on iPhone and iPad only.
iPhone and iPad
The Files app lends a picked document through a security-scoped URL. Masterpiece starts that access and holds it until the program ends, and the package is read where it is. Nothing is copied, so a package of many gigabytes takes no extra space. The loans are remembered in held-documents.txt in the app’s data folder, and lent again at the next start with no new pick. A document that has gone, or whose loan was withdrawn, is dropped.
The build enables file sharing and the document browser, so a package can also be copied into the app’s own Documents folder through the Files app.
| Message | Cause |
|---|---|
| Could not open the organ: The Files app did not lend this document to Masterpiece. | The system refused the loan. |
| The rest of <file>, with Choose the folder and Cancel | The package is one volume of a multi-volume set. Choose the folder opens a chooser titled Choose the folder that holds the set; the folder and everything in it are lent, and the set loads from there. |
Run the checks on the Diagnostics tab of the settings window lists the loans under Documents lent by the Files app, with a mark for each one that cannot be read now.
Audio and MIDI
Audio
Audio goes through the device’s audio system. On Android the low-latency interface needs Android 8.0 (API level 26), the minimum of the app. The iPhone and iPad app declares background audio: the organ keeps sounding when the screen locks or another app comes to the front.
The first start picks the default output, a rate of at least 44.1 kHz and a buffer of about 10 ms; see Installing Masterpiece. Settings > Audio… opens the Audio tab. See Audio, room and mixer.
The engine renders with the NEON vector unit on 64-bit ARM, so the Faster audio engine box applies on a phone as on a Raspberry Pi. The Android emulator (x86_64) uses AVX2 or SSE2.
MIDI
At the start the app opens every MIDI input the system reports, except those switched off earlier, and tries again every 3 seconds for an input that failed to open. The wizard’s MIDI configuration step lists them.
| System | Inputs |
|---|---|
| Android | The system’s MIDI interface (Android 6.0 and later; the app needs 8.0). The manifest declares USB host and Bluetooth LE as optional features and requests the Bluetooth permissions. |
| iPhone and iPad | The inputs CoreMIDI reports. |
Bluetooth MIDI… on Settings > MIDI… opens the system’s pairing window for a Bluetooth MIDI keyboard. One window opens at a time; once it closes, the next press opens it again. A paired keyboard appears among the inputs.
The program remembers an input between sessions by a lasting identifier. On iOS it is the CoreMIDI identifier. Android numbers its devices afresh at each start, so there Masterpiece knows an input by its name, and two keyboards of the same model look alike.
A virtual MIDI input of Masterpiece’s own (--virtual-midi) exists on macOS and Linux only. The JACK audio and MIDI connections exist on Linux only.
MIDI learn is described in MIDI and consoles.
Memory
Phones and tablets have no memory setting of their own. The same limit and the same loading choices apply as on a desktop, with values that make a small device workable.
The limit
Memory limit for samples on Settings > Performance… is the most memory the samples and the voice pool of one organ may take. It shows in the Advanced display mode. Its default is Default: 80% of memory, computed from the device’s total memory with a floor of 512 MB. The other choices are 50%, 60%, 70% and 90% of memory. It takes effect at the next load.
A load that would pass the limit stops with an alert titled Not enough memory for this organ and shows the console without sound, so that Organ settings can be opened. A load that reaches the limit part-way plays with some stops or notes silent and says so in an alert titled Only part of this organ fits, which names the choices that make the organ fit. Stops, ranks and perspectives in Organ settings shows About <size> for this choice (the limit is <size>) for the stops kept, in red when the choice passes the limit.
The limit is measured against the device’s total memory. On iPhone and iPad an organ’s load waits while the app is in the background and goes on when it comes to the front again; the system ends an app that keeps a processor busy in the background. A phone or tablet ends a backgrounded app whenever it needs the memory, and the program treats a backgrounded session as ended cleanly, so the crash guard reads the end as a normal quit. With Reopen the last organ when Masterpiece starts on, the organ reopens at the next start.
What fits
The code gives no per-device figure. The measured sizes of a large organ are in Memory, loading and streaming; Friesach, a 44-stop set of 17 GB on disk, takes these amounts of sample memory:
| Quality (on Organ settings > Loading) | Samples in memory |
|---|---|
| Best: as recorded, all in memory (24-bit) | 16.2 GB |
| Recommended: 16-bit, releases streamed | 4.65 GB |
| 16-bit mono, releases streamed | 2.33 GB |
Small: 16-bit mono, compressed, releases streamed adds lossless compression to the last row, and Smallest: as Small, short releases only keeps the short releases alone. Opened straight from its RAR package, where every release is held whole, Friesach takes 1.66 GB under Small and 3.30 GB under Compact, measured with Masterpiece 0.9.0.
On a phone or tablet, start from Small: 16-bit mono, compressed, releases streamed, choose Fewest voices: 512, for a Raspberry Pi or a tablet under Performance on Settings > Performance…, and leave out the stops and perspectives that the repertoire leaves unused (Stops, ranks and perspectives). See Small, medium and large organs.
The voice pool counts against the limit. With streamed release tails each voice holds a ring as long as the Release buffer: on Automatic, the default, a quarter of a second on a solid-state drive (96 KB at 48 kHz) and up to 2 seconds on a slower disk (768 KB). The default pool is 1,536 voices, about 150 MB of rings at a quarter of a second and 1.1 GB at 2 seconds. With streaming off, the default pool is 725 voices per processor thread, at least 1,536. Polyphony limit on the same tab lists the memory of each pool size in its choices (256, 512, 768, 1,024 voices and more up to 10,240) and takes any number typed into it; it applies at once. A smaller pool leaves more of the limit to the samples, and thins a full registration. The code sets no separate pool default for phones.
The sample cache
The sample cache stores the decoded samples so that the next load of the same organ reads one file. Its default folder is cache in the app’s data folder. The cache settings are on Settings > General…: Cache folder shows the path, Choose… picks another folder through the system chooser, and Default returns to the standard one. The cache is as large as the samples held in memory. Sample cache offers One cache, replaced as organs change (the default), One cache per organ (uses more disk) and Off; Off frees the storage and makes every load decode the package again. Save the sample cache chooses Before the organ plays or In silence, while it plays; the second writes the cache at the lowest background priority.
On Android, iPhone and iPad the Masterpiece folder lies in the app’s own application-data folder. Run the checks on the Diagnostics tab lists the cache folder and the size of the cache files.
Differences from the desktop program
| Area | Phone or tablet | Desktop |
|---|---|---|
| Formats opened | .rar and .orgue packages | Definitions, .organ files, .rar and .orgue packages |
| File chooser | Choose an organ package | Choose an organ definition file |
| Windows | One full-screen window; panels, dialogs and floating tools open in a layer over the console | Separate windows, resizable, positions remembered |
| Panels | Cannot be detached | Pop-out button, and View > Open page in new window |
| Window title bar | None | Native title bar with the version and organ name |
| Plugins | None | VST3, LV2, Audio Unit |
| Command line | None | See Command line |
| Virtual MIDI input, JACK | None | macOS and Linux |
| Diagnostics tab | Send the report and the log opens the share sheet; no Open the log folder | Open the log folder; no share button |
| Load warnings | An alert with OK only | An alert with Show the log |
| Favourites search | The field takes no focus when the window opens | The field takes the keyboard focus |
| Folder of the last Open organ… | Forgotten | Remembered |
Reporting a problem
Help > Diagnostics… opens the Diagnostics tab, which shows where the log is kept. Run the checks reports the folders Masterpiece writes to, the audio, the organ and its files, and on iOS the documents lent by the Files app. Copy the report puts the checks and the last 200 lines of the log on the clipboard. Send the report and the log opens the share sheet with masterpiece-report.txt, masterpiece.log and masterpiece.previous.log. See Troubleshooting and caveats.
Command line
The Masterpiece program takes options that open an organ directly, write a log for a bug report, record a session, play MIDI files through an organ for repeatable recordings, and set how an organ is loaded. This page lists every option, with its default and its effect. The program starts without any option; the options only change what happens at startup.
Masterpiece [options] [organ file]
| System | How to start the program |
|---|---|
| Windows | Masterpiece.exe in the install folder |
| macOS | /Applications/Masterpiece.app/Contents/MacOS/Masterpiece |
| Linux (Debian, Ubuntu, Raspberry Pi OS) | masterpiece |
| Linux (Flatpak) | flatpak run io.github.bonninr.Masterpiece [options] |
Android, iPhone and iPad have no command line. The plugins take no options.
Rules for all options:
- A relative path is relative to the folder the command runs in. A path with spaces needs quotes.
- Options may come in any order, except where a section says that position matters.
- Options with a value take the next word as the value.
- An unknown word is ignored.
Masterpiece --help prints a short list of the options to standard output and quits.
- Opening an organ
- Information
- Logging and reporting problems
- MIDI input
- Playing, registering and recording
- Loading and memory
- Examples
Opening an organ
<organ file>
An organ to open at startup. The file is a definition (.Organ_Hauptwerk_xml, .CustomOrgan_Hauptwerk_xml, or the version 3 spellings .Organ.Hauptwerk.xml and .CustomOrgan.Hauptwerk.xml), a GrandOrgue .organ file, or a package (.rar, .orgue). The program takes the first word that is not an option, names an existing file and has one of these endings. Other words are ignored. This is the argument that Open with Masterpiece passes from a file manager.
When another instance is already running and the system hands it a file (on macOS, Finder’s Open With), the running window opens that organ.
--odf <file>
Opens this organ at startup. It accepts the same files as <organ file>. When both are given, --odf is used. The file is looked up in the working folder; a missing file produces a load error in the status line and the log.
Without either, the program opens the last organ when Reopen the last organ when Masterpiece starts is on, and starts with no organ otherwise.
--gui-only
Builds the whole console and reads no audio. The organ appears in a second or two and is silent. Use it to check how a set’s console looks, or to decide whether a problem lies in the definition or in the samples.
In this mode the first-run wizard is skipped, the first-load Organ settings step is skipped, and the crash guard does not mark the organ as running.
--console-page <n>
Shows console page n once the organ has loaded, counting from 1. A value outside the organ’s pages is ignored. Use it for sets that put jambs or pistons on pages of their own.
--organ-root <folder>
The folder that holds the organ’s OrganInstallationPackages. Use it when the definition’s own path does not lead to the samples: a definition copied elsewhere, or samples moved to another drive. The same setting exists as Organ folder in Organ settings > Loading.
Give an absolute path. The value is read as written: quotes around it are kept, and a relative path is not resolved against the working folder.
Information
--help, -h, /?
Prints the short list of options and quits.
--version
Prints Masterpiece <version> and quits.
--train-profile
Plays a built-in exercise offline, with no window and no audio device, and quits. It is the training run of a profile-guided build, and of no use to a player.
Logging and reporting problems
Every session writes a log without any option. The files are in the settings folder:
| System | Settings folder |
|---|---|
| Windows | %APPDATA%\Masterpiece |
| macOS | ~/Library/Masterpiece |
| Linux | ~/.config/Masterpiece |
| Linux (Flatpak) | The same path inside the application’s sandbox storage |
At the start of the next session, masterpiece.log becomes masterpiece.previous.log, so a crash keeps its log. Help > Diagnostics… shows the path of the current log and opens its folder. Attach both files to a bug report.
--log <file>
Writes the log to this file. The log starts before anything else, so it covers the whole load, including the time of each stage. With --log, the standard masterpiece.log is not written and the previous log is not rotated.
--log-midi
Logs every MIDI message and what became of it: the manual, stop or control it reached and, when nothing sounded, the reason. It also logs the MIDI inputs present and, after each load, the playable keyboards with their channels. Use it when a keyboard or a piston does nothing or does the wrong thing. The same switch is the Log every MIDI message and what became of it box on the Diagnostics tab of the settings window; both last until the program quits.
--log-releases
Describes every key release: which of the pipe’s releases played, how long that release is, how many releases the pipe has, where in the release it started and how it joined the attack. Use it for a click, a noise or a wrong-sounding tail when keys are released. The same switch is the Log every key release: the release played, its length and start box on the Diagnostics tab.
--log-touches
Logs every press with the component that took it, and every change of the modal window. Use it to find what a tap that does nothing landed on, mostly on a touch screen. The option is not in the --help list.
--record-midi <file>
Records everything played in the session as a MIDI file, saved when the program quits. It helps with a fault that cannot be repeated on demand, such as a stuck note: play until it happens, then quit, and the moment is in the last seconds of the file. --play-midi replays the file exactly.
MIDI input
--virtual-midi [name]
Publishes a MIDI input port of Masterpiece’s own, so that another program (a sequencer, a notation editor, a virtual keyboard) can play the organ without a cable. The port is called Masterpiece unless a name follows. The name must not start with --.
Available on macOS and Linux. Windows offers no way to publish a port; a loopback driver such as loopMIDI does the same job, and Masterpiece opens its port like any other device. On Linux the program also offers a JACK MIDI port when a JACK server runs.
Playing, registering and recording
These options load an organ, draw stops, play one or more MIDI files and record what the organ produced, so that recordings and comparisons repeat exactly. Masterpiece quits when the last file has played, unless --stay-open or --draw-only is given.
--play-midi <file>
Plays this MIDI file through the organ once it has loaded. Playback starts 1.5 seconds after the organ is ready, so the beginning is not cut off.
Give the option more than once for several takes, played one after another. Before each take every key is released and every stop is retired, so each take registers from scratch. The log records the stops drawn for each take and the wall-clock time in milliseconds at which each take starts, so that a screen recording of a whole session can be cut into takes.
A take whose MIDI file is missing or unreadable is logged and skipped.
--record-audio <file>
Records the organ’s output to this 24-bit WAV file while the take plays. The recording is made inside the program, so no other sound gets into it and nothing is lost if the machine stutters. It starts with the music. With several takes, put a --record-audio after each --play-midi. The output is stereo at the audio device’s sample rate. The folder is created when it does not exist.
--draw-stops <all | n | ids>
The stops to draw for a take:
| Value | Stops drawn |
|---|---|
all | Every stop. |
a number, such as 4 | The first that many stops of the organ’s stop list. The list is ordered by division, so on most organs 4 draws four pedal stops. |
a comma-separated list, such as 12,15,31 | Exactly those stops, by StopID in the organ definition. An id the organ does not have is logged and skipped. |
A --draw-stops that follows a --play-midi applies to the next take, so it can stand on either side of its file.
--registration <name>
Draws stops chosen from their names, for an organ that has no preset.
| Name | What it draws |
|---|---|
plenum | Principal chorus and mixture: preludes and fugues. Any unknown name also gives this. |
tutti (or all) | Everything. |
chorale | One flute and a quiet pedal. |
trio | Two contrasting manuals and a light bass. |
solo | A reed or a mixture against a soft accompaniment. |
Like --draw-stops, a --registration that follows a --play-midi applies to the next take. A list of stop ids takes priority over a registration, and a registration over all or a number.
--preload-drawn
Loads only the ranks that the drawn stops use. On a large set this reduces the time to try a registration from minutes to seconds. It needs a --draw-stops list of ids and is ignored otherwise (the log says so). Every stop that is not drawn is silent for the session. A load of this kind writes its own cache, which a later full load does not use.
--preload-ranks <ids>
Loads exactly these ranks, given as comma-separated rank ids such as 2,4,14. Use it for organs whose stops reach their pipes through pallets: the drawn stops name no ranks there, so --preload-drawn cannot narrow the load.
--draw-only
Loads the organ, draws the stops chosen with --draw-stops or --registration, and hands the console over. Nothing plays and Masterpiece stays open. Use it to open an organ with a registration already drawn.
--stay-open
Stays open after the last take has played. Staying open saves loading a large organ again.
Loading and memory
These options set how the next organ is loaded. They are the settings of Organ settings > Loading, and --cache is Sample cache on Settings > General…. A value given here holds over the saved settings, the organ’s own among them, for the whole run. The log line memory config: shows the values in effect.
| Option | Values | Default | Effect |
|---|---|---|---|
--storage | int16, int20, int24, float32 | int24 | How each sample is held in memory: int16 in 2 bytes, int20 in 2.5 bytes, packed, int24 in 3 bytes, float32 in 4 bytes, as decoded. With int24, a 16-bit recording is held at 16 bits, as recorded, and plays bit for bit the same. int16 is enough for most sets. Another value is logged and ignored. |
--load-mono | on, off | off | Folds stereo samples to one channel as they load. Halves the memory and removes the stereo image. on, 1, true and yes switch it on; any other value switches it off. |
--compress-samples | on, off | off | Holds the samples in memory with lossless compression and decodes them as they play. About a third of the memory of the same format uncompressed. Lossless compression in memory on the Loading tab. Applies to int16 and int24. Accepts the same words as --load-mono. |
--load-rate | a rate in Hz, such as 48000; 0 | 0 (as recorded) | Converts the samples to this rate as they load. Converting a 96 kHz set to 48 kHz halves its memory. |
--stream-releases | on, off | off | Keeps only the start of each release tail in memory and reads the rest from disk while it plays. Saves a large share of the memory on sets with long releases and needs a fast disk. Accepts the same words as --load-mono. |
--preload-head | a number of frames | 0 (whole files) | The minimum number of frames held in memory at the start of every sample. |
--cache | off, single, per-organ | The Sample cache setting, single until it is changed | The sample cache keeps decoded samples on disk, so the next load of the same organ is much faster. single keeps one cache and replaces it when a different organ loads. per-organ keeps one cache per organ and uses more disk. off writes none. Any other value means single. |
A load in which some samples failed to read writes no cache, so a damaged installation is never cached as complete.
--program-couplers <on|off>
Switches the program’s own couplers between the manuals at 16’, 8’ and 4’ on or off for the run: the Extra couplers box on Organ settings > Loading, and Window > Couplers. Accepts the same words as --load-mono. The option is not in the --help list.
Examples
Open an organ:
Masterpiece "C:\Organs\Friesach.Organ_Hauptwerk_xml"
Check how a console looks on its second page, with no samples loaded:
Masterpiece --odf "Friesach.Organ_Hauptwerk_xml" --gui-only --console-page 2
Collect what a report about notes that do not sound needs:
Masterpiece --log report.log --log-midi --record-midi report.mid
Load an organ with a plenum drawn and play it by hand:
Masterpiece --odf "Friesach.Organ_Hauptwerk_xml" --registration plenum --draw-only
Record two pieces on two registrations. Only the drawn ranks load, and the samples are held as 16-bit mono:
Masterpiece --odf "Friesach.Organ_Hauptwerk_xml" ^
--storage int16 --load-mono on --preload-drawn ^
--draw-stops 12,15 --play-midi chorale.mid --record-audio chorale.wav ^
--draw-stops 12,15,31,40 --play-midi fugue.mid --record-audio fugue.wav
The ^ ends a line in the Windows command prompt. On macOS and Linux, end the lines with \.
Files and folders
Masterpiece keeps its own files in one settings folder in the user’s profile and writes a few files next to an organ’s installation. This page lists every file and folder the program reads or writes, where each lives on each system, what it holds, and what happens when it is deleted. It ends with what the program sends over a network: the update check, and nothing else.
The settings folder
| System | Settings folder |
|---|---|
| Windows | %APPDATA%\Masterpiece (C:\Users\<name>\AppData\Roaming\Masterpiece) |
| macOS | ~/Library/Masterpiece |
| Linux | ~/.config/Masterpiece |
| Linux (Flatpak) | The same path inside the application’s sandbox storage |
| Android | Masterpiece in the app’s private storage, which other apps cannot reach |
| iPhone and iPad | Masterpiece in the app’s private storage |
The folder is hidden on Windows (AppData) and on macOS (Library). Open the log folder, on the Diagnostics tab (Help > Diagnostics…), opens it on a desktop system.
The standalone program and the plugins share this folder, so both see the same settings, combinations and MIDI mappings. On a phone or tablet, uninstalling the app removes it.
The Flatpak sandbox gives the program access to the home folder, /media, /run/media and /mnt, so organs on those paths open without further steps. Other paths are outside the sandbox.
Layout
Masterpiece/
settings.mpglobal global settings and favourites
audio.xml audio device state (standalone program)
window.txt main window position (standalone program)
dialogs.txt dialog sizes
jack-connections.txt JACK MIDI connections (Linux)
split-keyboard.txt split keyboard presets and controls
masterpiece.log this session's log (standalone program)
masterpiece.previous.log the previous session's log
backups/ settings saved before an import or a copy
organs/ <organ>.mporgan, <organ>.mppanels
midi/ <organ>.mpmidi, console.mpmidi
combinations/ <organ>.mpcomb, <organ>.<set>.mpcomb
split/ <organ>.mpsplit
cache/ samples.mpcache, samples-<organ>.mpcache
Packaged/<id>/ organs unpacked from their archives
Portable/ copies that keep an organ playable without its files
Standard noises/ generated stand-ins for a set's standard noises
jOrgan/<name>-<hash>/ jOrgan organs: samples as WAV files, skin pictures, unpacked sfArk files
consoles/ console profiles, and active.txt naming the one in use
Organs/ packages copied into the app (Android)
Linked/ packages read where they are (Android)
How a file is named for an organ
Per-organ files are named by the organ’s identity, so renaming or moving the sample set keeps its files.
- An organ that declares an identity is
<name>-<UniqueOrganID>.<name>is the organ’s name with letters and digits kept, spaces, hyphens and underscores turned into hyphens, cut to 48 characters. - An organ that declares none is
<name>-p<16 hexadecimal digits>, a hash of the definition’s full path in lower case. Moving such an organ starts it with fresh files. - Files written by older versions under the definition’s own file name are adopted and rewritten under the new name at the next save.
Global files
settings.mpglobal
A text file, one key value per line, lines starting with # ignored. It holds the settings that apply to every organ, the outputs, the favourites, and the defaults an organ without settings of its own starts with. The first start of the standalone program shows the first-run wizard while this file does not exist; a plugin load creates it. Where settings are kept lists every key, its value and the control that writes it.
The standalone program rewrites the file at once when most of these change. The plugins read it at each organ load.
Deleting settings.mpglobal resets every program-wide setting and the outputs, empties the favourites and the library list, turns the first-run wizard on again, and removes the crash mark. Organs keep their own files.
audio.xml
The audio device state: driver, device, sample rate, buffer size and channels, as the audio device manager writes it. Written when the standalone program quits. A saved state that no longer matches the hardware is dropped and the defaults return. Deleting it resets the audio device. The plugins do not use it.
window.txt and dialogs.txt
window.txt holds the position and state of the main window. dialogs.txt holds the size each kind of dialog was last left at, one kind=width height line each. A window position that no screen shows is moved onto a screen at the next start. Deleting either resets the layout.
jack-connections.txt
On Linux, the JACK ports connected to Masterpiece’s JACK MIDI input, one port name per line, restored at the next start. Deleting it drops the connections.
split-keyboard.txt
The split keyboard’s presets, triggers and the chosen source keyboard. See Split keyboard. Deleting it removes the presets.
Per-organ files
All files below are in the settings folder, named <organ> as described above.
| File | Holds | Written |
|---|---|---|
organs/<organ>.mporgan | The organ’s settings: loading choices, engine switches, master gain, reverb impulse response, voicing and the organ’s own voicing EQ (the eq line, present once Save for this organ has been pressed on the Organ EQ tab), mixer routes, stops, ranks and perspectives left out, the notes loaded, tuning, window places, the registration saved with Save state, and the controls and switches the organ marks to be remembered. | Save for this organ, Save state, the volume slider, and when controls move |
organs/<organ>.mppanels | The organ’s panels (View menu panels). | When a panel changes |
midi/<organ>.mpmidi | The organ’s MIDI mapping: manuals, stops, shoes, divisionals. | When the mapping changes |
midi/console.mpmidi | The player’s console on every organ: stepper, generals, setter. | With the organ’s MIDI mapping |
midi/<organ>.mpmidi.before-repair | A copy of a mapping from version 0.3.7 or earlier, kept when the program repaired manuals that shared a channel. | Once, at the repair |
combinations/<organ>.mpcomb | The default combination set: the organ’s pistons as the player set them, and the player’s generals, divisionals and stepper frames (lines prefixed player). | When a piston is stored |
combinations/<organ>.<set>.mpcomb | A named combination set. | Save as new set… |
split/<organ>.mpsplit | The organ’s split keyboard layout. | When the layout changes |
Deleting a per-organ file resets that part for that organ. Deleting organs/<organ>.mporgan makes the standalone program open Organ settings again before the organ’s next first load. Deleting a .mpcomb file removes the stored pistons and cannot be undone; copy the file first if the registrations matter.
Files next to an organ’s samples
When a composite organ plays packages that are not in its folder, Masterpiece records where it found them in the organ’s root folder, the folder that holds OrganInstallationPackages (for an organ opened from packages, its folder under Packaged):
| File | Holds |
|---|---|
package-folders.txt | One line per package: its number, a tab, and the folder the player chose. |
joined-packages.txt | Archives of other organs that supply packages, one path per line. |
joined-<id>.txt | The file index of such an archive, so that it is read once. |
Deleting them makes the next load search again and, if needed, ask for the packages again. For an installed Hauptwerk-format organ these files are written inside the installation folder. Masterpiece writes nothing else there.
The sample cache
cache/samples.mpcache is the decoded samples of the last organ loaded. With Sample cache set to One cache per organ (uses more disk), each organ has samples-<organ>.mpcache. A cache is read only when the organ’s definition (size and modification time) and every loading setting that changes the stored bytes match; any difference rebuilds it. A file ending in .part is a cache being written; the program moves it into place when it is whole.
The folder is the cache folder of the settings folder, or the Cache folder chosen on the General tab of the settings window. If the chosen folder cannot be created, the usual folder is used and Run the checks reports it. A cache is written only when the disk has room for it and a margin, a twentieth of the disk between 64 MB and 512 MB; the cache it replaces counts as room. Delete the cache, beside Cache folder, removes the cache files.
Deleting a cache file is safe: the next load of the organ decodes the samples again and writes a new cache, which takes as long as the first load. Caches can reach several gigabytes. An organ set to Keep a portable copy of this organ depends on its cache when its drive is unplugged; deleting that cache ends this until the organ loads completely again with its drive connected.
Organs opened from packages
Packaged/<id>/
When a .rar or .orgue package opens, Masterpiece unpacks the definition and the console artwork into Packaged/<id>: in the Cache folder when one is chosen, otherwise in the settings folder. A set unpacked before a cache folder was chosen stays where it is. <id> is derived from the archives themselves, so the same packages open the same folder from any location. The samples stay in the archives and are read in place.
| File in the folder | Holds |
|---|---|
masterpiece-archive.txt | The path of the archive. It exists only after an unpack finished without damage. |
archive-index.txt | The list of files in the archives and where each one starts. |
chosen-definition.txt | The definition last opened, when the packages hold several. |
| The unpacked definitions and artwork | Everything except the samples. |
Deleting a folder under Packaged is safe while the original archives exist: the next open indexes and unpacks them again, which can take several minutes for a large set. The organ’s settings are in organs/ and stay. A folder without masterpiece-archive.txt counts as an unpack that did not finish and is rebuilt. The count of these folders is one line in Run the checks.
Portable/
Created for organs with Keep a portable copy of this organ. Portable/<organ>/ holds a copy of everything under the organ’s root except the audio files (the definition, the console pictures and masks) and a stamp.txt; Portable/index.txt maps each original definition to its copy, one original<TAB>copy per line. When the original is missing, the program opens the copy and plays from the organ’s cache. Deleting the folder removes the option until the next complete load.
Standard noises/
Generated 16-bit stereo WAV files that stand in for a set’s standard key, stop and blower noises when the set does not ship them. They are created when needed and are safe to delete.
Phones and tablets
| Folder | Holds |
|---|---|
Organs/ | On Android, packages copied into the app when the player picks them. A package picked again with the same size is reused. |
Linked/ | On Android, links to packages read where they are, with documents.txt listing the documents to link again at the next start. |
On iPhone and iPad, packages come through the Files app and are read where they are. Deleting these folders on Android removes the copies; open the packages again to restore them. See Phones and tablets.
Logs
| File | Holds |
|---|---|
masterpiece.log | The current session: version, audio device, each load stage with its time, MIDI events when logging is on, warnings and failures. |
masterpiece.previous.log | The session before. |
The standalone program moves masterpiece.log to masterpiece.previous.log at each start and replaces the older previous log, so two starts in a row leave only the later two sessions. --log <file> writes the log to the named file and bypasses both. The plugins write no log. Deleting the logs is safe. See Troubleshooting and caveats.
Run the checks writes a temporary file .masterpiece-check in the settings and cache folders to test them and deletes it at once. Send the report and the log on a phone writes masterpiece-report.txt in the system’s temporary folder and shares it with the log files.
Recordings and other files you choose
Masterpiece writes these where the player says.
| Output | Format | Chosen in |
|---|---|---|
| Audio recording | 24-bit WAV of the output after the master fader and before the metronome | Window > Recorder, Record audio |
| MIDI performance | Standard MIDI file with notes, stops and shoes, with a tempo of 60 bpm (one quarter note per second), so that a take keeps its length | Window > Recorder, Save MIDI… |
| MIDI file for other programs | Standard MIDI file with a track per keyboard, the registration as markers when Write the registration as markers is ticked | Window > Recorder, Save for a sequencer… |
--record-audio, --record-midi | The same formats | The command line |
A file dialog asks before it replaces a file of the same name; the command line replaces it.
Two outputs go to a fixed folder, Documents/Masterpiece/Recordings in the user’s documents folder:
| Folder | Holds |
|---|---|
Recordings/ | The takes saved by the console’s Record button, one MIDI file each, named <organ> <date> <time>.mid. |
Recordings/Archive/<date>/ | With Archive everything played on (MIDI tab), every take, one MIDI file each, named by its time and organ. A take begins with the first note and ends after the silence chosen. The oldest files go first when the folder passes its size or age. |
Settings exported to a file
File > Export settings… writes every setting into one .zip file, Masterpiece settings.zip by default; File > Export organ settings… writes the loaded organ’s, <organ> settings.zip. File > Import settings… reads either kind back, after a window says what it holds and which version wrote it. Desktop systems only.
| In the archive | Holds |
|---|---|
masterpiece-settings.txt | The manifest: the scope, the organ, the version that wrote it and the path of each file. |
f1, f2, … | The files: for an organ, its .mporgan, .mppanels, .mpmidi, .mpcomb and .mpsplit files; for everything, those of every organ and settings.mpglobal, midi/console.mpmidi and split-keyboard.txt. |
The audio device setup stays out, because it belongs to the computer. An import first saves the files it replaces to backups/ in the settings folder; the message at the end names the file. Organ > Copy settings from another organ… saves the organ’s files there in the same way. The file dialogs reopen in the folder last used for each kind.
Masterpiece reads the organs the player opens, the MIDI files the player loads, and the impulse responses and Scala .scl files the player picks. The paths of an impulse response and a Scala file are stored in the organ’s .mporgan file.
Privacy
Masterpiece’s one connection is the update check, from version 0.8.1. The control API and the web console, when the player turns them on, serve the local network and send nothing out; see Remote control.
- The update check. Once a day, ten seconds after the standalone program starts, it asks GitHub for the newest release of Masterpiece, at
https://api.github.com/repos/bonninr/masterpiece/releases/latest, and reads its version number. When that number is newer, the right of the status bar reads Masterpiece %1 is out (with the number) for 30 seconds, with Download, which opens the release page, Never check again and a close button. Nothing takes the focus or waits for an answer. Help > Check for updates… asks at once, and the status line says Masterpiece %1 is the latest version. or shows the notice. The request carries nothing about the player or the organs; like any request for a web page, it reaches GitHub with the computer’s IP address. Masterpiece keeps only the time of the last check (updatecheckedat). A check that gets no answer within 5 seconds says nothing and is tried again the next day. The plugins never check on their own, and neither does a scripted run (--play-midi,--gui-only,--draw-only, or the environment variableMASTERPIECE_UPDATE_CHECK=0).MASTERPIECE_UPDATE_URLreads another address, for a test server. - Turning it off. Check for updates daily on the Diagnostics tab of the settings window, or Never check again in the notice (
updatecheck 0insettings.mpglobal). - On Linux the release is read with the system’s
curlcommand; without one, the check does nothing. The build switches off JUCE’s web browser andcurlfeatures. - On Android the app asks for the internet permission for this check, besides Bluetooth (to find Bluetooth MIDI devices), location up to Android 11 (a platform requirement for Bluetooth scanning, never read) and storage up to Android 12 (to open organ files).
- The Flatpak bundle has network access for this check.
- There is no account, no analytics and no crash reporting.
- The log records what the program did, such as the organ that loaded and the devices found. It leaves the computer only when the player attaches it to a report. On a phone, Send the report and the log opens the system’s share sheet, and the player chooses the destination.
- The LV2 identifier
https://masterpiece.audio/plugins/masterpieceis a name that hosts compare. No program opens it.
The privacy policy is at masterpieceorgan.com/privacy.html.
What is safe to delete
| Item | Effect of deleting it |
|---|---|
masterpiece.log, masterpiece.previous.log | None. |
cache/ files | The next load rebuilds the cache. |
backups/ | The settings saved before imports and copies are gone. |
Standard noises/ | Regenerated when needed. |
Packaged/<id>/ | Unpacked again at the next open; needs the original archives. |
Portable/ | An organ kept playable without its files needs a complete load again. |
window.txt, dialogs.txt | Window and dialog sizes reset. |
audio.xml | The audio device resets to the defaults. |
jack-connections.txt | JACK connections must be made again. |
midi/<organ>.mpmidi, midi/console.mpmidi | MIDI mappings must be made again. |
organs/<organ>.mporgan | The organ’s settings reset; its Organ settings open before its next first load. |
settings.mpglobal | All program-wide settings, the outputs, favourites and libraries reset; the first-run wizard returns. |
consoles/ | The console profiles are lost for good. |
jOrgan/<name>-<hash>/ | Converted again at the next open of that jOrgan organ. |
combinations/*.mpcomb, split/*.mpsplit, split-keyboard.txt | The stored pistons, splits and presets are lost for good. |
Close Masterpiece before deleting files in the settings folder: the program rewrites several of them as it runs and at exit.
Troubleshooting and caveats
This page lists symptoms with their causes and remedies, explains the log and the checks that Masterpiece offers, describes how to report a problem, and ends with the known limitations. Each symptom names the message or status text the program shows, so that a message on screen leads to its section.
The log and the checks
Masterpiece writes a log of every session. It records the audio device, every stage of each load with its time, the files that could not be read, MIDI events when logging is on, and the reason for each failure. Most causes on this page can be read from it.
Open Help > Diagnostics…, the Diagnostics tab of the settings window.
| Control | What it does |
|---|---|
| Path of the log | The text at the top gives the full path of the current log. If no log is written, it says No log is being written. |
| Open the log folder | Shows the log in the system’s file manager. Desktop systems only. |
| Run the checks | Writes a report of the folders, audio, MIDI inputs, organ and memory settings into the box below. |
| Copy the report | Copies the checks and the last 200 lines of the log to the clipboard, for a bug report. |
| Send the report and the log | Phones and tablets only. Shares a report file, the log and the previous log through the system’s share sheet. |
| Log every MIDI message and what became of it | Same as --log-midi. Lasts until Masterpiece quits. |
| Log every key release: the release played, its length and start | Same as --log-releases. Lasts until Masterpiece quits. |
| Check for updates daily | The once-a-day update check (see Files and folders). Help > Check for updates… asks at once. |
The files are masterpiece.log and masterpiece.previous.log in the settings folder (see Files and folders). At each start the current log becomes the previous log and replaces the older one. After a crash, copy masterpiece.previous.log before starting Masterpiece again: a second start moves the log of the next session over it. The plugins write no log.
What Run the checks reports
| Line | Meaning |
|---|---|
| Version, system, processors, memory | The program version, the operating system, the processor count and the memory in MB. |
| Settings folder, Sample cache, Temporary folder | Each folder’s path, can be written or CANNOT be written, and the free space in GB. A folder that cannot be written is a cause of lost settings, a missing cache and failed unpacking. |
| Cache folder chosen cannot be used | The folder chosen in Cache folder, on the General tab of the settings window, cannot be created, so the usual folder is used. |
| Cache files | The number and total size of .mpcache files in the cache folder. |
| Organs unpacked from their archives | The number of folders under Packaged. |
| Log | The log’s path and size, or No log is being written. |
| Audio | The device’s sample rate and block size, or Audio: not running. |
| MIDI inputs | The names of the inputs the system lists. A keyboard missing here is not visible to the system. |
| Organ, the definition, the organ folder | The loaded organ’s path, whether the file exists and can be read, and whether the folder that holds its samples exists. |
| Ranks, stops, console pages | The size of the loaded organ. |
| Samples kept as | The resident format, the memory limit and the number of stream underruns. |
| Impulse response | The loaded room impulse response, or none. |
Lines start with ok for a passed check, FAILED for a failed one, and blanks for facts.
Reporting a problem on GitHub
Open an issue at github.com/bonninr/masterpiece/issues. Include:
- The log, and
masterpiece.previous.logafter a crash. Use Copy the report for the checks and the end of the log. - The name of the organ and where its sample set comes from.
- The Masterpiece version (the window title shows it, or
Masterpiece --version; a test build shows its commit there) and the operating system. - What was done, what happened and what was expected.
For a keyboard or piston that does nothing, start with --log-midi and send the log. For a click or noise at key release, use --log-releases. For a fault that cannot be repeated, --record-midi saves the performance (see Command line).
The log contains the organ’s file name and the folders used, and leaves the computer only when it is attached to a report.
No sound
Check these in order.
| Check | Cause and remedy |
|---|---|
| The status line says No organ loaded. | Open an organ with File > Open organ…. |
| The status line says graphics only - no audio loaded, or Load cancelled - no organ is loaded | A console-only load reads no audio. It also follows a Cancel or a memory stop before any sample was read. Reload the organ with Organ > Reload organ or open it again. |
| No stop is drawn | Draw a stop on a division that a manual plays. The stop list marks stops that cannot sound (see A stop that does not sound). |
| The meters stay flat while keys sound on screen | The audio device. The log line audio device: names it. Pick another device or driver under Settings > Audio…. A saved setup that has no live output falls back to the defaults at the next start, and the log says so. |
| The volume slider is at the bottom | The slider covers -40 dB to +24 dB and -40 dB is silence. |
| Keys on a MIDI keyboard do nothing, the on-screen keyboard works | The input is switched off or the channel plays no manual. Tick the keyboard under Settings > MIDI… and check the manual’s channel. For eight seconds after such a note the status line reads <device> plays no manual on channel N: set its channel in Settings > MIDI. Start with --log-midi: the log names the cause, for example channel 2 plays no manual. |
| A MIDI input shows in use by another program; opened when it is free | See A MIDI input is held by another program. |
| The status line shows N awaiting a licence or licensed samples not loaded | The set needs its publisher’s licence confirmed. Choose Organ > Licence accepted and answer Load the samples. |
| The dialog This organ’s samples are encrypted appears | The samples are in the encrypted .hbw or .hbx form. Masterpiece skips them and cannot play them. |
| N missing (named in the log) | Sample files are absent. See A package cannot be found. |
| Only some pipes are silent | Samples are missing, unreadable, or left out. See A stop that does not sound. |
| The load is still running | The engine is silent during the load, and notes played meanwhile are dropped. |
| A battery speaker wakes late and swallows the first notes | Switch on Keep portable speakers awake in Settings > Audio…. It plays a 20 Hz tone at the chosen level, -80 dB to -40 dB. |
| Level or pitch sags as stops are drawn | The wind model lowers the pressure of a full registration, and pitch and level follow it. Wind model in Organ settings > Loading switches it off. |
Dropouts and clicks
Masterpiece counts blocks that took longer to render than the audio they make. The status line shows late blocks N, and the log gains lines of the form audio: N late block(s) of M; the slowest took X% of its time. Late blocks are the dropouts.
| Cause | Remedy |
|---|---|
| Audio buffer too small | Raise the buffer under Settings > Audio…. The line Note delay: %1 ms (buffer %2 ms, output %3 ms) shows the delay it costs. A first start picks about 10 ms. |
| A sample rate below 44.1 kHz | The program moves such a device to 48 kHz, or 44.1 kHz, at startup and logs it. |
| Too many voices for the processor | Choose a lower Performance preset, or lower Polyphony limit, in Settings > Performance…. A new pipe takes the place of a dying one past the limit. |
| The engine setting | Faster audio engine is on by default and renders several samples at a time on AVX2 or NEON processors. Switch it off to test whether it is the cause. |
| Convolution reverb | Impulse-response reverb (Organ > Reverb…) is the most expensive stage of the audio callback. Switch it off, or tick Bypass all effects in Organ settings > Loading. |
| Release tails read from a slow disk | The status line shows streamed releases fell behind Nx: turn off “Stream release tails” in Organ settings. The box is Stream releases from disk on the Loading tab of Organ settings. Switch it off, choose a longer Release buffer, choose Hold 50% of each release or Hold 75% of each release, or move the samples to an SSD. Streaming needs SSD-class storage. |
| The cache is written while playing | With Save the sample cache set to In silence, while it plays, the write waits for silence. Before the organ plays moves it before playing. |
| Memory exhausted and the system swaps | Use a smaller Quality preset: 16-bit, compressed, streamed releases. See Memory, loading and streaming. |
| Windows shared audio mode | Shared mode adds delay. Use WASAPI exclusive or ASIO for low latency. |
| Linux drivers | The list holds ALSA and, when a JACK library is installed, JACK (including PipeWire’s JACK). Try another type under Audio. |
Two more status-line items mark lost sound. dropped N counts note-ons that found no free voice. no audio N counts note starts whose audio was not in memory.
A click or noise when keys are released can come from the release samples. Start with --log-releases or switch on the release log, then play the passage; the log describes each release. Release tails end below (default -90 dB) ends a tail when it has stayed under that level for a twentieth of a second. A value of -80 dB can end the last decay of a large chord early.
A stop that does not sound
A stop button has one of three looks.
| Look | Tooltip | Cause and remedy |
|---|---|---|
| Normal | None | The stop plays. If it makes no sound, check the manual’s channel, the couplers and that the stop’s division has pipes for the keys. |
| Disabled | This stop’s ranks ship no pipes in this sample set | The ranks of the stop have no samples in this set. Demonstration sets ship only part of the organ. The same note appears on the Stops, ranks and perspectives tab of Organ settings. |
| Dimmed | Not loaded: chosen in Organ settings, Stops | The stop was left out of the load, by itself, with its perspective or its ranks, or by Only the stops drawn now. Tick it on the Stops, ranks and perspectives tab of Organ settings and load the organ again. |
Other causes:
- A perspective left out takes every rank recorded from that position. Check the perspectives list.
- With Notes loaded set to Every second note or Every third note, the keys between play their neighbour’s samples, retuned.
- Files that are missing, unreadable, encrypted or awaiting a licence leave their pipes silent. The status line counts them, and the log names the first ones (
samples: missing,samples: unreadable). - A load started with
--preload-drawnor--preload-ranksleaves every other stop silent for the session. - A stop that is a noise (a key, stop or blower noise) sounds when its switch moves.
- An organ that declares no key flow plays every division on every key, and its couplers do nothing.
A package cannot be found
Some organs, composites in particular, play packages that are not in their own folder. When Masterpiece cannot find one, the dialog A package this organ plays is missing names the package and its number. Choose:
| Button | Effect |
|---|---|
| Choose an archive… | Points to the .rar or .orgue file that holds the package. The choice is kept for this organ. |
| Choose a folder… | Points to the folder that holds the package, or the folder that holds its archives. |
| Play without it | Loads the organ with silent pipes for that package. |
Masterpiece looks in the organ’s folder, in the folders directly in it, in the Package folder set on the General tab of the settings window, and in the sample libraries it knows. Folder and file names are found in any case, so a set made on Windows loads on Linux and macOS. The log lines begin load: package. The answers are saved in package-folders.txt and joined-packages.txt in the organ’s folder.
The standard components of the format (package 1) come with no sample set. Masterpiece makes stand-ins for their key, stop and blower noises and does not ask for them.
If the samples are in a different place from the definition, set Organ folder on the Loading tab of Organ settings (or --organ-root) to the folder that holds OrganInstallationPackages.
A RAR package does not open
Masterpiece opens .rar and .orgue packages in place. A failure shows a dialog Could not open <file> or <file> is damaged, with the text below, and the log lines begin archive:.
| Message | Cause and remedy |
|---|---|
is still downloading (<name>.crdownload is beside it) | A partial-download file (.crdownload, .part, .download or .opdownload) is beside the archive. Open it when the download has finished. |
is one volume of a multi-volume set, and part N is not in the same folder | A volume is missing. Put every volume of the set in one folder and open the first volume. |
looks like a download the browser renamed, adding a number | A copy named like Name (1).rar or Name.1.rar replaces a volume. Rename it to the name without the number, or delete it when the original is there. |
is not the first volume of its set, and the first volume is not beside it | Put the first volume beside it. |
does not follow <volume> | The volumes come from different downloads. Download all volumes again from one source. |
is damaged from <N> MB on (<P>% of the file) | That volume is cut short or corrupted. Download that volume again. |
is password-protected | Masterpiece cannot open password-protected archives. Extract the archive with the password and open the organ definition inside. |
is a solid RAR 4 archive split into volumes | Masterpiece cannot read this kind directly. Extract it with 7-Zip or WinRAR and open the definition (OrganDefinitions/*.Organ_Hauptwerk_xml). |
is an organ definition, not a package | The file is a Hauptwerk-format or GrandOrgue definition saved with a package’s name. Open it with File > Open organ…. |
is text saved under the package's name, not the package | The download link led to a web page or a message, such as a sign-in, a redirect or an error. Download it again from the sample set’s site. |
holds only zeros: its download did not finish | The download stopped after the space was reserved. Download it again. |
is not a RAR or ZIP archive that Masterpiece can read | The file is none of the above: another format, or cut off at the start. |
the package needs another package, id N, which is not beside it | A GrandOrgue .orgue names a second package. Put it in the same folder. |
no archive found at <path> | The path is wrong. |
there is no organ definition file (.Organ_Hauptwerk_xml) in <file> or the packages beside it | The archive holds samples only. Open it together with the package that holds the definition, in the same folder. |
A RAR 4 archive in a single file opens directly, solid or not. WavPack samples load whole, with their loop and release marker.
Parts of one set that carry numbered names (01_, 02_, 03_) or share a package join automatically when they sit in one folder.
A package that opens but loads with the dialog Some samples could not be read has damaged files. The text says that the pipes of those files are silent and that the organ plays without them. Test the archive in 7-Zip or WinRAR and download it again. A damaged unpack is not marked as finished, so the next open unpacks again.
The dialog Some samples are missing names the files that the organ definition lists and the disk does not hold, the first three of them, with the count. Their pipes are silent, and a stop with none of its samples does not respond to a click. The organ was installed in part, or a package it needs was left out: install it again with every package it needs. The log lists the first 50 missing files and the count of the others.
Phones and tablets open .rar and .orgue packages only. On iPhone and iPad, a package picked on its own is lent without its folder; the dialog The rest of <file> asks for the folder that holds the other volumes.
Slow loads
The dialog shows the phase (Opening the archive, Reading the archive, Extracting definitions and artwork, Reading the organ definition, Building the wind model, Wiring the console, Finding the samples, Loading samples from the cache, Loading samples, Creating the sample cache, Preparing to play, Building the console) and, for samples, the count and the time left. Cancel stops the load. During Creating the sample cache the button reads Skip the cache and opens the organ without the cache.
| Cause | Remedy |
|---|---|
| First load of an organ | Decoding the samples takes most of the time. The cache makes the next load a single read. |
| The cache is off or replaced | Under Sample cache, on the General tab of the settings window, use One cache per organ (uses more disk) when you alternate between organs. |
| Settings changed since the cache was written | Any change to the stored samples (storage, compression, mono, rate, releases, streaming, notes loaded, the ranks) rebuilds the cache. The dialog Rebuild the sample cache? appears when you close Organ settings after such a change. |
| First open of a package | Indexing and unpacking the archives takes minutes for a large set (This may take a few minutes). The result stays in Packaged, so the next open skips it. |
| Samples on a hard disk or a network drive | Move the set, and the cache folder, to an SSD. |
| Large release tails | Stream releases from disk skips reading the tails, which were 56% of the sample data on the measured set. |
| Quality preset | Recommended: 16-bit, releases streamed and the presets below it stream the releases, which shortens loads. |
| Cache write after loading | Save the sample cache set to In silence, while it plays opens the organ first. |
Follow the progress by ear with Click at each 10% while loading, on the General tab of the settings window.
On iPhone and iPad a load holds while Masterpiece is in the background and goes on when it is in front again.
Memory is full
Masterpiece stops a load at the memory limit (default: 80% of the computer’s memory, at least 512 MB; the voice pool counts against it), and before the system runs short of free memory, keeping the larger of 256 MB and a twentieth of the memory free. Two dialogs follow.
- Not enough memory for this organ: nothing loaded. The console shows silent so that Organ settings can be opened from the Organ menu.
- Only part of this organ fits: the samples read so far play, other stops or notes are silent, and the status line shows INCOMPLETE (memory limit) or INCOMPLETE (memory low). At the limit the message ends by pointing to Memory limit for samples; for low memory it starts with closing other programs.
After a load, the voice pool is built in the memory left. When fewer voices fit than the polyphony asks for, the pool is smaller and the log says voices: N of the M asked for: the memory free allows no more.
Remedies, in the order of their effect:
- Stream releases from disk (needs an SSD).
- Lossless compression in memory (24-bit and 16-bit).
- Resident format: 16-bit.
- Notes loaded: Every second note or Every third note.
- Load in mono (halves memory, gives up the stereo image).
- Sample rate: 48 kHz or 44.1 kHz for sets recorded at 96 kHz.
- Preloaded per sample: Up to the loop (less memory).
- Leave out perspectives, stops or ranks on the Stops, ranks and perspectives tab of Organ settings. The tab shows the memory each choice takes.
- Releases and Release length: keep one release, or shorter ones.
- Raise Memory limit for samples (50% to 90% of memory), in Settings > Performance…, only when the computer has the memory to spare.
The Quality presets apply the first steps in order. Settings take effect at the next load; Load the organ to apply loads at once. See Memory, loading and streaming and Small, medium and large organs. Plugin instances each hold their own copy; see Plugins in a DAW.
A MIDI input is held by another program
Windows gives a MIDI port to one program at a time. When another program holds a keyboard, Masterpiece cannot open it. The list under Settings > MIDI… shows the input ticked with the text in use by another program; opened when it is free, and a box <name> could not be opened appears when you tick it. Masterpiece tries again every 3 seconds and opens the input when the other program lets it go. The log writes midi: <name> could not be opened (another program may be using it); it is tried again every few seconds and later midi: <name> is free now and has been opened.
Close the other program, or send its MIDI to Masterpiece through a loopback port such as loopMIDI. On macOS and Linux, --virtual-midi publishes a port for other programs to send to.
A crash during a load (the crash guard)
Before a load, the standalone program writes the organ’s path as running in settings.mpglobal. A clean exit removes it. A shutdown, logout or SIGTERM or SIGHUP on Linux and macOS counts as a clean exit. On a phone or tablet, going to the background counts as one.
If the entry is still there at the next start, the last session ended with that organ loading or loaded. The log records:
start: the last session did not end cleanly while <file> was loaded
and ends with ; reopened when the same organ was opened again. The program shows no dialog.
Reopen the last organ when Masterpiece starts (on the General tab of the settings window) is off by default. When it is on, the last organ that loaded completely opens at start. A load that failed or crashed does not become the last organ.
To find the cause, send the log of the crashed session (masterpiece.previous.log) with the organ’s name. A crash while loading is most often memory (see Memory is full) or a damaged sample file. To test whether the samples are the cause, open the organ with --gui-only.
The display looks wrong
- The console is cut off or too small. The artwork is scaled to fit the window, so a smaller window shrinks it. Enlarge the window.
- The wrong console layout. Organs that ship several console sizes show Console: main and Console: alt N in a list in the top bar, with
(portrait)marking tall ones. The program chooses a layout for the window’s shape (wide or tall) and keeps a choice made by hand until the shape turns. - The window opens off screen or at a strange size. The position is stored in
window.txt. A window that no screen shows is moved onto a screen at startup. Close Masterpiece and deletewindow.txtto reset it.dialogs.txtholds the dialog sizes. - A touch screen does not react where it is tapped. Start with
--log-touches. The log names the component that took each press.
Known limitations and caveats
Format and sample support:
- Encrypted samples (
.hbw,.hbx) are skipped and listed in the load report. - GrandOrgue divisional couplers are skipped on import.
- Password-protected archives cannot be opened.
- A solid RAR 4 set split into volumes is read after extracting it.
.rarand.orgueare the package formats.- A set that requires a publisher’s licence loads its samples only after you confirm that you hold it. Masterpiece cannot check the licence.
- Demonstration sets ship only part of an organ; their other stops are disabled.
Loading and memory:
- Every rank loads, drawn or not, unless it is left out on the Stops, ranks and perspectives tab, so a full registration costs no more memory than one stop.
- All loading settings take effect at the next load.
- Streaming release tails needs a fast disk, such as an SSD.
--preload-drawnand--preload-ranksleave every other stop silent.- A load stopped at the memory limit, or when free memory runs low, keeps what fitted and plays incomplete, or shows the console without sound.
- One load runs at a time.
- The sample cache can reach several gigabytes.
Platforms:
- Windows needs version 10 1607 or later.
- Windows cannot publish a virtual MIDI port; use a loopback driver.
- Phones and tablets accept
.rarand.orguepackages only. - The macOS build is unsigned.
- The Flatpak and the Raspberry Pi packages carry no plugins.
Plugins:
- A host project stores the path of the organ the instance played and reopens it when the project opens. The stops drawn come from the files in the settings folder.
- In a plugin, the settings window opens without the Audio, MIDI, Console MIDI and Remote control tabs and Organ settings without its MIDI tab, because the host owns the audio device and the MIDI ports.
- The plugin has no MIDI output, no log and no crash guard.
- Each instance holds its own copy of the samples.
See Plugins in a DAW for the details.
Controls and files:
- Changing a loading setting does not affect the organ already loaded.
- Moving an organ that declares no identity starts it with fresh settings, because its files are named from the path.
- The player’s combinations are files in the settings folder and are lost when those are deleted.
Building from source
This page covers building Masterpiece from the repository: the tools each system needs, the CMake presets and options, the app, the plugins and the tests, cross-compiling for the Raspberry Pi, the Android and iOS builds, the Flatpak, the installers and the release version. After reading it you can produce every artifact the project publishes.
Prerequisites
Every desktop build needs:
- A C++20 compiler.
CMakeLists.txtsetsCMAKE_CXX_STANDARD 20as required and without extensions, so CMake refuses a compiler that lacks C++20. CI builds with MSVC from Visual Studio 2022 (windows-latest), the default GCC of Ubuntu 22.04 (ubuntu-22.04, including the ARM cross compilers) and Apple Clang (macos-15). - CMake 3.22 or later (
cmake_minimum_required(VERSION 3.22)). - Ninja. Every desktop preset uses the Ninja generator.
- Git and network access. CMake fetches the dependencies at configure time with
FetchContent.
CMake fetches these libraries; nothing else needs installing for them:
| Library | Version | Used by | Option |
|---|---|---|---|
| JUCE | tag 9.0.1 | audio, GUI, plugin wrappers | MP_FETCH_JUCE, MP_JUCE_TAG |
| pugixml | tag v1.16 | the definition loader (mp_core) and Verovio | MP_FETCH_PUGIXML, MP_PUGIXML_TAG |
| cpp-httplib | tag v0.18.1 | the control API’s HTTP server (mp_api); the header only | MP_ENABLE_API, MP_HTTPLIB_TAG |
| libarchive | tag v3.8.10 | RAR 5, non-solid RAR 4 and .orgue packages (mp_archive) | MP_FETCH_LIBARCHIVE, MP_LIBARCHIVE_TAG |
| unarr | commit 9c8e898b... | solid RAR 4 packages (mp_archive); only its RAR 4 reader is compiled | MP_FETCH_UNARR, MP_UNARR_COMMIT |
| WavPack | tag 5.8.1 | WavPack-compressed samples | MP_FETCH_WAVPACK, MP_WAVPACK_TAG |
| Verovio | tag version-6.3.0 | the score panel’s MusicXML engraving (mp_score) | MP_ENABLE_SCORE, MP_VEROVIO_TAG |
libarchive is configured with every optional codec, crypto backend and command-line tool switched off; its own RAR decoders are the only ones used. WavPack is built as the decoder library only, with support for WavPack 1 to 3 files enabled. cpp-httplib is used as its single header, with no TLS and no compression. cmake/MpVerovio.cmake compiles Verovio’s sources into the static library mp_verovio: the MusicXML reader alone, the editor code left out, compiled for size (-Os, /O1) and without link-time optimisation, and linked against the project’s own pugixml, which is why the pugixml tag is v1.16.
Windows
- Visual Studio 2022 or its Build Tools with the Desktop development with C++ workload.
- CMake and Ninja on the
PATH. - Build from the x64 Native Tools Command Prompt, which puts the MSVC compiler on the path.
The build links the Visual C++ runtime statically (/MT, /MTd in Debug), so the executable needs no Visual C++ Redistributable on the machine that runs it. ASIO support is compiled in (JUCE_ASIO=1) using the ASIO headers that JUCE bundles, under the GPL option of the Steinberg ASIO licence; no SDK download is needed. The Windows installer needs NSIS (makensis).
macOS
xcode-select --install
brew install cmake ninja
On Apple Clang the build adds -fno-strict-aliasing and defines JUCE_USE_VDSP_FRAMEWORK=1. The CI builds set the oldest macOS the app opens on with -DCMAKE_OSX_DEPLOYMENT_TARGET: 11.0 for Apple silicon and 10.15 (with -DCMAKE_OSX_ARCHITECTURES=x86_64) for Intel. Apple silicon and Intel are built as two separate apps.
Debian, Ubuntu and Raspberry Pi OS
sudo apt-get install -y build-essential git cmake ninja-build pkg-config \
libasound2-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev \
libxcomposite-dev libfreetype6-dev libfontconfig1-dev libglu1-mesa-dev \
mesa-common-dev libxi-dev libjack-jackd2-dev
libjack-jackd2-dev supplies headers only. JUCE’s JACK backend (JUCE_JACK=1) includes <jack/jack.h> to compile and loads libjack.so.0 when it scans for devices, so a machine that has no JACK library runs the program, and the .deb lists no JACK dependency. The embedded web browser and curl are switched off (JUCE_WEB_BROWSER=0, JUCE_USE_CURL=0), so no WebKit or GTK packages are needed.
Other platform tools
| Target | Tools |
|---|---|
| Android | Android SDK with NDK 27.2.12479018 and CMake 3.22.1, JDK 17 or later, Git |
| iOS | Xcode with the iOS SDK |
| Flatpak | flatpak-builder and the freedesktop 24.08 runtime and SDK |
| Windows installer | NSIS |
| Debian packages | cpack (part of CMake) |
Presets
CMakePresets.json (version 6) holds the configure, build and test presets. All of them derive from the hidden preset base, which selects the Ninja generator, the build directory build/<preset>, the install directory install/<preset>, MP_FETCH_JUCE=ON and MP_JUCE_TAG=9.0.1.
| Preset | Configuration | What it builds | Used for |
|---|---|---|---|
dev | Release | App, plugins, tests; DSP and streaming on | A full local build |
dev-fast | Release | App, tests; no plugins; MP_ENABLE_LTO=OFF | Iteration |
dev-debug | Debug | App, plugins, tests | Debugging |
core-only | Release | Tests only; no app, no plugins; MP_ENABLE_DSP=OFF | Running the tests without compiling the DSP |
ios-sim | Xcode generator | The iOS app (CMAKE_SYSTEM_NAME=iOS, deployment target 15.0) | iOS simulator and device builds |
ci-linux | Release | As dev | CI, Linux x86-64 |
ci-macos | Release | As dev | CI, macOS |
ci-windows | Release | As dev | CI, Windows |
ci-functional | Debug | Tests with MP_BUILD_ASAN=ON and MP_BUILD_COVERAGE=ON | Sanitizer and coverage runs |
ci-perf | Release | Tests; DSP and streaming on | Performance tests |
ci-linux-arm | Release | App for 32-bit Raspberry Pi OS, cross-compiled | CI, armhf |
ci-linux-arm64 | Release | App for 64-bit Raspberry Pi OS, cross-compiled | CI, arm64 |
Build presets exist for every preset except ios-sim. Test presets exist for dev, dev-fast, core-only, ci-linux, ci-macos, ci-windows, ci-functional, ci-perf and ci-linux-arm. All test presets print the output of failing tests.
The workflow .github/workflows/build.yml uses ci-linux, ci-windows, ci-macos, ci-linux-arm, ci-linux-arm64 and ios-sim. It has no job for ci-functional or ci-perf; run those presets locally. See Continuous integration.
The two ARM presets set CMAKE_SYSTEM_PROCESSOR and the cross compilers (arm-linux-gnueabihf-gcc and aarch64-linux-gnu-gcc), name their toolchain file, switch off the plugins and the tests, and set MP_ENABLE_LTO=ON and MP_NATIVE_ARCH=OFF.
A file named CMakeUserPresets.json is ignored by Git and holds personal presets.
CMake options
| Option | Default | Effect |
|---|---|---|
MP_BUILD_STANDALONE | ON | Builds the standalone app, target MasterpieceApp. |
MP_BUILD_PLUGIN | ON | Builds the plugins, target MasterpiecePlugin: VST3 and AU on macOS, VST3 and LV2 on Windows and Linux. |
MP_BUILD_CLAP | OFF | Builds the plugin as CLAP too, target MasterpiecePlugin_CLAP, through clap-juce-extensions (commit MP_CLAP_JUCE_COMMIT, default 3837f4a, fetched, or a checkout with its submodules named by MP_CLAP_JUCE_DIR). CLAP id org.masterpiece.player, features instrument and sampler. Tried on Linux only; not in CI or the release. A host must offer timer support, which runs JUCE’s message loop. |
MP_BUILD_TESTS | ON | Builds mp_tests and registers the CTest tests when tests/ exists. |
MP_ENABLE_DSP | ON | Compiles mp_dsp: wind, tremulant, enclosure and voicing processing. It can still be switched off per organ at run time. Requires JUCE (juce_dsp). |
MP_ENABLE_STREAMING | ON | Adds src/mp_sampler to the build. mp_audio includes headers from mp_sampler, so leave it ON for every build of the app or the plugins. |
MP_BUILD_ASAN | OFF | Adds -fsanitize=address,undefined (GCC and Clang). |
MP_BUILD_COVERAGE | OFF | Adds --coverage (GCC and Clang). |
MP_ENABLE_LTO | ON | Turns on interprocedural optimisation in Release builds when the compiler supports it. |
MP_NATIVE_ARCH | OFF | Compiles for the build machine’s CPU: -march=native, or /arch:AVX2 on MSVC. Leave it off for builds that run on other machines. |
MP_FETCH_JUCE | ON | Fetches JUCE with FetchContent. With OFF, CMake calls find_package(JUCE CONFIG REQUIRED). |
MP_JUCE_TAG | 9.0.1 | The JUCE tag to fetch. |
MP_JUCE_REPO_URL | the JUCE GitHub repository | Where to fetch JUCE from. |
MP_JUCE_SOURCE_DIR | empty | A local JUCE checkout to use in place of a fetch. Read when MP_FETCH_JUCE is ON. |
MP_FETCH_PUGIXML, MP_FETCH_LIBARCHIVE, MP_FETCH_UNARR, MP_FETCH_WAVPACK | ON | Fetch the library. With OFF, CMake looks for an installed copy with find_package. |
MP_ENABLE_API | ON; OFF on Android and iOS | Compiles src/mp_api: the control API, the web console, MIDI SysEx and OSC. Fetches cpp-httplib. |
MP_ENABLE_SCORE | ON | Compiles the score panel (src/mp_score) with Verovio, when the JUCE GUI modules are present. |
MP_VEROVIO_CCACHE_DIR | the environment variable of the same name | A compiler cache for the Verovio sources alone; CI keeps it apart from the main cache. |
On Android and iOS, CMake sets MP_MOBILE and forces MP_BUILD_PLUGIN and MP_BUILD_TESTS to OFF. Phones and tablets build the app alone.
Building the app
cmake --preset dev
cmake --build --preset dev
The app lands in build/dev/apps/MasterpieceApp/MasterpieceApp_artefacts/Release/:
| System | Product |
|---|---|
| Windows | Masterpiece.exe |
| macOS | Masterpiece.app |
| Linux | Masterpiece |
JUCE places artefacts in a subdirectory named after the configuration, so a Debug build writes to .../Debug/. To build one target, add --target MasterpieceApp.
For quick iteration, dev-fast skips the plugins and link-time optimisation:
cmake --preset dev-fast
cmake --build --preset dev-fast
Building the plugins
MasterpiecePlugin is built when MP_BUILD_PLUGIN is ON. The presets dev, dev-debug, ci-linux, ci-macos and ci-windows build it; dev-fast, core-only, ci-functional, ci-perf and the ARM presets switch it off. The target declares the formats VST3 AU on macOS and VST3 LV2 elsewhere. CI builds the program with -DMP_BUILD_PLUGIN=OFF and the plugins in a job of their own with -DMP_BUILD_STANDALONE=OFF, so the two sets of link-time optimised links run on separate runners. Plugin identity:
| Property | Value |
|---|---|
| Plugin code | Msp1 |
| Manufacturer code | Mspc |
| LV2 URI | https://masterpiece.audio/plugins/masterpiece |
| Type | Synthesizer, MIDI input, no MIDI output |
The products are in build/<preset>/apps/MasterpiecePlugin/MasterpiecePlugin_artefacts/<Configuration>/, in the subfolders VST3 (Masterpiece.vst3), AU (Masterpiece.component, macOS) and LV2 (Masterpiece.lv2). The plugin’s getStateInformation stores the path of the organ definition that is loaded, and setStateInformation loads that organ again; the organ’s settings are kept in Masterpiece’s own files.
The plugin entry point (apps/MasterpiecePlugin/PluginEntry.cpp) returns the same MasterpieceProcessor the standalone app drives. See Architecture.
Building the tests
cmake --build --preset dev --target mp_tests
build/dev/tests/mp_tests --no-perf
ctest --preset dev runs the same binary as the CTest tests MpFunctional (--no-perf) and MpPerf (--perf-only). See Testing.
Cross-compiling for the Raspberry Pi
Both toolchains target a Debian or Ubuntu build host with multiarch libraries. The target libraries sit under /usr/lib/arm-linux-gnueabihf or /usr/lib/aarch64-linux-gnu on the build machine’s own root, so no sysroot is needed. Both toolchain files set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to NEVER, so tools such as JUCE’s juceaide helper run natively, and point PKG_CONFIG_LIBDIR at the target’s pkgconfig directory.
| File | Target | Compiler flags | Preset |
|---|---|---|---|
cmake/arm64-toolchain.cmake | 64-bit Raspberry Pi OS, aarch64 | none: ARMv8-A is the floor and NEON is part of it, so one binary covers Pi 3 to Pi 5 | ci-linux-arm64 |
cmake/arm-toolchain.cmake | 32-bit Raspberry Pi OS, armv7l | -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mthumb: covers Pi 2 to Pi 5 in 32-bit mode and excludes the ARMv6 Pi 1 and Zero | ci-linux-arm |
cmake/ci-arm-multiarch.sh <debian-arch> <triple> prepares an Ubuntu host. CI runs it as bash cmake/ci-arm-multiarch.sh arm64 aarch64-linux-gnu and bash cmake/ci-arm-multiarch.sh armhf arm-linux-gnueabihf. The script:
- Pins the existing apt sources to
amd64so that apt asks the amd64-only mirror for amd64 indexes alone. - Adds
ports.ubuntu.comas the source for the foreign architecture, including the-securitysuite. - Runs
dpkg --add-architectureandapt-get update. - Installs
cmake,ninja-build,pkg-configandgcc-<triple>,g++-<triple>,binutils-<triple>. - Installs the development libraries (
libasound2-dev, the X11 libraries,libfreetype6-dev,libfontconfig1-dev,libxi-dev,libjack-jackd2-dev) for the target architecture and for the host. The host copy is required: the cross build still compilesjuceaidenatively, and it linksjuce_graphics.
The script needs sudo and reads UBUNTU_CODENAME from /etc/os-release. Then:
cmake --preset ci-linux-arm64
cmake --build --preset ci-linux-arm64
The script’s package list has no GLU or Mesa packages, while the native Linux list above includes libglu1-mesa-dev and mesa-common-dev. The script’s comment says Masterpiece does not use JUCE’s OpenGL module and that GLU would pull in Mesa’s LLVM; the CI cross builds succeed with this list.
A cross-built binary cannot run on the build host. CI checks its machine type with file (ARM aarch64 or ARM, EABI) and installs the .deb in an emulated container of the target architecture.
Android
The Android build lives in android/ and uses Gradle around the repository’s own CMake build. Targets: arm64-v8a and x86_64 (phones, tablets and the emulator), Android 8.0 or later (minSdk 26; compileSdk and targetSdk 35). Needs the Android SDK with NDK 27.2.12479018 and CMake 3.22.1, JDK 17 or later and Git. On Windows, add Visual Studio 2022 or its Build Tools with the C++ workload.
cd android
./gradlew assembleRelease # gradlew.bat on Windows
The APK is android/app/build/outputs/apk/release/app-release.apk; install it with adb install -r. Set the SDK location with the ANDROID_HOME environment variable or a local.properties file in android/ containing sdk.dir=<path>.
How it fits together:
- Under the NDK, CMake builds
MasterpieceAppaslibjuce_jni.so, the library JUCE’s Java side loads. The Gradle build passes-DMP_FETCH_JUCE=OFFand-DJUCE_DIR=...,-DANDROID_STL=c++_static,-DANDROID_ARM_NEON=TRUEand related flags. - The first build clones JUCE at the tag named by
MP_JUCE_TAGintoandroid/.juce/and installs it for the build machine. JUCE’sjuceaidehelper has to run on the build machine. The Android build then finds that install withfind_package, and Gradle compiles JUCE’s Java glue from the same copy. The log isandroid/.juce/prepare.log. versionNameis the CMake project version;versionCodeismajor * 10000 + minor * 100 + patch.- Only release builds play organs; the engine cannot keep up unoptimised.
bundleReleaseproduces the App Bundleapp-release.aabfor Google Play. - Signing: a build is signed with the release key when
MP_ANDROID_KEYSTORE(the keystore path) andMP_ANDROID_KEYSTORE_PASSWORDare set in the environment, in~/.gradle/gradle.propertiesor in the repository’s.env. The key alias ismasterpiece. When they are unset the build uses the debug key: installable, and it cannot update a released version. CI reads the key from the repository secretsANDROID_KEYSTORE_BASE64andANDROID_KEYSTORE_PASSWORD, and a tagged release fails without them.
iOS
The ios-sim preset configures an Xcode project for the app alone, with deployment target 15.0. Despite the name it serves the simulator and devices; the SDK is chosen at build time. The commands CI runs:
cmake --preset ios-sim
# Simulator
cmake --build build/ios-sim --config Release --target MasterpieceApp -- \
-sdk iphonesimulator CODE_SIGNING_ALLOWED=NO
# Device, unsigned
cmake --build build/ios-sim --config Release --target MasterpieceApp -- \
-sdk iphoneos -arch arm64 CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
CI packs the device build as an unsigned .ipa (a ZIP with the app in a Payload folder). Apple runs only signed code, so the person installing it signs it with their own Apple ID; no developer account is needed to build it. The app is landscape only and registers as a document browser with file sharing enabled, so organs reach it through the Files app.
CI also runs the simulator build on iPad and iPhone devices with the scripts in .github/ios-check/: make_organ.py writes an organ of pure sine pipes with known levels, check_audio.py compares a recording of its playback with those numbers, and drive_ui.py taps through the interface by control names.
Flatpak
packaging/flatpak/io.github.bonninr.Masterpiece.yml builds an x86-64 Flatpak from the checkout it sits in.
| Item | Value |
|---|---|
| App ID | io.github.bonninr.Masterpiece |
| Runtime and SDK | org.freedesktop.Platform and org.freedesktop.Sdk, version 24.08 |
| Command | masterpiece |
| Permissions | --share=ipc, --socket=x11, --socket=pulseaudio, --filesystem=xdg-run/pipewire-0, --device=all, --filesystem=home, /media, /run/media, /mnt |
| CMake options | A Release build with the plugin, the tests and the developer tools switched off |
The first module installs the JACK headers from the jack2 v1.9.22 archive into /app/include/jack; JUCE needs them to compile and opens libjack itself at run time. The second module builds Masterpiece with cmake-ninja and --share=network, because FetchContent downloads JUCE and the other libraries during the build. A Flathub submission would need those sources listed in the manifest. The manifest also installs io.github.bonninr.Masterpiece.metainfo.xml and renames the shared MIME file to the app ID.
CI builds it in the job flatpak with flatpak/flatpak-github-actions/flatpak-builder inside the container ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-24.08, producing masterpiece-linux-x86_64.flatpak.
Packaging
cmake/Packaging.cmake is included for every non-mobile build that has the standalone app. It configures CPack for one package per system and installs only the app component, so the install rules of JUCE and the other fetched libraries stay out of the package. The package stays monolithic: CPack’s component mode produced an NSIS installer whose silent install did nothing.
Output names stay the same between releases.
| System | Generator | File |
|---|---|---|
| Windows | NSIS | masterpiece-windows-setup.exe |
| Debian, Ubuntu, Raspberry Pi OS | DEB | masterpiece-linux-amd64.deb, masterpiece-linux-arm64.deb, masterpiece-linux-armhf.deb |
Run cpack -G NSIS or cpack -G DEB inside the build directory (build/ci-windows, build/ci-linux).
The Windows installer installs bin\Masterpiece.exe and Uninstall.exe. It writes Start menu and desktop shortcuts, version information for the file’s Properties and the “Open with Masterpiece” registry entries for organ definitions and packages (packaging/openwith-install.nsh and openwith-uninstall.nsh), and a new version installs over the old one. CI installs it silently (/S /D=<folder>), starts the installed program, uninstalls it and checks that the files, the registry entry and the shortcut are gone.
The Linux package installs:
Path under /usr | Content |
|---|---|
bin/masterpiece | The app, lower case |
share/applications/masterpiece.desktop | The launcher |
share/icons/hicolor/256x256/apps/masterpiece.png | The icon |
share/mime/packages/masterpiece.xml | The organ file types |
Its section is sound. For native builds dpkg-shlibdeps works out the dependencies; cross-built packages use the list libasound2 | libasound2t64, libfreetype6, libfontconfig1, libx11-6, libxext6, libxrandr2, libxinerama1, libxcursor1, libgl1. CI installs each package in debian:12 and ubuntu:24.04 containers (emulated for ARM), checks that every library resolves, and removes it again.
macOS has no CPack package. CI copies Masterpiece.app into one folder and zips it with ditto, which keeps the bundle’s executable bit. The plugins job packs Masterpiece-plugins folders: Masterpiece.component and Masterpiece.vst3 on macOS (zipped with ditto), VST3 and LV2 folders on Windows and Linux. The release publishes them as masterpiece-<version>-plugins-<platform>. The macOS build is unsigned.
Continuous integration
.github/workflows/build.yml runs on every pull request and on every push to main. Changes that touch only the README, the site, the manual, the screenshots, the licence files or ATTRIBUTION.md start no build. A newer push to the same branch cancels the run in progress.
| Job | Runner | What it does |
|---|---|---|
build | ubuntu-22.04, windows-latest, macos-15 | The app for Linux x86-64, Windows, Raspberry Pi arm64 and armhf (cross-built on Ubuntu), macOS Apple silicon and macOS Intel; then the tests, a launch check, the packages and a package test |
plugins | the same, with no Raspberry Pi | The VST3, LV2 and AU plugins, configured with -DMP_BUILD_STANDALONE=OFF, in packages of their own |
flatpak | ubuntu-latest | The Flatpak bundle |
ios, ios-device | macos-15 | The simulator build and its run on iPad and iPhone; the unsigned device .ipa |
android | ubuntu-22.04 | The APK and the Google Play bundle |
Both macOS builds run on an Apple-silicon runner; the Intel build is compiled for x86_64, and its tests and launch check run under Rosetta. The Linux builds use Ubuntu 22.04 so the binaries need the glibc of Debian 12 and Raspberry Pi OS at most.
A pull request builds a reduced set: the Intel Mac and both Mac plugin jobs are left out, and every build is configured with -DMP_ENABLE_LTO=OFF. A push to main and a release build every target with link-time optimisation. The Linux job also runs python3 tools/gen-protocol.py --check, which fails when protocol/control.yaml and the files generated from it differ.
.github/workflows/main-latest.yml runs after each successful build of a push to main. It packages the artifacts as a release does, names them masterpiece-main-<name>, and replaces the files of the prerelease main-latest, so the newest build of main stays at the same download addresses. A prerelease is never the latest release, so the site’s downloads and the program’s update check stay on the tagged release.
Versioning
The version is the project(Masterpiece VERSION x.y.z ...) line in CMakeLists.txt. The app (MP_VERSION, printed by --version), the installer, the .deb, the Android versionName and versionCode, and the plugin bundles take it from there.
The build label is what the program shows in its title bar, its About box and its log. On a tagged release it is the version. Every other build carries the commit, five characters long: main 3fa91 for a build of main, dev 3fa91 for a pull request or a local build of another branch. CMake reads the commit with Git at configure time, and CI’s own variables say whether the build is a release. The update check and the settings archives use the version itself.
cmake/set-version.sh <x.y.z> changes that line and rewrites the download links in README.md (the releases/download/vX.Y.Z/ segment and the masterpiece-X.Y.Z- file names), then prints the project line and the number of README references. It uses GNU sed -i, so run it on Linux or in Git Bash. Run it on the release branch before tagging, so the README badges point at the files the tag is about to publish.
The script does not touch the <releases> list in packaging/flatpak/io.github.bonninr.Masterpiece.metainfo.xml.
Releasing
- Run
cmake/set-version.sh <version>on a branch and merge it. - Tag the merge commit
v<version>. .github/workflows/release.ymlstarts on a tag matchingv*, or by hand with the inputtagfor an existing tag. It callsbuild.yml, so a release is built by the steps that verify every pull request, then downloads the artifacts.- The
Packagestep zips or tars the loose-file artifacts, copies the finished packages (Windows setup,.deb, Flatpak, macOS zips, Android APK, iOS.ipa), and gives every file the version in its name:masterpiece-<version>-<name>. It stops if any file lacks the version. The Google Play bundle (play-bundle) is never published. gh release createpublishes the files asMasterpiece <tag>with--generate-notes; if the release exists,gh release upload --clobberreplaces the files.- The last step starts
pages.yml, which republishes the project site so its download links point at the new files.
The Android build fails on a tag unless the signing secrets are present. The iOS simulator job is skipped on tags; the .ipa job runs on them.
Architecture
This page describes how Masterpiece is put together: the modules under src/ and which of them are free of JUCE, the path from an organ file to sound, the samples held in memory, the switch network that models a console’s wiring, the threads and the rules the audio thread follows, and the vector engine. After reading it you can find where a behaviour lives and what a change there may and may not do.
Modules
Masterpiece is one engine and two front ends: the standalone app (apps/MasterpieceApp) and the plugins (apps/MasterpiecePlugin). Both drive the same MasterpieceProcessor.
| Module | Folder | JUCE | Content |
|---|---|---|---|
mp_core | src/mp_core | none | The organ model (OrganModel.h), the loader for Hauptwerk-format definitions (OdfLoader), the compiler for compact definitions (CodmCompiler), the GrandOrgue importer (GrandOrgueImport), temperaments and pitch (Temperament), perspectives (Perspectives), case-insensitive path lookup (PathCase), UTF-8 path helpers (Utf8Path.h), keyboard geometry (KeyboardLayout.h), load progress (LoadProgress.h), what a load reads (LoadPlan.h), sparse loading (SparseLoading), the names shown for console objects (ObjectLabels), the sizes of the GrandOrgue stock images (GrandOrgueStockImages.h, generated by tools/gen-grandorgue.py) |
mp_archive | src/mp_archive | none | OrganArchive: RAR packages and GrandOrgue .orgue packages read in place |
mp_sampler | src/mp_sampler | none | VoiceEngine (voices, stealing, interpolation, release streaming, worker threads), SimdRun (vector inner loops), attack and release selection (StreamingEngine), release phase alignment (ReleaseAlign.h), the sample codecs (SampleCodec, SampleCodecBuiltins, SplitRice) and the decode windows of samples held coded (DecodedWindow) |
mp_control | src/mp_control | none | SwitchNetwork, key flow (Control), CombinationSystem, PlayerCombinations, StageSwitchBank, WindSolver, MidiMap, MidiDeviceMap, LcdPanel, Registration, the combinaison coupler (PedalCoupling.h) |
mp_split | src/mp_split | none | The split keyboard: SplitKeyboard (the engine) and SplitText (its files) |
mp_dsp | src/mp_dsp | juce_dsp | Tremulant LFO and enclosure filter |
mp_audio | src/mp_audio | yes | MasterpieceProcessor, SampleLibrary, sample cache, WavPack format, convolution reverb, metronome, recorders and the archive of everything played (MidiArchive), live levels (LiveLevels.h), EQ, pan and width per rank and division (RankEq.h), voicing EQ presets, the output compressor and limiter, bass management (BassManager), real-time render threads (RealtimeThread), system memory (SystemMemory), the settings folder (DataFolder) and settings archives (SettingsArchive), score playback (ScorePlayer), split keyboard host, translations |
mp_api | src/mp_api | yes | The control API: ControlModel (the objects a client reads and changes), ApiServer (HTTP, the web console and its event stream), ConsolePages (the organ’s console pages for the web console), SysexTransport and OscTransport; ControlProtocol.h is generated from protocol/control.yaml. Compiled into mp_audio when MP_ENABLE_API is on |
mp_score | src/mp_score | none | ScoreEngraver: MusicXML engraved to SVG pages by Verovio, with the same score as MIDI and a time map. Built when MP_ENABLE_SCORE is on |
mp_ui | src/mp_ui | yes | The console, settings windows, panels, the score panel, the combinations window, the welcome wizard, the update check, loading dialog, mobile layout |
mp_core, mp_archive, mp_sampler, mp_control, mp_split and mp_score include no JUCE header. Their CMake files link JUCE modules when JUCE targets exist, but no source in them uses one. This boundary is what lets the test suite run most of the engine against synthesised tones in seconds. Several headers in mp_audio are JUCE-free too and are tested directly: AudioGraph.h, MixerConfig.h, VoicingSet.h, Favourites.h, VoicingEq.h, VoicingEqPresets.h, RankEq.h, LiveLevels.h, OutputLimiter.h, OutputCompressor.h, OutputDynamicsPresets.h, RealtimeThread.h and SystemMemory.h, and in mp_api the generated ControlProtocol.h and SysexCodec.h.
The dependency direction is mp_core at the bottom; mp_control, mp_sampler, mp_split and mp_archive above it; mp_dsp and mp_audio above those; the executables on top.
mp_ui is an INTERFACE target. Its sources are compiled into mp_audio, because MasterpieceProcessor::createEditor() is a member of a class declared there; an editor in a separate library layered above it made the linker drop the processor’s vtable entries. mp_ui remains so that link lines of the app and the plugin keep working.
mp_core
OrganModel is the in-memory form of an organ: ranks and their pipes, stops, switches and their linkages, divisions, keyboards, key actions, combinations, enclosures, tremulants, wind compartments, continuous controls, display pages and image sets, and the sample and package tables. The loader fills it and the rest of the program reads it. After a load the processor still edits it in two places (pruning releases the player left out, and marking releases that hold nothing).
OdfLoader reads three kinds of definition:
- Full definitions (
.Organ_Hauptwerk_xml). - Compact definitions (
.CustomOrgan_Hauptwerk_xml), whichCodmCompilercompletes with the fixed defaults a full definition would carry. - GrandOrgue definitions (
.organ).convertGrandOrgue()translates the INI-style file into an equivalent full definition as an XML string in memory, never written to disk, and the loader parses that. Nothing after this step knows the organ came from a.organfile. Where the two formats differ, the importer follows GrandOrgue’s semantics and records what it approximated or left out as notes, which the loader reports as warnings starting withGrandOrgue import:.
The parse uses pugixml and loads the whole document into memory.
Unknown tables and attributes produce warnings and are kept; they do not fail the load. OdfDiagnostics collects errors, warnings, skipped items and a long list of validation findings (dangling ids, missing sample files, unmapped codes, release branches with no attack, and others). The loader only errors on malformed XML or fatal id faults.
Perspectives groups ranks by the microphone position named in their rank names (Flute 8 (close), Principal 8 Rear); a GrandOrgue set has no perspectives, and its windchest groups stand in for them.
mp_archive
OrganArchive finds the archives that belong to a chosen file (the file itself, its volumes and its sibling packages), reads their headers and serves their contents. RAR can only be read front to back, so samples are delivered in archive order, one pass per archive, and never looked up one at a time. The small files (definition, artwork, package definitions) are unpacked once into <application data>/Masterpiece/Packaged/<identity>/, where the loader finds an ordinary organ; the samples stay in the archives and are decompressed into memory when needed. An index (archive-index.txt) is saved beside the unpacked files so a solid archive is walked once.
libarchive reads ZIP (the .orgue format), RAR 5 and non-solid RAR 4. unarr reads solid RAR 4, which libarchive refuses. Encrypted archives are refused with a message. A platform can install a hook (setArchiveOpenHook) for packages it opens through descriptors; Android uses it for files chosen in the system picker.
mp_sampler
VoiceEngine makes the sound. It is described under Threads and The vector engine. selectAttack and selectRelease implement the selection matrices: an attack is the first one in file order whose velocity, time-since-close and continuous-control ceilings the strike satisfies; a release is the one with the tightest hold-time ceiling among those that match the key-off context, preferring releases linked to the attack that played.
DiskProbe (a storage-tier classifier), SampleHandle and StreamConfig are declared in this module and exercised by tests. The application does not call them: release streaming runs inside VoiceEngine and SampleLibrary.
mp_control
| Class | Job |
|---|---|
SwitchNetwork | The organ’s switches and the wires between them; see The switch network |
CouplerMatrix (Control.h) | Key flow: which divisions a key press reaches and at what transposition |
ContinuousControlBank (Control.h) | The position of every shoe, wheel and generic control, and the linkages that let one drive another, settled by repeated relaxation |
StageSwitchBank | Shoe positions that fire switches: crescendo steps, blower start, delays. Each row is a threshold crossing, so sweeping a control fires every threshold it passes in order |
CombinationSystem | The organ’s own pistons: recall and capture of a combination as a list of switch states |
PlayerCombinations | The player’s generals, divisionals, cancels and stepper, the same on every organ, saved in the player’s data |
WindSolver | Pressures of the wind compartments, advanced once per block |
MidiMap, MidiDeviceMap | What a player’s console does to the organ, and which physical device a message came from |
LcdPanel | System-exclusive text for a console’s display |
Registration.h | Choosing stops on an unfamiliar organ by classifying stop names into families |
Combination recall never moves a switch itself. It returns the changes, and the processor applies them through SwitchNetwork, so the organ’s own wiring follows. What a player captures is saved in the player’s data beside the MIDI map and never written into the sample set.
WindSolver solves compartment volumes, pipe mass-flow rates, links and valves: flow through an opening goes as the square root of the pressure difference, and a compartment’s pressure follows from the air in it. A reservoir counts as its swallowed volume (frame area times travel). The board’s mass, damping and spring are not modelled. The solver lives in mp_control because it is control-rate state that advances once per block and touches no sample.
mp_split
A single keyboard playing a whole organ. The split sits between the MIDI inputs and the organ. It re-sends the notes of one keyboard as notes of its own input, named Split keyboard, on channels 11 to 14 (one per role: lower, upper, solo, pedal). The player’s MIDI map sends each of those channels to a manual like any keyboard’s. The module works on notes and channels alone. SplitKeyboardHost in mp_audio carries messages in and out and keeps the files (split/<organ>.mpsplit and split-keyboard.txt).
mp_dsp
TremulantLfo and EnclosureFilter use JUCE’s juce::dsp classes. The enclosure is a StateVariableTPTFilter whose cutoff and gain follow a smoothed shutter position. MP_ENABLE_DSP=OFF drops the module at configure time; the EngineSwitch flags in the model switch each feature off at run time per organ.
mp_audio
MasterpieceProcessor is a juce::AudioProcessor and owns everything: the model, the switch network, the control bank, the combinations, the wind solver, the voice engine, the sample library, the MIDI map, the mixer and the files. SampleLibrary turns the model’s sample rows into resident buffers and optional streaming tails. WavPackFormat is a JUCE audio format registered ahead of the WAV reader; it recognises WavPack streams by content, because GrandOrgue sets name them .wav, and exposes the smpl and cue chunks under the names JUCE’s WAV reader uses. Convolver is the room (impulse-response) reverb, Metronome and the two recorders run inside the audio callback or hand blocks to a background writer, and Translations embeds the language files.
Each output of the mixer is rendered on its own: what other outputs send into it, its room (a Convolver of its own), its EQ (VoicingEq) and its crossover (OutputFilters: high-pass, low-pass, delay and polarity), then its meter, before it is written to its device channels. After the master fader come the compressor and then the peak limiter, each with the channels of a pair linked. The EQ, the crossover, the compressor and the limiter are off by default and are not called while off. The plugin leaves the compressor and the limiter to the host.
Applications
apps/MasterpieceApp/Main.cpp owns the audio device and the MIDI inputs and runs AudioProcessorPlayer over the processor. Each MIDI input has a DeviceRoute that tags a message with its device and pushes it into the processor’s queue. JackMidi.cpp adds a JACK MIDI input port on Linux, opened only when a JACK server already runs. MasterpiecePlugin is one function, createPluginFilter.
The load path
MasterpieceProcessor::loadOrgan does the work and loadOrganAsync runs it on a JUCE thread. LoadProgress (atomic, allocation-free) carries the phase, counts and cancel flag to the dialog’s timer on the message thread.
Phase (LoadProgress::Phase) | What happens |
|---|---|
OpeningArchive, ReadingArchive, ExtractingArchive | openPackagedOrgan: for a .rar or .orgue, find and index the archives and unpack the small files |
ReadingDefinition | Remember the previous organ’s state, load the organ’s saved settings, then parse the definition (OdfLoader::load; a .organ file is converted first) |
BuildingWind | Reset the combination system and the wind solver, assign chest indices |
WiringConsole | Reset the stage table, run the start-up controls, settle the wind, index the linkages and the stops |
FindingSamples | Free the previous organ’s audio, list the samples the pipework references, look for them on disk and in the cache |
LoadingSamples | Decode samples on worker threads |
SavingCache | Write the sample cache when it is set to be saved before the organ plays |
Preparing | Rebuild the voice pool and everything derived from the model; load the MIDI map and combinations saved for the organ |
BuildingConsole | Decode artwork on the message thread |
Done, Cancelled, Failed | End states |
The details that matter when changing the path:
- The model is parsed first, then published, then the audio is read, so a note arriving during a load resolves pipes that merely have no sound yet.
EngineSuspensionsetsengineSuspended_and waits for a running block to leave. From then untilloadOrganreturns,processBlockoutputs silence and drops incoming MIDI. The audio thread therefore touches none of the structures the load rebuilds.- Only the samples the pipework references are read, which can be far fewer than the rows of the Sample table: a demo set lists the whole instrument and ships part of it.
- A load can run with
graphicsOnly, which builds the model and console and reads no audio (--gui-only). - The memory budget is the memory limit less the voice pool; a load that reaches it stops and reports
outOfMemory. SampleLibrary::loadAlldecodes on a pool of threads (by default twice the core count, clamped to 4 to 32) because decoding is bound by input and output. Samples held in archives are read by one producer thread per archive, front to back, into a bounded queue (512 MB) that the decoder threads drain.- The result is published as a new immutable generation behind one atomic pointer. Old generations are freed by
retireOldGenerations()on the message thread with audio stopped. - The sample cache is written on a thread of its own after publishing, unless the player chose to save before the organ plays. A load that was cancelled, stopped at the memory limit or had failed files is never cached.
From a key press to a voice
- A MIDI message arrives on a device thread and is pushed into a fixed ring (
TaggedMidi, 2,048 slots of 256 bytes) tagged with its device id. The on-screen keyboard and a MIDI file playback are merged into the same buffer at the top ofprocessBlock, so the mouse and a console share one note path. handleMidimatches the message inMidiMapand acts: a note on a manual, a switch, a control, a piston, a console action.- A note goes through
CouplerMatrix::expandInto, a breadth-first walk over the organ’s key actions from the source keyboard. A manual’s own keys reach their division through an ungated edge, and a coupler is the same edge gated on a switch. The walk carries the accumulated transposition, is depth-bounded and remembers where it has been. - For each division reached,
resolvePipesIntomaps the note through every engaged stop’s rank window to the pipes that sound. startPipeLayersstarts one voice per layer: it selects the attack, computes the playback ratio from the temperament and the sample’s own pitch, applies velocity attenuation, the player’s voicing, the wind chest and tremulant of the pipe and the layer’s loop settings, and callsVoiceEngine::startVoice.- A key release calls
noteOff, which selects a release from the key-off context and crossfades from the attack to it over the release’s own crossfade length.
Organs whose pipework hangs off pallet switches reach their pipes through the switch network (palletMoved) and skip the key path; the voice is the same.
The switch network
src/mp_control/SwitchNetwork.h opens with a long explanation. The essentials:
On a console the switch a player clicks is rarely the one anything reads. A coupler’s drawn knob is one SwitchLinkage away from the node that key actions look at, and a large organ declares thousands of such wires. If the wires are ignored, a coupler moves on screen and couples nothing, a piston lights and registers nothing, and the crescendo is inert.
- Switches latch and changes propagate. A switch keeps its state until something moves it. Moving it fires its outgoing wires, which move their destinations, until nothing changes. A model that recomputed every switch from its inputs cannot express a general cancel, which pushes the stop knobs out by turning the logical stop switches off and letting the drawn knobs follow through the reverse wires.
- Loops terminate because propagation stops when a switch is already in the state it is being set to. A drawn knob and the logical switch behind it drive each other this way.
- Each wire has an engage action and a disengage action. When the source (and the wire’s condition switch, if there is one) is in the state that fires it, the wire does its engage action; when it stops firing, its disengage action. Codes 1 and 4 engage, 2 and 7 disengage, and engage code 3 toggles the destination on each firing (a reversible piston) and does nothing when the wire stops firing. Together these cover a plain follow (1 and 2, or 4 and 7), a reversible (3 and 7) and an inverting wire (7 and 4). Codes outside these are recorded in
OdfDiagnostics::unmappedLinkageCodesfor review. - An idle wire asserts nothing. An organ whose pipework hangs off pallet switches carries one wire per tremulant state on each pallet; with the tremulant off, only one fires. Applying the idle wire’s disengage action closed the pallet in the same instant the key opened it.
- A destination is the OR of the wires firing into it. A disengage is applied only when no other firing wire asserts engagement. Mirrors are excluded from that count: when a wire runs a to b and another runs b to a, they are copies of one control (a stop drawn on several pages), and each would otherwise hold the other on.
holdOfflists switches nothing may engage, for a demo set’s locked stops whose ranks have no pipes. A piston, the crescendo, a wire or a click that would draw one leaves it in.lastChanges()lists every switch that moved during the lastset(), so a noise belongs to the switch that actually moved.lastChangeRanAway()reports that propagation hit its limit, which a file with flip-flopping wiring can cause.reset()builds the indices and starts every switch at its declared default; every wire firing at that state asserts its destination, so an organ that ships with its blower running comes up that way.
The processor keeps the player-facing switch for each stop by walking the reversed linkages to find the drawn one upstream. A switch wired straight into the nodes of several stops is a registration aid (a tutti, a general) and counts as the knob of none of them.
Threads
| Thread | Work |
|---|---|
| Audio thread | processBlock: merges MIDI, resolves notes, advances controls and wind, renders the voices, applies the room, the fader, the recorder, the metronome and the meter |
| Render workers | Optional extra threads that render a share of the voices each block |
| Streaming thread | One thread in VoiceEngine that refills the ring buffer of every voice playing a streamed release tail |
| Loading threads | loadOrganAsync thread, SampleLibrary decoder pool and archive producers, the cache writer |
| MIDI threads | One per input device, owned by JUCE or the driver; they tag and enqueue only |
| Message thread | Window, timers, settings, anything that touches a component |
| Background writers | The audio recorder’s ThreadedWriter, the archive of everything played, and JUCE’s loader for the impulse response |
| Control API | The HTTP server’s pool and the OSC receiver; each request is carried out on the message thread through ControlModel |
Render workers
VoiceEngine::setRenderThreads starts the workers when the voice pool is built (buildVoicePool), never inside render(). The audio thread renders one share itself and waits on the rest. Below minVoicesPerThread * threads active voices (default 32 per thread) rendering stays inline. By default the program renders on every logical processor it may run on (found with sched_getaffinity on Linux): the audio thread and a worker on each of the others, with no ceiling. With Render on every logical processor off, the count is the usable processors minus one, at most 8. The log names the count at each start. Shares are fixed and summed in a fixed order on the audio thread, so the result is repeatable but not bit-identical to inline rendering, because the float additions group differently. Workers wait on a ticket for a few microseconds before they sleep on a condition variable, because the renders of consecutive blocks follow each other more closely than a thread can be woken.
Real-time render threads are on by default wherever the system offers a way (RealtimeThread.h): MMCSS “Pro Audio” on Windows, SCHED_FIFO or rtkit on Linux, the Mach time-constraint policy on macOS and iOS, where the workers also join the audio device’s workgroup. Android gives an app none; its audio callback is real-time already. On Linux the ALSA audio thread is made real-time with the workers unless JACK has done so. Where the system refuses, the log and the settings say so and the workers run at normal priority.
The voice pool
The pool is allocated once in prepare(). The default size is 725 voices per usable core, at least 1,536 and at most 16,384 (maxPolyphonySetting); with release streaming on, 1,536. A polyphony limit the player sets is held to 64 to 16,384. A voice started when the pool is full takes the place of one dying away, then the quietest, and a note that just started is never stolen. Releasing voices are stolen longest-decayed first. A release tail ends once it has stayed below the cutoff level for a twentieth of a second.
Release streaming
An attack’s sustain loop must be resident, because the note dies without it. A release is played once, from its start, never looped, so only its first frames stay in memory and the rest is read from disk into a per-voice ring (two seconds by default, three quarters of a megabyte per voice at 48 kHz). The streamer thread keeps each armed ring ahead of its voice. A voice that outruns the streamer plays silence and counts an underrun, which the status line reports. The ring is single producer, single consumer: the streamer writes and publishes filled, the audio thread reads it. A generation counter stops a fill in flight for one voice from landing in the ring of the next.
Rules for the audio thread
processBlock and everything it calls follow these:
- No allocation, no locking, no disk. Scratch vectors (
KeyFlowScratch, the resolve and recall scratch buffers) are sized at load and keep their capacity. Threads start inprepare, andrenderstarts none. - The sample store is read through one atomic pointer. A note-on sees the whole old generation or the whole new one.
- MIDI arrives through the fixed ring. The write index is atomic; a slot is read only after its
readystamp says it is complete. An overflow drops a message; blocking a MIDI thread is worse. - The playing state belongs to the audio thread. Switches, controls, voices and pistons change from other threads only under
MasterpieceProcessor::AudioLock, which takes the callback lock JUCE holds around every block. It is re-entrant, and the window waits at most one block. When the lock is released, the audio thread publishes a copy of the engaged stops and switches for the window (publishShown) with atry_lock: if the window is reading, the next block tries again. - The window reads copies.
shownStopEngagedandshownSwitchEngagedread the published copy;stopEngagedandswitchEngagedread the live sets and are for the audio thread. - Hand-offs from the message thread use flags or mailboxes.
releaseAllKeys()raises a flag that the next block acts on; the split keyboard’s layouts travel through mailboxes; coefficients for the voicing equaliser are computed on the message thread and taken with atry_lock, so a busy lock keeps the previous filter for a block. - Anything that rebuilds the engine stops it first.
releaseResources()quiesces the render workers and the streamer beforepreparerebuilds the pools; a device change on a loaded machine otherwise corrupted the heap. - Control-rate state advances once per block. The wind, the controls and the stage switches never run per sample. The tremulant is the exception in effect: it is passed to the voice as a ramp (start value and step per frame) because at a 256-frame block a constant per block would step audibly.
The vector engine
Most of a voice’s life is a straight run: the key is held, the cursor is well inside the resident sample and short of the loop end, no crossfade is running and no tremulant moves the pitch. For those frames SimdRun.cpp interpolates and mixes several frames at a time. Loop wraps, crossfades, release fades, streamed tails and the tremulant stay on the ordinary per-frame path, which is also the whole engine on a CPU without a vector unit.
simd::Isa | Unit |
|---|---|
Sse2 | Every x86-64 processor; four frames at a time |
Avx2 | x86-64 with AVX2, checked at start-up; eight frames at a time |
Neon | ARM: always present on 64-bit, required by the 32-bit build |
None | The per-frame path only |
simd::detect() picks the best unit. Setting MASTERPIECE_SIMD=0 in the environment forces the per-frame path. The vector code reads the four resident formats (float, 16-bit, 20-bit, 24-bit) and gives the same answer as the per-frame reader: positions advance one frame at a time as there, and the Hermite interpolation uses the same operations in the same order, with no fused multiply-add. VoiceEngine.cpp and SimdRun.cpp are compiled with -ffp-contract=off on every compiler but MSVC, because Apple Clang and GCC would otherwise fuse a multiply and an add into one rounding. A test compares each unit that the machine offers against the per-frame path.
The setting Faster audio engine (fasterEngine_) is on for a program that has never been told otherwise: fasterEngineByDefault() returns true. It is saved in the global settings file.
Resident audio is held as Pcm24 (three bytes, little-endian), Pcm20 (twenty bits a sample, packed so two samples take five bytes), int16_t with a per-file scale folded into the voice gain, or float. A 16-bit recording is held at 16 bits. renderVoiceFrom<T> is instantiated per type so the inner loop never tests which one it reads. Pcm20 has no conversion operator, so any code that walks it as an array of samples does not compile until it is taught the decoder.
Samples held compressed
With samples held compressed, 16-bit and 24-bit samples are held split Rice coded (SplitRice.h) and decoded as they play. The coding is lossless. A sample is cut into blocks of 4,096 frames that each decode on their own, so a loop’s jump back or a release’s start decodes the block it lands in. Per block and channel the encoder picks the best fixed predictor of order 0 to 3, codes stereo as left and right or left and side, whichever is smaller, and stores the residuals in groups of 256 that share one Rice parameter, split into a packed stream of low bits and a unary stream, so the decoder has no branch per value.
A voice reads a coded sample through a DecodedWindow: one decoded block and the last frames of the block before it, in the 16-bit or 24-bit layout the voice reads for a plain sample, so the interpolation and the vector runs read it unchanged. Two windows per voice are made when the engine is prepared and never grow, and the decoding runs on the thread that renders the voice. SampleCodec.h is the interface every codec implements; each coded sample carries its codec’s four-character name, and the sample cache refuses a sample whose codec it does not know.
Front ends and platforms
| Front end | Notes |
|---|---|
| Standalone app | Owns the audio device (WASAPI and ASIO on Windows, ALSA and JACK on Linux, CoreAudio on macOS) and the MIDI inputs |
| Plugins | VST3, AU and LV2; the processor’s getStateInformation stores the path of the loaded organ definition and setStateInformation loads it again, so the rest of the state lives in Masterpiece’s own per-organ files |
| Phones and tablets | The app only. mp_ui/Mobile.* provides full-screen windows for touch; on iOS, IosAccess.mm reads picked documents in place |
The plugin and the app create the same editor through MasterpieceProcessor::createEditor(), and that editor (mp_ui/Ui.cpp) calls openPackagedOrgan to open RAR and .orgue packages.
Control protocol
Version 0.1. HTTP with the web console, MIDI System Exclusive and OSC are implemented in the standalone program on Windows, macOS and Linux. Phones, tablets and the plugins have no control API.
One model of what can be read and changed in a running Masterpiece, and the ways to reach it: HTTP with JSON, MIDI System Exclusive, and OSC. The model is the reference. A transport section only says how the model’s operations are written as bytes or paths; it adds no operation of its own, so a console, a script and a web page see the same organ.
The definition is protocol/control.yaml. Its types, properties, program properties, commands, operations, errors and encodings are the ground truth; tools/gen-protocol.py generates src/mp_api/ControlProtocol.h, the tables the program uses, and resources/web/openapi.json, the HTTP description the program serves at /api/v1/openapi.json. gen-protocol.py --check fails when either is out of date. A change to the protocol is a change to the YAML file, then the generator, and the three committed together.
In the program, src/mp_api/ControlModel is the model, src/mp_api/ApiServer the HTTP transport (cpp-httplib, one MIT-licensed header), SysexTransport the MIDI transport and OscTransport the OSC one. Every request is carried out on the message thread, as a click in the window is; while an organ loads every call answers busy. Changes are found by comparing every value 20 times a second, so a change made anywhere (the window, MIDI, a piston, the sequencer, another client) reaches every subscriber.
The window, the MIDI mapping and these transports all act through the same commands inside the program. A stop drawn over SysEx is drawn exactly as a click or a learned MIDI message draws it, and it is reported to every client as a change.
Principles
- The organ as loaded, by type and index. Every object has a type and an index from 0, dense, valid for one load of one organ. An index is the position in a list, so the state of every switch is a plain bit field. The organ file’s own id is one of the object’s properties, for clients that keep a mapping across loads.
- A session number names the load. It moves on each time an organ loads or unloads. A request may carry the session it was built for, and is refused with
stale-sessionwhen the organ has changed under it. - Requests and replies, and events. Each request has one reply. A client that subscribes also receives an event for every change it subscribed to, whatever caused it.
- Small messages. Every operation fits a 64-byte SysEx message, except names and descriptions, which come one object at a time. A board with 2 KB of RAM can take part.
- Integers. Every value is a whole number in a range the property states; a level in dB is in tenths of a dB, for example.
- Reading is always allowed once a transport is on; changing needs permission. Each transport has its own switch in Settings > Remote control, off by default. Allow changes from the network governs every change, and HTTP can add a token.
Object types
| Code | Type | Index range | Value | Changeable | Notes |
|---|---|---|---|---|---|
| 0 | program | properties below | per property | some | One per running program |
| 1 | switch | 0 to switches - 1 | 0 off, 1 on | yes | Every switch of the organ file: drawstops, couplers, tremulants, pistons and the rest. Its role is a property |
| 2 | control | 0 to controls - 1 | 0 to 127 | yes | Shoes, crescendo and other continuous controls |
| 3 | division | 0 to divisions - 1 | its live level, 0 to 203: 127 as voiced, 0 silent, 203 at +24 dB, in steps of about 0.32 dB | yes | For names and grouping; the level is a fader over every rank in it, heard at once, back at 127 at each load |
| 4 | keyboard | 0 to keyboards - 1 | none | no | Manuals and pedal; notes stay on MIDI |
| 5 | general | 0 to generals - 1 | 1 while it is the last recalled | press | The player’s general pistons |
| 6 | divisional | 0 to divisionals - 1 | 1 while it is the last recalled in its division | press | The player’s divisional pistons |
| 7 | eqpreset | 0 to presets - 1 | 1 while the EQ is this preset | press | The program’s ten, then the player’s own |
| 8 | temperament | 0 to temperaments - 1 | 1 while chosen | press | |
| 9 | command | the list below | none | press | Buttons that are no object of the organ |
| 10 | rank | 0 to ranks - 1 | voicing level in tenths of a dB, -240 to +120 | yes | Every rank of pipes; heard from the next note, as on the Voicing tab |
| 11 | note | keyboard index × 128 + MIDI note | 1 while the key is down | yes | 1 plays the key, 0 releases it, on the keyboard’s channel |
| 12 | pipe | 0 to pipes - 1, in rank order then by key | its own voicing level in tenths of a dB, on top of its rank’s | yes | Heard from the next note |
| 13 | enclosure | 0 to enclosures - 1 | how open its shades are, 0 to 127 | no | Moved by its control |
| 14 | tremulant | 0 to tremulants - 1 | 1 while it runs | yes | Moves the switch the player would |
| 15 | windchest | 0 to compartments - 1 | pressure now, in tenths of a percent of nominal | no | Reservoirs and chests of the wind model |
| 16 | route | 0 to ranks - 1, one per rank | an output as the mixer lists them, from 1; after the last output, a speaker group in the order of the groups | yes | Where the rank plays, as Rank routing… on the Outputs tab of Organ settings; heard from the next note. A rank with no route of its own reads where the default destination sends it. Property to: the output’s or group’s name |
| 17 | pair | 0 to outputs - 1 | its live level, 0 to 203, as division | yes | The mixer’s outputs, in the order of the Outputs tab, each by its name; heard at once, back at 127 at each load |
| 18 | ranklevel | 0 to ranks - 1 | the rank’s live level, 0 to 203, as division | yes | A fader on top of the rank’s voicing, heard at once, back at 127 at each load |
| 19 | brightness | 0 to ranks + divisions - 1 | tenths of a dB, -120 to +120 | yes | The treble shelf of the voicing EQ, above 3 kHz: one per rank, then one per division; a rank hears its division’s added to its own. Heard at once |
| 20 | bass | 0 to ranks + divisions - 1 | tenths of a dB, -120 to +120 | yes | The bass shelf of the voicing EQ, below 200 Hz: one per rank, then one per division, as the brightnesses. Heard at once |
| 21 | pan | 0 to ranks + divisions - 1 | -100 full left, 0 the middle, +100 full right | yes | Where a rank or a division stands: one per rank, then one per division, as the brightnesses; a rank’s and its division’s add. Heard at once |
| 22 | width | 0 to ranks + divisions - 1 | percent, 0 mono, 100 as recorded, 200 twice as wide | yes | The stereo width of a rank or a division: one per rank, then one per division, as the brightnesses; a rank’s and its division’s multiply. Heard at once |
| 23 | mute | ranks, then divisions, then perspectives or windchest groups, then outputs | 1 muted | yes | The mixer’s mute buttons; the strip’s fader stays where it is. Heard at once, back to 0 at each load |
| 24 | solo | in the order of mute | 1 soloed | yes | The mixer’s solo buttons. While any rank, division or group is soloed, only the ranks under a soloed strip sound; the outputs solo among themselves. A mute wins over a solo |
| 25 | organ | favourite slot - 1, 64 slots; a list gives the slots that hold an organ | 1 while it is the organ loaded | press | The favourite organs of the Open window, by name only, no file paths. A press loads it; busy while an organ loads. Listed with no organ loaded |
A press acts like a thumb piston: it does what the object does, once.
Program properties (type 0)
| Index | Property | Value | Changeable |
|---|---|---|---|
| 0 | Session number | 0 to 2 097 151, round | no |
| 1 | Organ loaded | 0 none, 1 loading, 2 ready | no |
| 2 | Load progress | 0 to 1000 (tenths of a percent) | no |
| 3 | Master gain | tenths of a dB, -400 to +240 | yes |
| 4 | Transpose | semitones, -12 to +12 | yes |
| 5 | Temperament | index into temperament | yes |
| 6 | Sequencer frame | the frame as the sequencer shows it, from 0 (shown 000) to 998 | yes |
| 7 | Setter | 0 off, 1 on | yes |
| 8 | Organ EQ on | 0, 1 | yes |
| 9 | Organ EQ preset | index into eqpreset, or -1 when none matches | yes |
| 10 | Polyphony limit | voices, 64 to 65 536; the program holds it to 16 384 | yes |
| 11 | Sounding voices | voices | no |
| 12 | Late blocks since the program started | count | no |
| 13 | Real-time render threads | 0, 1 | yes |
| 14 | MIDI recorder | 0 stopped, 1 recording; set 1 to record, 0 to stop (a take not yet saved is first saved to a dated file in the recordings folder) | yes |
| 15 | Audio recorder | 0 stopped, 1 recording; set 1 to record to a dated file in the recordings folder, 0 to stop | yes |
| 16 | Metronome | 0 off, 1 on | yes |
| 17 | Metronome tempo | beats a minute, 20 to 300 | yes |
| 18 | Room | 0, 1 | yes |
| 19 | Room wet share | percent, 0 to 100 | yes |
| 20 | Pipe detune | tenths of a cent, 0 (off) to 100 | yes |
| 21 | Wind sway | tenths of a cent, 0 (off) to 100 | yes |
| 22 | Sparse loading | 1 every note, 2 every second, 3 every third, 4 half by the sides of the organ | yes |
| 23 | Pedal combinations coupled: the first manual’s divisionals also recall the Pedal’s of the same number | 0, 1 | yes |
| 24 | Attack emphasis | tenths of a dB, -120 to +120, 0 off | yes |
| 25 | Attack length | milliseconds, 5 to 300 | yes |
New properties are added at the end; an index is never reused.
Commands (type 9)
| Index | Command |
|---|---|
| 0 | Panic: every note off |
| 1 | General cancel |
| 2 | Sequencer next |
| 3 | Sequencer previous |
| 4 | Sequencer first |
| 5 | Sequencer last |
| 6 | Voicing EQ next preset |
| 7 | Voicing EQ previous preset |
| 8 | Quit: saves and quits Masterpiece. Needs the setting Allow quitting Masterpiece and shutting the computer down, and is refused (busy) in the first two minutes after the program starts |
| 9 | Power off: the same, then the computer shuts down |
| 10 | Score page forward: the page-turn message on the MIDI output, for a score app |
| 11 | Score page back |
Properties of an object
Asked for with Describe, one object at a time.
| Property | Types | Value |
|---|---|---|
name | all | The name the organ file gives, or the program’s |
odfId | switch, control, division, keyboard | The organ file’s own id |
role | switch | stop, coupler, tremulant, piston, other |
latching | switch | 1 for a drawstop, 0 for a piston |
division | switch, control, divisional | Index into division, or -1 |
available | switch | 0 for a stop a demo does not ship |
channel | keyboard | The MIDI channel it plays on, 1 to 16 |
own | eqpreset | 1 for the player’s own |
set | general, divisional | 1 when the piston holds a registration |
holds | general, divisional | The switches it draws when recalled, as indices into switch |
tuning | rank, pipe | Its voicing tuning, in tenths of a cent |
rank, key | pipe | Its rank (an index into rank) and the MIDI note it sounds for |
control | enclosure | The control that moves it, an index into control, or -1 |
rate, depth | tremulant | Its rate in hundredths of a hertz, its depth in tenths of a percent |
bus | rank | The mixer bus its main perspective plays through; routing is changed on the Outputs tab of Organ settings |
console | switch, control | 1 for what the organ’s console shows: its stops, couplers and tremulants, and what else is drawn and can be clicked. A list gives only these unless asked for all (?all=1); every object keeps its index either way |
Operations
| Code | Operation | Request | Reply |
|---|---|---|---|
| 1 | Identify | program name, protocol version, program version, session, unit number | |
| 2 | Count | type | how many objects of that type |
| 3 | Describe | type, index | the object’s properties |
| 4 | Get | type, index | value |
| 5 | Set | type, index, value | the value now |
| 6 | Press | type, index | done |
| 7 | Dump | type, first index, count | the values; for a type whose values are 0 and 1, a bit field |
| 8 | Subscribe | a set of types | done; from then on, events |
| 9 | Unsubscribe | a set of types, or all | done |
| 10 | Event | (sent by the program) | type, index, value |
| 11 | Error | (a reply) | the request’s operation and an error code |
A Set on a switch takes 0, 1, or 2 for toggle. A Set on a momentary switch (a piston) presses it for 1 and does nothing for 0.
When an organ loads, every subscriber receives an event for program property 1 (organ loaded) and property 0 (the new session), and should Count and Dump again.
Errors
| Code | Error |
|---|---|
| 1 | unknown-operation |
| 2 | unknown-type |
| 3 | out-of-range: no object at that index |
| 4 | bad-value: outside the property’s range |
| 5 | read-only |
| 6 | not-allowed: changing is switched off for this transport, or the token is missing |
| 7 | no-organ |
| 8 | stale-session |
| 9 | busy: an organ is loading |
| 10 | bad-message: too short, too long or malformed |
| 11 | unsupported-version |
Versions
The protocol version is a major and a minor number. A minor version adds properties, commands, types or operations at the end; a client written for an earlier minor version works unchanged. A major version may change what exists, and a client is refused with unsupported-version.
HTTP and JSON
The program serves HTTP on the port chosen in Settings > Remote control (8080 by default), on the local network, or on 127.0.0.1 alone with This computer only. It also serves the web console at / and the API description at /api/v1/openapi.json.
| Operation | Method and path |
|---|---|
| Identify | GET /api/v1 |
| Count | included in GET /api/v1/{types} |
| Describe | GET /api/v1/{types}/{index}, or the whole list with GET /api/v1/{types} |
| Get | GET /api/v1/{types}/{index}/value |
| Set | PUT /api/v1/{types}/{index}/value with {"value": 1}, or {"value": "toggle"} for a switch |
| Press | POST /api/v1/{types}/{index}/press |
| Dump | GET /api/v1/{types}/values |
| Subscribe, events | GET /api/v1/events?types=switches,controls, a server-sent event stream; the program’s events always come with it. At most 16 streams are open at once; one more is refused with busy |
| Error | the HTTP status, with {"error": "out-of-range"} |
The type in a path is its plural: switches, controls, generals, eqpresets. The program is GET /api/v1/program and PUT /api/v1/program/{property}. A request that changes something is sent as Content-Type: application/json (a page of another site cannot send that without the browser asking first, and the server never agrees, so a stray web page cannot change the organ), carries Authorization: Bearer <token> when a token is set, and may carry X-Session: <n>.
A stream opens with event: hello and the session. An event:
event: change
data: {"type": "switch", "index": 12, "value": 1, "session": 41}
A Dump of switches:
{"session": 41, "type": "switch", "first": 0, "count": 60, "values": [0, 1, 1, 0, ...]}
Console pages
The web console draws the organ’s own console pages with these requests. Coordinates are in the page’s own pixels; layout picks one of the page’s layouts, 0 by default.
| Request | Answer |
|---|---|
GET /api/v1/pages | {session, pages: [{index, name, width, height, layouts: [{layout, portrait}]}]} |
GET /api/v1/pages/{n}/picture?layout=&x=&y=&w=&h= | The page, or the part given, as PNG, with the page’s change count in X-Serial |
GET /api/v1/pages/{n}/changes?layout=&since= | {serial, areas: [{x, y, w, h}]}, the parts drawn again since that count, or {serial, full: true} when the page must be fetched whole |
POST /api/v1/pages/{n}/pointer with {"phase": "down", "x": 0, "y": 0} | A tap or a drag (down, move, up) carried out on the page as a click is. It needs permission to change, as a Set does. Drawn manuals are not played from a browser |
MIDI System Exclusive
Turned on in Settings > Remote control with Answer the same requests over MIDI (System Exclusive). Requests are read on the MIDI inputs and answered on the console’s MIDI output; this protocol’s messages are kept from the organ. A message is at most 64 bytes, F0 and F7 included.
Message layout
F0 7D 4D 50 <unit> <major> <operation> <sequence> <payload ...> F7
| Byte | Meaning |
|---|---|
7D | The ID for non-commercial and experimental use, while the protocol is tried. A registered manufacturer ID replaces it before version 1.0 |
4D 50 | M P |
unit | 0 to 126, for several programs on one MIDI network: 0 unless the settings file sets apisysexunit; 127 addresses all |
major | the protocol’s major version |
operation | the code from the operations table |
sequence | 0 to 127, chosen by the client and repeated in the reply, to pair them; 0 in events |
Every data byte is 7 bits, as MIDI requires.
| Field | Bytes | Encoding |
|---|---|---|
| type | 1 | the type code |
| index | 2 | 14 bits, low 7 bits first |
| value | 3 | 21 bits, two’s complement, low 7 bits first |
| count | 2 | as index |
| text | variable | UTF-8, in groups of 7 bytes each preceded by a byte with their high bits (the 8-to-7 packing of sample dumps) |
Payloads
| Operation | Request payload | Reply payload |
|---|---|---|
| Identify | none | minor, program version (3 bytes), session (value), unit, then name (text) |
| Count | type | type, count |
| Describe | type, index | type, index, then property code (1 byte) and its value, repeated, and the name last, cut to fit the message; the whole name over HTTP or OSC |
| Get | type, index | type, index, value |
| Set | type, index, value | type, index, value now |
| Press | type, index | type, index |
| Dump | type, first, count (up to 280 for bits, 16 for values) | type, first, count, then bits 7 to a byte, low bit first, or values |
| Subscribe, Unsubscribe | a type mask (3 bytes, as a value: bit n for type n) | the mask now |
| Event | type, index, value | |
| Error | operation, error code |
A Dump of 280 switches is 40 bytes of bits; a console asks for 0-279, 280-559 and so on until it has them all.
Examples
Draw switch 12 on unit 0, sequence 5:
F0 7D 4D 50 00 00 05 05 01 0C 00 01 00 00 F7
| | | | |
| | | | value 1
| | | index 12
| | type switch
| sequence 5
operation Set
The reply carries the same sequence and the value now:
F0 7D 4D 50 00 00 05 05 01 0C 00 01 00 00 F7
The event every subscriber receives:
F0 7D 4D 50 00 00 0A 00 01 0C 00 01 00 00 F7
OSC
Turned on in Settings > Remote control with Answer the same requests over OSC. UDP on the port chosen there (9000 by default). A client first says where replies and events go, with /mp/replyto; until then the program listens and answers nothing. {type} is the plural name, as in the HTTP paths.
| Operation | Address and arguments | Reply |
|---|---|---|
| Reply to | /mp/replyto with the host as a string (the computer itself when left out) and the port | the same, as confirmation |
| Identify | /mp/identify | protocol, version, program version, session, organ |
| Count | /mp/{type}/count | the count |
| Describe | /mp/{type}/{index}/describe | each property’s name, then its value |
| Get | /mp/{type}/{index} with no argument | the value |
| Set | /mp/{type}/{index} with an integer, or a float, rounded | the value now |
| Press | /mp/{type}/{index}/press | the address |
| Dump | /mp/{type}/dump with the first index and a count, both optional | the first index, then up to 1,000 values |
| Subscribe | /mp/subscribe with the type names as strings; none for every type | the type mask now |
| Unsubscribe | /mp/unsubscribe, the same | the type mask now |
| Event | /mp/{type}/{index} with the value, sent by the program | |
| Error | /mp/error with the address, the error code and its name |
A reply uses the address of its request, and an event the address of a Get, so a fader in TouchOSC or Open Stage Control bound to /mp/controls/0 moves the shoe and follows it.
The program’s properties go by name, /mp/program/masterGain, and commands may too, /mp/commands/panic/press. With changes from the network turned off, a Set or Press is refused with not-allowed, as over HTTP.
MIDI-CI Property Exchange
A later binding for MIDI 2.0 tools: each HTTP resource becomes a property resource with the same JSON, under names of the form X-MP-Switches.
Open questions
- A registered SysEx manufacturer ID, applied for before version 1.0.
- Whether notes may be played through these transports, for automation and tests. MIDI is the transport for playing.
- 14-bit values for continuous controls, for consoles with fine shoe sensors.
Testing
This page covers the test binary, how to build and run all or part of it, the fixtures, what continuous integration runs on every pull request, and how to add a test. The suite needs no sample library and runs in about a minute on a desktop, so run it before every pull request.
The test binary
All tests are in one executable, mp_tests, built from tests/:
| File | Content |
|---|---|
tests/MpTest.h, tests/MpTest.cpp | The framework: Test, Category, Failure, registry(), runAll(), measure() and the MP_CHECK macro |
tests/test_core.cpp | Most tests, and main() |
tests/test_split.cpp | The split keyboard: zones, layers, bass, sustain, follow, on and off, presets, text files, exclusive input |
tests/test_*.cpp | One file per area or fix: the control API and its transports, the sample codecs and coded playback, the score, the recorder, live levels, the EQ per rank, the output limiter, settings archives, sparse loading and others |
tests/fixtures/ | Synthetic organ definitions and MusicXML scores |
tests/CMakeLists.txt collects every tests/test_*.cpp with a glob, so a new test file needs no line there. It links mp_core, mp_control, mp_archive and mp_split always, and adds mp_sampler, mp_dsp and mp_audio when those targets exist. It defines a macro for each optional part, and a test that needs one guards itself with it and compiles to nothing where that part is absent:
| Macro | Defined when | Guards |
|---|---|---|
MP_TEST_HAS_SAMPLER | mp_sampler is built | Voice engine, streaming and disk tests |
MP_TEST_HAS_DSP | mp_dsp is built (MP_ENABLE_DSP=ON) | Tremulant and enclosure tests |
MP_TEST_HAS_AUDIO | mp_audio is built (JUCE available) | Tests that load an organ into MasterpieceProcessor, console, language and convolution tests |
MP_TEST_HAS_SCORE | mp_audio and mp_score are built | The score panel’s engraving and playback; MP_TEST_SCORE_DATA_DIR names the font folder |
MP_TEST_HAS_API | mp_audio is built and MP_ENABLE_API is on | The control API end to end, over HTTP, SysEx and OSC |
Three paths reach the tests as compile definitions: MP_TEST_FIXTURES_DIR, MP_TEST_TRANSLATIONS_DIR and MP_TEST_SOURCE_DIR. They are absolute, so the binary runs from any working directory.
Categories
Each test has a category and a name of the form category.area.what, for example functional.odf.detect-type or perf.voice.polyphony.
| Category | Names | Content |
|---|---|---|
Functional | functional.*, probe.* | Pass or fail checks, about 400 of them, across the areas control, voice, midi, odf, archive, samples, split, ui, settings, fixtures, dsp, codm, audio, loader, api, score, i18n and others. How many run depends on the parts the build has |
Perf | perf.* | Nine benchmarks: ODF scan throughput, voice polyphony (single-threaded, threaded, compact storage, vector units), chord start, playback of coded samples, split Rice decoding and temperament throughput. Each prints its metric and asserts a floor, relaxed in Debug builds (#ifdef NDEBUG) |
Running
Build and run:
cmake --build --preset dev --target mp_tests
build/dev/tests/mp_tests --no-perf
The binary takes these options:
| Option | Effect |
|---|---|
| (none) | Runs every registered test, functional and performance |
--no-perf | Runs the Functional tests only |
--perf-only | Runs the Perf tests only |
--only <prefix> | Runs only the tests whose names start with the prefix, for example --only functional.api. |
With CTest, the binary is registered twice:
ctest --preset dev # both
ctest --preset dev -R MpFunctional # mp_tests --no-perf
ctest --preset dev -R MpPerf # mp_tests --perf-only
Test presets exist for dev, dev-fast, core-only, ci-linux, ci-macos, ci-windows, ci-functional, ci-perf and ci-linux-arm. Run performance tests from a Release build; the floors are meant for optimised code, and the voice benchmarks print the real-time ratio they reach.
The suite keeps its settings and its sample cache apart from the player’s. At start, main() empties mp-tests-data in the system temporary folder and points the settings folder at it (mp::setDataFolder), and points the sample cache at mp-tests-cache there, so a test that saves a setting or writes a cache never reaches the player’s files. A test that starts the control API sets This computer only, so the server listens on 127.0.0.1 and opens no firewall prompt.
The preset ci-functional builds Debug with AddressSanitizer, UndefinedBehaviorSanitizer and gcov coverage; ci-perf builds Release for MpPerf. See Building from source.
Fixtures
All fixtures in tests/fixtures/ are written for this project: synthetic organ definitions and short MusicXML scores.
| File | Purpose |
|---|---|
minimal.Organ_Hauptwerk_xml | The smallest full definition that loads |
recorder-keyboards.Organ_Hauptwerk_xml | Several keyboards, for recording and playing back a take on the keyboard it was played on |
organ-trio.musicxml, titled-tempo.musicxml, two-bars.musicxml, whole-notes.musicxml | Scores for the score panel’s engraving and playback |
minimal.CustomOrgan_Hauptwerk_xml | The smallest compact definition |
example2-equivalent.CustomOrgan_Hauptwerk_xml | A small compact definition that exercises every compact-definition table the compiler handles |
edge.unknown-tables.Organ_Hauptwerk_xml | Unknown tables: loads with warnings |
edge.encrypted.Organ_Hauptwerk_xml | Encrypted samples: loads, sets the flag, lists them |
edge.dangling-ids.Organ_Hauptwerk_xml | Ids that point at nothing: loads and reports them |
m22.tuning.Organ_Hauptwerk_xml | Temperament and pitch cases |
m24.expression.Organ_Hauptwerk_xml | Continuous controls, linkages and shoes |
Rules for fixtures:
- Write your own synthetic definitions. Never copy fixtures from other projects, and never commit a licensed sample set; sets a developer owns stay on that developer’s machine.
- Audio is generated at test time:
voicetest::makeToneintest_core.cppsynthesises resident samples, and tests that need files write them to the system temporary folder and delete them. No audio file is committed. - Many tests build XML in a string and load it with
OdfLoader::loadFromXmlString, so a case needs a fixture file only when the file itself matters. - The helpers
readFixture(name)andloadFixture(name, model, diagnostics)intest_core.cppread fromMP_TEST_FIXTURES_DIR.
Translations in the tests
Two tests keep the language files in step with the code (functional.i18n.*). language-files reads every TRANS("...") string in the .cpp, .h and .mm files under src/ and apps/, the way tools/i18n.py reads them. It requires that Spanish, German, Dutch, Polish, Czech, French and Italian are present and that every language file reads, names its language, lists its countries, has no byte order mark, contains every string of the sources with a non-empty translation and the same placeholders, and contains no string the sources no longer have. choose-language checks that choosing a language changes what TRANS() returns.
The sources are the list of strings: no generated list is kept in the tree, so two changes that each add a string do not collide. python tools/i18n.py reports what each language lacks, --check exits with 1 when anything is missing, stale or inconsistent, and --write writes resources/translations/strings.txt, the template translators start from, which Git ignores.
What CI runs
.github/workflows/build.yml runs on every push to main, on every pull request, on demand and when release.yml calls it. A new push to the same ref cancels the older run. Changes that touch only README.md, COPYING, LICENCE, .gitignore, screenshots/**, site/**, manual/**, ATTRIBUTION.md, .github/pages-downloads.py or .github/workflows/pages.yml start no build.
The build job runs once per row of this matrix:
| Runner | Preset | Result |
|---|---|---|
ubuntu-22.04 | ci-linux | .deb for amd64 |
windows-latest | ci-windows | Setup program and portable files |
ubuntu-22.04 | ci-linux-arm64 | Cross-built .deb for arm64 |
ubuntu-22.04 | ci-linux-arm | Cross-built .deb for armhf |
macos-15 | ci-macos | Apple silicon app, deployment target 11.0 |
macos-15 | ci-macos with -DCMAKE_OSX_ARCHITECTURES=x86_64 | Intel app, deployment target 10.15; its tests and launch run under Rosetta. Left out of pull requests |
Every row configures with -DMP_BUILD_PLUGIN=OFF; the plugins have a job of their own. A pull request configures with -DMP_ENABLE_LTO=OFF, main and releases with link-time optimisation.
Ubuntu 22.04 is used because a binary needs the glibc it was built against or newer; the packages built there run on Debian 12 and Raspberry Pi OS.
Steps of each row, in order:
- Restore the ccache and the Verovio compiler cache (saved from
mainonly). - Install dependencies; for ARM rows, run
cmake/ci-arm-multiarch.sh. The native Linux row runspython3 tools/gen-protocol.py --check. - Configure with
cmake --preset <preset>and build withcmake --build --preset <preset>. - Tests. On every row that can run its own binary, find
build/<preset>/tests/mp_tests*and run it with--no-perf. The ARM rows skip this step because the binary cannot run on the build host. The performance tests never run in CI. - ARM output check.
filemust reportARM aarch64orARM, EABI, so a toolchain that silently fell back to the host compiler fails the job. - Launch check. Linux starts the app under
xvfb-runfor 20 seconds and expects it to still be running (exit code 124 fromtimeout). Windows startsMasterpiece.exeand requires it to be alive after 15 seconds. macOS does the same for 15 seconds, and also checks the binary’s architecture and the oldest macOS it asks for (minos) against the deployment target of the row. - Installers. Windows builds the NSIS setup program, installs it silently, checks that exactly
bin\Masterpiece.exeandUninstall.exeare installed, that the program is registered for Add/Remove Programs and has a Start menu shortcut, starts the installed program for 15 seconds, uninstalls, and checks that the files, the registry entry and the shortcut are gone. Linux builds the.deb, checks its contents and installs it indebian:12andubuntu:24.04containers (emulated with QEMU for ARM), checks that every library resolves and removes it. Native Linux also starts the installed package underxvfb. macOS zips the app. - Upload the artifacts (kept for 3 days). Windows and Linux pack the program in a
Masterpiecefolder.
Separate jobs in the same workflow:
| Job | Runner | Content |
|---|---|---|
targets | ubuntu-latest | Writes the lists of rows for build and plugins, leaving out the rows a pull request skips |
plugins | ubuntu-22.04, windows-latest, macos-15 | Builds the VST3 and LV2 plugins on Linux and Windows and the VST3 and AU plugins on both Macs, with -DMP_BUILD_STANDALONE=OFF, checks the binaries and packs them. A pull request leaves out both Macs |
flatpak | ubuntu-latest in the freedesktop 24.08 container | Builds masterpiece-linux-x86_64.flatpak from packaging/flatpak |
ios | macos-15 | Builds the app for the simulator, then plays generated test organs, records the output inside the app and checks it against the numbers the organs were made from, taps through the interface and opens a package through the document picker. A pull request runs the large iPad; main runs three devices. Skipped on release tags |
ios-device | macos-15 | Builds the unsigned device .ipa |
android | ubuntu-22.04 | Builds the APK and the Play bundle with Gradle and checks that the APK holds libjuce_jni.so for arm64-v8a and x86_64 |
pages.yml builds the project site and this manual; it runs no tests. main-latest.yml publishes each green build of main as the prerelease main-latest. No workflow builds the ci-functional or ci-perf presets.
Adding a test
- Choose the file. A new area or a fix gets a file of its own,
tests/test_<what>.cpp, which the glob intests/CMakeLists.txtpicks up at the next configure. A new file needs#include "MpTest.h"and the module headers by their path undersrc(for examplemp_control/MidiMap.h), and wraps everything that needs an optional part in itsMP_TEST_HAS_*macro. - Derive a class from
mp::test::Test, give it a name and a category in the constructor, and writerun():
class DetectTypeTest final : public mp::test::Test {
public:
DetectTypeTest() : Test("functional.odf.detect-type", Category::Functional) {}
void run() override {
MP_CHECK(mp::OdfLoader::detectType("<foo", "x.xml") == mp::OdfType::Unknown,
"garbage should be Unknown");
}
};
static DetectTypeTest g_detect;
- The file-scope
staticinstance registers the test:Test’s constructor appends the object tomp::test::registry()during static initialisation. A test without an instance never runs. - Use
MP_CHECK(condition, message)for each check. It throwsFailurewith the file, the line and the message when the condition is false. Throwmp::test::Failureyourself for other cases. The message should say what the test expected. - For a performance test, use
Category::Perf, time the work withmp::test::measure(fn)(wall time, and CPU time fromgetrusageorGetProcessTimes), print the metric withstd::printf, and assert a floor that Debug builds can relax with#ifdef NDEBUG. - Guard code that needs a module behind the macro for that module (
#ifdef MP_TEST_HAS_AUDIOand the others above), so the suite still builds in a configuration without it. - Name the test after the area:
functional.<area>.<what>. Give a test that fixes a reported fault a comment naming the issue number. - Run
mp_tests --only <its name>, thenmp_tests --no-perf, and confirm that the new test prints[PASS], and that it fails when you revert the change it covers.
For a new fixture, add a synthetic definition to tests/fixtures/ under a name that states its purpose (edge.<case> for an edge case) and load it with loadFixture.
Registration order follows static initialisation, which the language does not define across files, so a test must not depend on another having run first.
Performance
This page reports how much memory a sampled organ needs, how long it takes to open, and what each of Masterpiece’s engine settings gains. Every figure is measured on a real sample set, and the method is at the end.
Summary
| Baseline | Masterpiece | Gain | |
|---|---|---|---|
| Sample memory, 24-bit as recorded | 21.6 GB | 16.2 GB | 1.3x less |
| Sample memory, 24-bit compressed, releases streamed | 21.6 GB | 3.6 GB | 6.0x less |
| Sample memory, 24-bit compressed, shortest release streamed | 21.6 GB | 2.8 GB | 7.6x less |
| Time to open the organ, from the sample cache | 43.2 s | 3.8 s | 11x faster |
| Memory added by drawing all 44 stops | none | flat |
The baseline is the conventional approach: every sample decoded to 32-bit floating point and held in memory. For the opening time, the baseline is the first load at the same settings, decoded from the files.
Test bed
| Instrument | Friesach: 44 stops, three manuals and pedal |
| Sample set | 17.0 GB, 12,148 WAV files, 24-bit / 48 kHz / stereo |
| Machine | 15.9 GB RAM, Windows |
| Build | Masterpiece 0.3.3, Release |
The figures are the project’s own measurements, made with Masterpiece 0.3.3. The storage formats, release streaming, mono folding, the cache and rate conversion they measure work the same in 0.9.0; lossless compression, added since, is described below with its own figures.
Techniques
The settings are on the Loading tab of Organ settings, and each takes effect at the next load of the organ.
| Technique | Setting | What it does |
|---|---|---|
| Release streaming | Stream releases from disk | A release tail is several seconds of room sound, played once from its start and never looped. Masterpiece keeps only its first frames in memory and streams the rest from disk into a per-voice ring buffer while it sounds. Attacks and sustain loops stay in memory. |
| 24-bit storage | Resident format: As recorded - 16 or 24-bit, as each file is | The source files are 24-bit. Samples are held as 24-bit integers, so the audio in memory is bit-for-bit identical to the file. A 16-bit file is held as 16-bit integers, also bit-for-bit. The 32-bit float baseline widens every sample. |
| 20-bit storage | Resident format: 20-bit - a sixth less than the source | Samples are requantised to 20 bits against each file’s own peak and packed so two samples take five bytes: two and a half bytes a sample. |
| 16-bit storage | Resident format: 16-bit - two thirds of that, inaudible | Samples are requantised to 16 bits against each file’s own peak, so a quiet stop still uses every bit. |
| Lossless compression | Lossless compression in memory | 16-bit and 24-bit samples are held split Rice coded and decoded as they play, bit for bit what the file holds. See Compression. Greyed out for 20-bit and 32-bit float storage. |
| Mono folding | Load in mono (halves memory, gives up the stereo image) | A stereo sample set is folded to mono as it loads. |
| Sample cache | Sample cache | The decoded, converted samples are written to one file, so the next load of the same organ with the same settings is one sequential read in place of 12,148 decodes. |
| Load-time rate conversion | Sample rate | Samples are converted to the chosen rate as they load (As recorded, 48 kHz or 44.1 kHz), so playback needs no per-voice rate conversion. |
The Quality list sets several of these at once:
| Quality | What it sets |
|---|---|
| Best: as recorded, all in memory | As recorded, every sample in memory |
| High: as recorded, compressed, releases streamed | As recorded, compressed, release tails streamed |
| Recommended: 16-bit, releases streamed | 16-bit, release tails streamed |
| Compact: 16-bit, compressed, releases streamed | 16-bit, compressed, release tails streamed |
| Small: 16-bit mono, compressed, releases streamed | 16-bit mono, compressed, release tails streamed |
| Smallest: as Small, short releases only | As Small, with the shortest release of each pipe alone |
| Custom | Shown when the settings below it match none of the above |
Compression
With Lossless compression in memory on, each sample is cut into blocks of 4,096 frames, each block predicted and its residuals Rice coded, and the voices decode the blocks they play as they play them. The samples a voice plays are bit for bit the file’s samples. Measured on a tenth of the Friesach set on a two-core Intel Core i3, the coded samples take a third of the bytes of plain 24-bit storage, and they decode at 224 million frames a second. On the whole Friesach set with the 0.9.0 build, the coded samples take 5,394.5 MB at 24 bits (0.333 of plain), 3,301.5 MB at 16 bits (0.306) and 1,661.9 MB at 16 bits mono (0.308).
The decoding is done on the render threads, so a compressed organ takes more processor time per voice than a plain one. The benchmarks perf.voice.coded-playback and perf.codec.split-rice-decode measure it on the machine they run on. See Architecture.
Memory
| Configuration | Held in memory | Left on disk | Memory saved | Reduction |
|---|---|---|---|---|
| 32-bit float, resident (baseline) | 21,606.5 MB | |||
| 24-bit, resident | 16,204.9 MB | 5,401.6 MB | 1.3x | |
| 24-bit, streamed | 6,976.0 MB | 8,891.9 MB | 14,630.5 MB | 3.1x |
Release streaming is the largest single saving: it leaves 56% of the sample data on disk. The settings multiply, and each step is an exact ratio of the one before.
| Step | Before | After | Ratio |
|---|---|---|---|
| 32-bit float to 24-bit | 21,606.5 MB | 16,204.9 MB | 0.750 |
The exact ratio confirms that the accounting measures the sample data itself.
Memory while loading and playing
Each run opens the organ, then walks the registration from a single Principal 8′ to full organ in eight steps. At each step it plays the same 15-second passage: notes build up to sixteen held voices, then all are released together, so every voice is in its release tail at once.
Memory rises only while the organ loads. After that it stays level through every registration step and every chord, including sixteen simultaneous release tails streaming from disk.
Memory against registration
Every rank is loaded whether its stop is drawn or not, so full organ costs the same memory as a single stop. Peak process memory at each step:
| Configuration | 1 stop | 44 stops | Change |
|---|---|---|---|
| 24-bit, streamed | 8,270 MB | 8,268 MB | −2 MB |
Drawing a stop waits for no samples, and a registration change allocates nothing.
Load time
| Configuration | Time to open | Speed-up |
|---|---|---|
| 32-bit float, resident (baseline) | 77.1 s | |
| 24-bit, resident | 55.8 s | 1.4x |
| 24-bit, streamed | 28.9 s | 2.7x |
Holding less also opens faster: a streaming load reads no release tails, and they are more than half the data on disk.
Sample cache
| 24-bit, compressed, releases streamed | Decoded from WAV | Read from cache | Speed-up |
|---|---|---|---|
| Sample loading | 42.7 s | 3.3 s | 13x |
| Whole organ | 43.2 s | 3.8 s | 11x |
Measured with Masterpiece 0.9.0 on a 4-core Debian 13 machine with an NVMe disk, every stop loaded, the source files already in the system’s file cache. The cache file is 3,617 MB.
The cache is keyed to a fingerprint of everything that changes the bytes in memory: the organ definition’s size and modification time, storage width, mono folding, load rate, preload head, loop selection, release streaming and the ranks requested. Any change is a cache miss that rebuilds the cache, so a stale cache is never read. This was verified on a five-rank load: a cache is reused at the settings it was written with, and rebuilt to exactly the expected size when the storage width or the channels change.
By default Masterpiece keeps a single cache file and replaces it when the organ or settings change, so the cache stays the size of one organ. The Sample cache list offers One cache, replaced as organs change, One cache per organ (uses more disk) and Off.
Sample-rate conversion
Memory falls in exact proportion to the load rate: a 96 kHz sample set played through a 48 kHz device takes half the memory. Verified on Friesach (five ranks) by converting from its native 48 kHz:
| Load rate | Held in memory |
|---|---|
| 48 kHz, as recorded | 1,599.7 MB |
| 44.1 kHz | 1,469.8 MB |
| 24 kHz | 799.9 MB |
Pitch and level are unchanged at every rate. A converted attack joined to a converted streamed release tail matches a fully resident render to 0.0 dB across the whole release.
The Sample rate list offers As recorded, 48 kHz and 44.1 kHz.
Audio fidelity
Measured on the sample data directly, applying exactly what the loader applies, to 60 files chosen at random from the 12,148:
| Storage | Compared with the source file |
|---|---|
| 24-bit | Bit-for-bit identical |
| 16-bit | 78.1 dB signal to quantisation noise (median), 75.2 dB lowest |
Method
- Held / left on disk. The sample library’s own accounting, logged at the end of each load:
residentBytes()sums the sample buffers actually held,streamedBytesSaved()sums what streaming left on disk. - Process memory. The process’s private bytes, sampled from outside it every 250 ms.
- Load time. From the start of the load to the organ being ready to play, as logged by the application.
Friesach is a freely published sample set by Piotr Grabowski and is not part of this repository. See ATTRIBUTION.md in the repository root.
Contributing
This page explains how to report a problem, ask a question, propose a change and add a translation, what licence a contribution carries, and the conventions the code follows. Masterpiece is free software under GPL-3.0-only, developed in the open at https://github.com/bonninr/masterpiece.
Reporting issues
Bug reports and organ definitions that do not load are welcome at https://github.com/bonninr/masterpiece/issues. A report that can be acted on contains:
-
The version (
Masterpiece --version) and the system. -
The organ and where it came from: the sample set’s name and publisher, and whether it was opened from a folder or from a RAR or
.orguepackage. -
The log. Masterpiece always writes
masterpiece.log, and keeps the previous run’s asmasterpiece.previous.log, in the settings folder:System Folder Windows %APPDATA%\MasterpiecemacOS ~/Library/MasterpieceLinux ~/.config/MasterpieceThe Diagnostics tab of Settings runs the program’s checks and copies them, with the last 200 lines of the log, for a bug report.
-
For a fault in loading,
--log <file>writes the log from the start with the timing of each stage. For a fault in MIDI,--log-midirecords every message and what became of it. For a click or a wrong tail on key release,--log-releasesdescribes every release. For a stuck note that appears at random,--record-midi <file>saves the session as a MIDI file. See Command line. -
The steps that produce the fault, and what you expected.
An issue describes one concrete problem. Use Discussions for questions, ideas and themes.
Discussions
Questions, ideas, requests for support of a new feature and conversations about how something should work go to https://github.com/bonninr/masterpiece/discussions. Source comments cite discussions and issues by number (for example #358 for the split keyboard).
Pull requests
- Branch from
main, and keep each pull request to one change. - Run the test suite (
mp_tests; see Testing). CI runs it on every pull request on Windows, Linux x86-64 and macOS on Apple silicon, cross-builds Linux arm64 and the 32-bit Raspberry Pi target, and builds the plugins for Windows and Linux, the Flatpak, iOS and Android. The Intel Mac build and the Mac plugins run onmainand for releases. - Add or update a test for behaviour you change. A test that fails without your change documents the fault.
- Describe in the pull request what the change does for a player, and how you tested it.
- Run
python tools/i18n.py --checkwhen you add or change a string the program shows; see Translating.
A pull request that touches only README.md, COPYING, LICENCE, .gitignore, screenshots/, site/, manual/, ATTRIBUTION.md, .github/pages-downloads.py or .github/workflows/pages.yml starts no build.
Licence of contributions
By contributing to Masterpiece you agree that your contribution is licensed under the GPL-3.0-only with the additional permission stated in COPYING, and that it may be distributed as part of Masterpiece through app stores and other channels, including under their terms.
The additional permission in COPYING covers combining a modified version with the JUCE framework under a JUCE licence other than the GPL or AGPL.
Translating
The program’s own text is translated with one plain-text file per language in resources/translations/, named by the two-letter language code. The languages shipped are Czech (cs), German (de), Spanish (es), French (fr), Italian (it), Dutch (nl) and Polish (pl). Names of organs, stops and pages come from the organ and are never translated. English is the text in the code and has no file.
To add a language:
- Run
python tools/i18n.py --write, which writesresources/translations/strings.txt, the list of every string in English, and copy it toresources/translations/<code>.txt. - Fill in the
language:line with the language’s name in that language, and thecountries:line with the country codes where it is spoken. - Put the translation on the right of each
"English" = "English"line. - Keep
%1,%2and the other placeholders; they stand for numbers and names the program puts in, and may come in any order the language needs. - Save the file as UTF-8 with no byte order mark.
At run time a string a file leaves out stays English. The tests are stricter: they fail when any language file lacks a string, holds an empty translation, changes the placeholders of a string or contains a string the program no longer has. Translate every line before you open the pull request. Lines beginning with # are comments.
The translated text is chosen on the Language tab of Settings.
tools/i18n.py keeps the files in step with the code:
| Command | Effect |
|---|---|
python tools/i18n.py | Reports, for each language, how many strings are translated and which are missing, stale, empty or have different placeholders |
python tools/i18n.py --write | Writes strings.txt from the TRANS("...") strings in the .cpp, .h and .mm files under src/ and apps/, as a template to translate from; Git ignores it |
python tools/i18n.py --check | Reports, and exits with 1 when anything is missing, stale or inconsistent |
Every string a player reads goes through TRANS("..."). Write the English text in the code and add its translation to every language file; the test functional.i18n.language-files reads the strings from the sources and fails when a language file lacks one. CMake embeds every resources/translations/*.txt except strings.txt in the program; the file list is a glob that CMake re-evaluates at each build.
Code style
There is no formatter configuration in the repository. The style below is what the existing code shows; match the file you edit.
Language and layout.
- C++20, two-space indentation,
#pragma oncein headers,//comments. - Source files are UTF-8. The repository normalises line endings through
.gitattributes(* text=auto; shell scripts,.ymland.cmakefiles are always LF). - The code is in namespace
mp; sub-namespaces aremp::ui(interface),mp::api(control API),mp::split,mp::dsp,mp::simd,mp::codm,mp::realtime,mp::settingsandmp::test. File-local helpers sit in an anonymous namespace.
Names.
- Types are
PascalCase:OrganModel,SwitchNetwork,VoiceEngine. Functions and methods arecamelCase:loadOrgan,resolvePipesInto. Data members end in an underscore:model_,engagedSwitches_. Constants begin withk:kMidiQueueSize,kFirstRoleChannel. Enumerators arePascalCaseinside anenum class. - Object ids use the alias
Id(anint), as the definition format does;0means none. - Files are named after the main type:
SwitchNetwork.handSwitchNetwork.cpp. A test is a class named<What>Testwith a test namefunctional.<area>.<what>.
Module rules.
- Keep
mp_core,mp_archive,mp_sampler,mp_control,mp_splitandmp_scorefree of JUCE headers. A new engine feature goes in one of these when it can, so the test suite covers it with no audio stack. - Text the player reads goes through
TRANS("..."). - Code on the audio thread follows the rules in Architecture.
Comments. The code carries a high density of comments, and the comments explain why. A file opens with a block that says what the file is for, the model it follows and the faults that shaped it. A non-obvious line states the reason for it, often with the number of the issue or discussion that exposed the problem (#120, #267, #320) and the organ on which it showed. Write comments in full sentences in plain language; they are part of how the code is reviewed. Do not restate what the line does.
Comments also cite decision records (ADR-012) and milestones (M2.4). The decision records are not in the public repository, so a comment that depends on one also says what it decided.
Tests. A fix for a fault found on a real organ gets a test that reproduces the fault on a synthetic definition. Fixtures are written for the project and never copied from other projects or from licensed sample sets; see Testing.
This manual
The manual is an mdBook in manual/; the table of contents is manual/src/SUMMARY.md, and manual/WRITING.md is the style guide. Build it with mdbook build manual. .github/workflows/pages.yml builds it with mdBook v0.5.4 into site/docs when a commit changes manual/**, and publishes it at https://masterpieceorgan.com/docs/.
Related files
| File | Content |
|---|---|
README.md | Features, installation, a summary of building and the layout of the modules |
COMMAND-LINE.md | Every command-line option |
PERFORMANCE.md | The measurements, in the Performance page |
ATTRIBUTION.md | Credits for sample sets and music |
COPYING, LICENCE | The licence terms |