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) |
| 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 | Hand-written AVX2, SSE2 and NEON vector code; 725 voices per processor thread by default, up to 16,384 |
| Memory | Samples held at 24 or 16 bits or folded to mono, release tails streamed from disk, and a sample cache for fast loads |
| 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 |
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.8.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 | The program and the VST3 plugin as loose files |
masterpiece-<version>-macos-arm64.zip | macOS, Apple silicon | Masterpiece.app and the Audio Unit and VST3 plugins |
masterpiece-<version>-macos-x86_64.zip | macOS, Intel | Masterpiece.app and 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 VST3 and LV2 plugins, the menu entry and the file types |
masterpiece-<version>-linux-x86_64.tar.gz | Linux, x86-64 | The program and the plugins as loose files |
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 | The program as loose files |
masterpiece-<version>-linux-armhf.tar.gz | Raspberry Pi OS, 32-bit | The program as loose files |
masterpiece-<version>-android.apk | Android | The app |
masterpiece-<version>-ios.ipa | iPhone and iPad | The app, unsigned |
The Raspberry Pi, Flatpak and mobile builds contain the standalone program only. The plugin formats are built for Windows, macOS and the Linux PC packages.
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 24.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. 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 > Organ settings… > Loading 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 VST3 plugin ships in the 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.
Zip
masterpiece-<version>-windows.zip runs from any folder and installs nothing. Extract it and start Masterpiece.exe. The archive also holds the VST3 plugin Masterpiece.vst3; copy it to a folder the DAW scans (see Plugins).
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, Masterpiece.component (Audio Unit) and Masterpiece.vst3. Move Masterpiece.app to Applications.
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 24.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 |
/usr/lib/vst3/Masterpiece.vst3 | The VST3 plugin (amd64 package) |
/usr/lib/lv2/Masterpiece.lv2 | The LV2 plugin (amd64 package) |
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 the program and the VST3 and LV2 plugins as loose files. 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 path/to/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 as loose files, 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 (Linux). The plugin shares its settings folder with the standalone program. See Plugins in a DAW.
| Format | Windows | macOS | Linux |
|---|---|---|---|
| VST3 | Masterpiece.vst3 in the zip | Masterpiece.vst3 in the zip | /usr/lib/vst3/Masterpiece.vst3 from the amd64 .deb; loose in the tar.gz |
| Audio Unit | none | Masterpiece.component in the zip | none |
| LV2 | none | none | /usr/lib/lv2/Masterpiece.lv2 from the amd64 .deb; loose in the tar.gz |
There are no separate plugin downloads. Windows and macOS ship the plugins as bundles inside the zips; copy them into a folder that the host scans.
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… 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. It has three steps, shown as Step 1 of 3 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 defaults, which ends the first-run state.
| Step | Title | What it asks | Takes effect |
|---|---|---|---|
| 1 | Sound | The audio 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 machines: a smaller buffer answers a key faster and breaks up when it is too small. | At once; stored in audio.xml when the program quits |
| 2 | Your keyboards | A box per MIDI input, headed Tick the keyboards you play from:. All inputs start on. 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 channel of each manual is set on Settings > General settings… > MIDI; a drawstop is learned with a right-click. | At once |
| 3 | An organ | The button Choose an organ… opens the file dialog. The status line reads No organ loaded yet or Loaded: <name>. | 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.
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. Keep changes starts the load. The organ’s console is on screen in seconds, ahead of the samples. See Opening an organ and Memory, loading and streaming.
Updating
The program has no update check. 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. 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 > Organ settings… > Loading shows where it is.
| 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. |
| 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 |
| 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 favourites window, 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. |
| Hauptwerk-format package | .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. 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. See Memory, loading and streaming.
Ways to open an organ
File > Open…
File > Open… opens the favourites window. When the favourites list is empty, it opens the file dialog directly.
The File menu holds three items:
| Item | What it does |
|---|---|
| Open… | The favourites window, or the file dialog when there are no favourites. |
| 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. |
| Recorder… | Opens the recorder 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, *.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 opens the file dialog. |
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 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>).
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> inside 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>). 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 the Loading tab of Organ settings. 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. |
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.
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 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 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 Settings menu holds Licence confirmed for this organ 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 favourites window
File > Open… shows the favourites window, titled Open. It is resizable and keeps up to 64 organs in numbered slots.
| Element | What it does |
|---|---|
| Search field | Placeholder Search the favourites. 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. |
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 this organ playable without its installation files 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 the Loading tab of Organ settings. 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 (Keep changes) 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 the title bar’s close button; it closes when the load ends. 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 | 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. |
| Saving the samples for the next load | N of M MB written - N MB/s - about N minutes left. |
| Preparing to play | Empty. |
| Ready, Cancelled, Failed | The dialog closes. |
Saving the samples for the next load 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 saving the samples for the next load 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 saving | The organ opens, and the detail line reads The organ opens without saving its samples. The next load reads the samples again. |
A cancelled load discards the partly loaded organ, because half an instrument that silently drops notes is worse than none. 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 Settings menu. The same happens when a load stops at the memory limit, 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 or unreadable | The organ plays. The status line shows N missing (named in the log) and N unreadable (named in the log). A dialog titled Some samples could not be read shows the first three. |
| 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. |
| 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 this organ playable without its installation files. |
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 three 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 plain stop list, the swell faders, 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 and 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 narrow window) | Always |
| Page tabs | 28 px | When the console has more than one page, or a panel is shown as a tab |
| Console, panel or stop list | The rest | Always |
| Swell faders | 120 px wide, at the right | View > Swell faders |
| On-screen keyboard | 96 px, plus 24 px for the manual selector | View > Keyboard |
| Status line | 20 px | Always |
The top bar
From left to right the bar holds the File, View and Settings menus; the No DSP box; 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 layout selector, when the organ offers a choice; the save button; and the Panic button, drawn as an octagon with a cross.
File
| Item | What it does |
|---|---|
| Open… | Opens the favourites window, which has a button for the file dialog. Until an organ has been added to the favourites, Open… goes straight to 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. |
| Recorder… | Shows or hides the Recorder window. The item is ticked while the window is shown. See Recorder. |
View
| Item | What it does |
|---|---|
| Console | Shows the organ’s console pages. The item reads Stop list when the organ ships no console artwork. It is ticked while a panel is not shown; choosing it while a panel is shown returns to the console or the 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 two. |
| Rename or delete a panel | A submenu, shown when the organ has a panel, with Rename <name>… and Delete <name> for each. |
| Combinations | Shows or hides the Combinations window. Ticked while shown. See The player’s own combinations. |
| Swell faders | Shows or hides the strip of swell faders. The item is present when the organ has at least one swell shoe. |
| Keyboard | Shows or hides the on-screen keyboard. |
| Show played keys | Lights the keys of the drawn manuals as they are played. Ticked by default. |
| Split keyboard | Shows or hides the Split keyboard window. See Split keyboard. |
| A page in its own window | A submenu with one item per console page, ticked while the page has a window. Present in the standalone application, while the console is shown. |
The Swell faders, Keyboard and window items are described in the sections below. Show played keys is described under Show played keys.
Settings
| Item | What it does |
|---|---|
| Organ settings… | Opens the settings of the loaded organ. Disabled until an organ is loaded. See Organ settings. |
| Licence confirmed for this organ | 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. |
| General settings… | Opens the program’s settings. See General settings. |
| Audio and MIDI… | Opens the audio device and MIDI input selector. Present in the standalone application. See Audio, room and mixer. |
The standalone application supplies the three settings windows. In the VST3, LV2 and AU plugins the editor has no handler for Organ settings… and General settings…, and Audio and MIDI… is absent.
Controls in the bar
| Control | What it does | Default and range |
|---|---|---|
| No DSP | Switches the engine to plain sample playback: the wind model, tremulants, enclosure shading, voicing and the room reverb are bypassed. The same switch is Simple WAV only (bypass all DSP) in Organ settings. | Off. Saved per organ. |
| Volume slider | The master volume, with a readout in dB to its right. 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 3 / 12, or No frames. A click on the readout asks for a frame number. | Frames 1 to 999 |
| 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. | |
| Layout selector | Chooses the console layout. Shown when the console is on screen and the organ offers more than one layout. | See Layouts |
| 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 and silences every note still sounding. |
The bar shortens in a fixed order when the window narrows. The level meter gives way first and the volume fader keeps at least 90 px. When the sequencer, tuning and utility buttons leave less than 350 px for the menus, No DSP and the fader, the buttons move to a second row of their own.
The sequencer buttons on a phone or tablet are 44 px wide and the Panic and Save state buttons 46 px wide, as against 30 px and 38 px on a desktop.
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 encrypted,N awaiting a licenceandINCOMPLETE (memory limit). 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,
saving the samples for the next load, with a percentage and, after a few seconds, the time left. - 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, a warning that the disk fell behind.
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.
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 shown as tabs follow the console pages. A click on a tab shows that page.
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.
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 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. A page in its own window always fits the window.
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. The layout selector in the top bar 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. |
| 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. |
| 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.
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 Settings > Organ settings…, tab Stops 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. | <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 (toggles), CC 20 (held)), MIDI window…, Learn (Learn (held while pressed) for a momentary button), a submenu Learn another way with Toggle: each press draws or cancels, Held while pressed, Draws it only and Cancels it only, and Clear mapping. |
| Swell shoe, crescendo, dial, slider; swell fader | The control’s name, its mappings, 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 pistons that bring it to a keyboard. |
| Element of a panel | The MIDI window of the stop, coupler, piston or control. |
| Page tab, panel tab | See Page tabs. |
| Empty part of the console | Cancels a learn that is armed. |
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 > A page in its own 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 two 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 the second. The panels are named Panel 1 and Panel 2 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. |
| 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. |
| 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 | The MIDI window of the element. |
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. |
| 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 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 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.
Swell faders
View > Swell faders 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 in Settings > General settings > MIDI, 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.
Show played keys
View > Show 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 no fixed shortcuts. 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 |
| 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 |
| 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 |
| Swell fader | The organ’s full name for the shoe |
| Status line | The whole text of the line |
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 |
| Audio and MIDI… | Absent; the host owns the audio device | Present |
| Panel Detach | Present | Absent |
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, 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 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 tremulant switch that swaps a stop’s rank for its alternate recording sounds the held notes again on the other rank.
A tremulant shakes the pipes only when the engine runs its detailed path. The Tremulants box in Settings > Organ settings…, tab Loading, is on by default, and the No DSP box in the top bar bypasses tremulants together with the wind model, enclosure shading and voicing.
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.
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.
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 > General settings > MIDI, off by default): the cancel then also returns every keyboard moved by a manual button to the manual it started on.
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 not part
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.
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.
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
View > Combinations shows or hides the window. 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.
| Control | What it does |
|---|---|
| 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 clicked in this window has stored a combination, Set turns off, so the next click recalls it. Off by default; kept for every organ. A console’s own Set stays down until pressed again. |
| 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 | Open an empty frame at the current frame, or take it out. |
| Digits 1 to 9, 0 | Go to frame 1 to 9, and frame 10 for 0. |
| Generals with - and + | One button per general, 10 to a row. - and + show 10 fewer or 10 more. |
| 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. |
| Set in use, Save as…, Delete | The combination sets. See Combination sets. |
| Quantity | Default | Range |
|---|---|---|
| Generals | 10 | 10 to 100, in steps of 10 |
| Divisionals per division | 5 | 1 to 20 |
| Frames of the sequencer | none stored | 1 to 999 |
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. 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.
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 up to 999 frames, 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 3 / 12 and the one in the Combinations window Frame 3 of 12. The second number is the last frame that holds anything, or the current frame if that is higher. With no frame stored the readouts read No frames; the window shows - of 12 with stored frames and frame 0.
- Stepping forward stops after the last frame that holds anything, and stepping back stops at frame 1. It never wraps. Stepping from frame 0 goes to frame 1.
- With Set on, stepping captures what is drawn into the frame it lands on, and may run past the last frame to frame 999. Hold Set, walk forwards and set each frame as you go: that is how a sequence for a piece is built.
- |< goes to frame 1, >| to the last frame that holds anything, -10 and +10 move by ten frames and stop at the ends. The digit buttons go to a frame without leaving the keys; outside capture they stop at the last frame that holds anything.
- A click on the readout, in either place, asks for a frame number of up to 3 digits (Go to a frame). A number past the last frame goes to the last frame, unless Set is on.
- Insert opens an empty frame at the current frame (frame 1 when none is current) and the frames after it move up one. It does nothing when frame 999 holds a registration. Delete takes the current frame out and the frames after it move down one.
- 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 1 and > is disabled at the last frame unless Set is on.
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 (Settings > General settings > Combination sets, 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… (Save as new set… in General settings) | Asks for a name (A name for this registration set:), writes a copy of the live registrations under it and switches to it. |
| Delete (Delete set) | 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, Learn (for Set,
Learn: held while pressed and Learn: toggles), MIDI window… and
Clear mapping. Press the control on the console after Learn; a second
right-click cancels. Settings > General settings > MIDI has the buttons
Learn sequencer + and Learn sequencer -. 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.
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 > Swell faders, one for each 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 Settings > Organ settings…, tab Loading; it is on by default, and the No DSP 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.
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. Learn the pistons with Learn temperament - and Learn temperament + in Settings > General settings > MIDI.
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 Learn transpose - and Learn transpose +.
The temperament, pitch and transposition are saved per organ and apply again when the organ is next opened.
Metronome
The metronome is a click generated inside the audio callback, so it keeps time with what is heard. It is in Settings > General settings, tab Metronome.
| Control | What it does | Default | Range |
|---|---|---|---|
| Metronome | Switches the click 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 |
The click is a short decaying sine, 1000 Hz on an ordinary beat and 1500 Hz and louder on the accented beat. The tab 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. No settings file holds them, so they start at the defaults in the table each time the program starts.
Recorder
File > 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. Meta events (tempo, names) are skipped. |
| Clear | Discards the take. |
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 is a single track with a time base of 960 ticks per quarter note. Each event is stamped at 960 ticks per second of the take, and the file holds no tempo event. A reader that assumes the default of 120 bpm counts 960 ticks as half a second, so the saved take reads, in Masterpiece’s own Load MIDI… as well, at half its recorded length.
The take is kept in memory until it is saved or replaced. The folder of the last file dialog is remembered for MIDI files.
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.
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 |
| Swell faders and on-screen keyboard shown | No; both are off at each start | ||
| Metronome, recorded take | No |
Save state
Save state in the top bar (the disk icon, between the layout selector 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 dialog that sets the range, transposition and velocity of one manual, MIDI learn for stops, couplers, pistons and swell shoes, 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 dialog or through the Keyboards rows of the MIDI tab. 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 and system exclusive messages that a control claims operate that control: a stop, coupler, piston, shoe or one of the program’s own buttons. A claimed message operates only that control.
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
The MIDI tab of General settings (Settings > General settings > MIDI) holds the input and output choices. The same tab is also in Settings > Organ settings > MIDI; both edit the same mapping.
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. Connect and switch on every console before starting Masterpiece; a console connected later does not play until the next start.
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 output
| Name | What it does | Default | Options | Takes effect |
|---|---|---|---|---|
| MIDI output | The port Masterpiece sends to: lamp and fader messages, key echo to a sound module, and text displays. | None | None and every output the system reports. | At once. |
The MIDI tab opens the output and closes it again when its window closes. Lamps, motorised faders, key echo and console displays therefore work while General settings (or Organ settings) is open. The choice is not kept between sessions: choose the output again after each start.
Feedback and learn options
| Name | What it does | Default | Options | Takes effect |
|---|---|---|---|---|
| Send stop changes back to the console | For a stop, coupler or piston that has no row on its Send tab, sends the stop’s state back on the message that operates it, so a console that echoes the message lights the lamp. A note binding sends note on at velocity 127 and note off; a controller binding sends 127 and 0. The channel is the binding’s, or 1 when the binding listens on any channel. | Off | On, off | At once. Not saved; off at each start. A console that echoes what it receives can latch itself into a loop, which is why the option starts off. |
| General Cancel also puts the keyboards back on their own manuals | After manual buttons have moved a keyboard to another manual (see Pistons tab), General Cancel restores the keyboards to the assignment the player set by hand. | Off | On, off | At once; saved in settings.mpglobal (cancelresetskeyboards). |
| Noise filter: 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). Switch it on for a console whose contacts send stray short notes. Leave it off for pistons that send only a brief note. |
One MIDI channel per manual
The Keyboards heading of the MIDI tab lists every playable manual of the loaded organ, one row each:
| Control | What it does | Default | Options |
|---|---|---|---|
| Manual name | The manual of the row. | ||
| Channel box | The channel that plays this manual. | Default (channel N), the channel the organ itself assigns | Default (channel N), Channel 1 to Channel 16 |
| Device box | The input the manual listens to. | Any device | Any device and every input known to the mapping |
| Range, transpose… | Opens the dialog for the manual. |
A choice takes effect at once and is saved with the organ. Two behaviours are worth knowing:
- Choosing a channel replaces all the manual’s entries in its dialog with one entry that covers the whole compass on that channel. Choosing a device replaces them in the same way, and removes the channel from any other manual mapped to the same device.
- Manuals may share a channel. A line under the rows lists them (
Shared -- Channel 2: Great, Swell) after a change. One keyboard that plays two divisions is a coupler a player can build in this way.
Channels decide which division sounds, and the couplers work from that. A wrong channel makes a manual sound like another one.
Default console
| Name | What it does | Default | Takes effect |
|---|---|---|---|
| Use as default for all organs | Stores the loaded organ’s channels 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.
The dialog for one manual
Right-click a drawn manual on the console, or press Range, transpose… in the MIDI tab. The window is titled <manual> - MIDI and has three tabs: Keys, Pistons 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. 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 |
| 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 |
| 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 |
Pistons tab
The tab is headed Pistons that bring the <manual> to one of your keyboards. A piston added here 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 piston…, 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 piston (Now press the piston (keyboard on channel N)...). The list shows each piston as Note 36 on channel 1 brings the <manual> to the keyboard on channel 2, or No pistons yet.
- Pressing the piston lets go of any notes held on that keyboard first, and keys still down sound on the new manual.
- The same button added on several manuals steps the keyboard through them, one press at a time, in the organ’s own manual order. One button can move several keyboards at once when it was learned for several channels.
- The pistons 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 piston… | Starts the two-step learn. | ||
| Cancel | Appears during the learn and ends it. | ||
| Remove all pistons | Removes every piston 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 piston… starts the learn, so set it first. General Cancel also puts the keyboards back on their own manuals (MIDI tab) restores the keyboards on General Cancel.
Send tab
The Send tab of a manual sends every key played on the manual as a note to the MIDI output, for a sound module or a second program. One row sends to one channel.
The line at the top reads Sent to <output> or No MIDI output is chosen: choose one in Settings, MIDI. New event adds a row; the X button removes it.
| 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 |
Note-on velocity is the played velocity, at least 1; 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 menu’s section header names the object; the next lines list its current mappings, for example Note 36 ch 3 (toggles).
| Item | What it does |
|---|---|
| MIDI window… | Opens the MIDI window. |
| Learn | Arms a learn; the next message from a console is mapped. For a latching switch (a stop or coupler) it learns Each press toggles. For a switch the organ declares as a momentary button (a piston) it learns Held while pressed, and the item reads Learn (held while pressed). |
| Learn another way | Toggle: each press draws or cancels, Held while pressed, Draws it only, Cancels it only. |
| 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, the setter and the sequencer buttons) to map it: Learn, MIDI window… and Clear mapping. The setter offers Learn: held while pressed and Learn: toggles in place of Learn. Right-clicking again while a learn is armed cancels it.
The program’s own buttons have no object on the console to right-click. Use the learn buttons of the MIDI tab:
| Button | What it works |
|---|---|
| Learn sequencer -, Learn sequencer + | Previous and next frame of the registration sequencer |
| Learn manual buttons… | Opens a menu of the 16 channels, each with the manuals; choosing one starts a learn for a piston that brings that manual to the keyboard on that channel (see Pistons tab) |
| Learn page -, Learn page + | The previous and next console page |
| Learn console size | The next console layout |
| Learn panel | The stop-list panel on and off |
| Learn keyboard | The on-screen keyboard on and off |
| Learn combinations | The Combinations window on and off |
| Learn transpose -, Learn transpose + | The transposer, one semitone down or up |
| Learn temperament -, Learn temperament + | The previous and next temperament |
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’s first, last, ten-back and ten-forward moves, the generals and the setter are mapped from the Combinations window.
The line at the bottom of the MIDI tab reads N binding(s), followed by LEARNING: move a control now while a learn is armed.
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 |
| Program change | Shown from 1 | 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.
One message operates one object. Learning a message that another object already uses moves it to the new object. The exceptions are shoes, which share a controller (one pedal can move several swell boxes, and learning the same controller for a second shoe keeps the first), and manual buttons, which share a message to step a keyboard through several manuals. 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
| Behaviour | MIDI window label | Right-click label | What happens |
|---|---|---|---|
| Toggle | Each press toggles | Toggle: each press draws or cancels | 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. |
| Momentary | Held while pressed | Held while pressed | 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. |
| Engage only | Draws it | Draws it only | The press draws the switch; the release is ignored. |
| Disengage only | Cancels it | Cancels it 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 Draws it and one Cancels it. Learning Draws it only leaves an existing Cancels it only alone, and the reverse, so both can be taught in turn. Any other learn replaces what the object had.
A new row in the MIDI window starts as Each press toggles for a latching switch and Held while pressed 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. The program’s own buttons (the player’s generals, divisionals, cancels, the setter, the sequencer) have no Send tab, because they light nothing on a console. 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. | Note, Controller, Program change, System exclusive | |
| Number | The note (shown as a name with its number), controller number (0 to 127) or program number (1 to 128). 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. | ||
| What it does | The behaviour (see the table above). For a stop, coupler, tremulant or switch: Each press toggles, Held while pressed, Draws it, Cancels it. For the program’s pistons and cancels: Fires when pressed. For the setter: Fires when pressed and Each press toggles. | Follows the switch, see above | |
| 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 already used by something else moves here.
Send tab
One row per message that Masterpiece sends to the MIDI output when the object changes. The line at the top reads Sent to <output> or No MIDI output is chosen: choose one in Settings, MIDI.
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 or a click. For a lamp in a drawstop or an LED by a piston. For a shoe, the message goes out whenever the shoe moves. When the list changes, Masterpiece sends the present state of every lamp, which a console needs when it is set up.
New event adds a row. A new row 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 row starts as a controller.
| Column | What it does | Default | Options |
|---|---|---|---|
| Event | The message type. | The type of the receive row, else Note | Note, Controller, Program change, System exclusive |
| Channel | The channel it goes out on. | The receive row’s channel, else 1 | 1 to 16 |
| Number | The note, controller or program number. | The receive row’s number, else 0 | As for Number above |
| When on (stop) | The velocity (note) or value (controller) sent when the stop comes on. | 127 | 0 to 127 |
| When off (stop) | The velocity or value sent when it goes off. Note on at velocity 0 is the usual lamp off. | 0 | none, 0 to 127 |
| 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 |
With none in When off, nothing goes out when the stop goes off. A program change has no off: it sends its number when the stop comes on and nothing when it goes off. For a shoe, Program change sends the scaled value as the program number. System exclusive is listed but is received only; a row of that type sends nothing.
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. The tab also appears for the player’s generals, divisionals, cancels, setter and sequencer buttons; a key stored there has no effect.
Sending to a console
Three things send to the MIDI output: the rows of the Send tabs (lamps, faders, key echo), the echo option of the MIDI tab, and the text displays. All of them need a MIDI output.
Console displays
Many consoles have text displays on the jamb that a system exclusive message drives. The Display tab of General settings (Settings > General settings > Display, heading 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, twice a second at most. 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 not saved and starts switched off each time General settings opens. The display is updated while General settings is open, and the MIDI output must be chosen first. The Combination set line currently shows a blank line.
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, the generals and general cancel, the setter, the page, layout, panel, keyboard, combinations, transpose and temperament buttons, 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 mapping in the MIDI tab writes both files. Clear mapping removes every binding, send and shortcut from memory and keeps the manual entries; the files change at the next save.
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 |
channel | 0 for any, else 1 to 16 |
trigger | toggle, momentary, on (draws it), off (cancels it) |
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) 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 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 View > 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 and only those a player can reach from a MIDI keyboard. 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 and the bass 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.
- 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.
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 of the organ that has keys and can be played from MIDI |
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 |
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 output pairs of 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, Room, Metronome, Mixer and Voicing tabs of Settings > General settings. Settings > Audio and MIDI… opens the same window on the Audio tab. The memory and loading choices that decide how many voices a machine can render are in Settings > 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 Simple WAV |
|---|---|---|
| Voices | Every sounding pipe is rendered, assigned to a mixer pair (see Output routing) and, where its rank is enclosed, filtered by its swell shades | Shades and tremulants are bypassed; the voices play |
| Voicing EQ | The ten-band equaliser of Organ settings > Voicing EQ | Yes |
| Room | The impulse-response convolution of the Room tab | Yes |
| Organ trim and master level | The organ’s own output trim and the master fader, applied as one multiplication | No |
| Audio recorder | Captures the signal at this point, so a recording does not contain the metronome | No |
| Metronome, load-progress taps, speaker keep-alive tone | Added after the fader | No |
| Level meter | Reads the finished block | No |
The Simple WAV only (bypass all DSP) box in Organ settings > Loading (also the No DSP box in the top bar) switches off wind model, tremulants, enclosures, voicing EQ, convolution and detuning. The per-rank and per-pipe voicing 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 audio device
Open Settings > Audio and MIDI…. The tab is the device selector with two additions below it: a latency line and the Keep portable speakers awake control.
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 the device with two output channels. | 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) | |
| Active MIDI inputs, MIDI Output | The MIDI ports; see MIDI and consoles |
The selector offers one to eight output channels and no input channels. The advanced options are visible. 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: Key to speaker: about X ms, of which the buffer is Y ms and the output Z ms, as the device reports it. 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
The engine has one switch. Organ settings > Loading > 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 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. |
Output routing and the mixer
Settings > General settings > Mixer assigns each rank of the loaded organ to one of up to eight pairs. The pairs are rendered separately, each with the enclosure processing of its ranks, and mixed together into the stereo output of the device. No sample set declares an audio routing, so the layout is the player’s, in the way a MIDI mapping is.
| Control | What it does | Default | Takes effect |
|---|---|---|---|
| Output pairs | 1 (stereo) and 2 pairs to 8 pairs. Lowering the count folds ranks that pointed at a removed pair back to Pair 1. | 1 | At once for notes started afterwards |
| Status line | N rank(s), M pair(s); when something is wrong it adds X unrouted, Y stale | ||
| Spread ranks evenly | Assigns the ranks in rank-number order to the pairs in turn, so that the routing is audible straight away | At once | |
| All to bus 1 | Puts every rank on Pair 1 | At once | |
| Save for this organ | Writes the organ’s settings file, including the routes | At once | |
| Rank list | One row per rank, labelled with its number and name, with a Pair box | Pair 1 | At once |
A rank is routed when a note starts, so notes already sounding keep the pair they began on. A rank with no entry plays through the first pair, so an organ is audible before the Mixer is opened. The pair of a rank is independent of its enclosure: a Swell rank stays behind the Swell shades whichever pair carries it.
Stored
| Part | Where | Scope |
|---|---|---|
The pairs (buses) | The organ’s .mporgan file; also the defaults file when Save as default is pressed in Organ settings > Loading | Read for every organ that has none of its own |
Which rank uses which pair (route) | The organ’s .mporgan file | Per organ |
Changes on this tab are written when Save for this organ is pressed, or by any later save of the organ’s settings, which writes the live state of everything.
The sum of the pairs is the whole organ, so splitting the ranks over more pairs leaves the total unchanged.
The room
Settings > General settings > Room 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 Room 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 IR… | 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 minus its extension | |||
| Wet | The share of the convolved signal in the output | 0.25 | 0 to 1 in steps of 0.01 | 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 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 total energy with one gain for all channels so that a true-stereo room keeps its balance. 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 room follows the voicing EQ and precedes the master fader. Simple WAV 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.
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
Settings > General settings > Voicing is the voicer’s tab: a level and a tuning for a whole rank or for one pipe, in two sets for comparison.
| Name | What it does | Default | Range or options |
|---|---|---|---|
| Rank | The rank to adjust, listed as its number and name | First rank | Every rank of the loaded organ |
| Applies to | The whole rank or One pipe | The whole rank | |
| MIDI note | The pipe, by its MIDI note; enabled with One pipe | 60 | 0 to 127 |
| Level | The gain of the rank or pipe | 0 dB | -12 to +12 dB in steps of 0.1 |
| Tuning | The pitch offset | 0 cents | -50 to +50 cents in steps of 0.1 |
| A / B | Makes the other of two complete voicing sets the live one | Set A live | |
| Copy to other | Copies the live set to the other slot | ||
| Reset this | Sets level and tuning of the chosen rank or pipe to 0 | ||
| Reset everything | Clears the live set | ||
| Save for this organ | Writes the organ’s settings file |
The line under the buttons reads Slot A - N rank(s), M pipe(s) adjusted - takes effect on the next note. A pipe that does not exist on the chosen rank shows This rank has no pipe at that note.
- 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 Simple WAV on and cost nothing while a note sounds.
- Voicing is stored per organ, as
voicingadjlines for both slots 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 file also holds brightness and balance values for each adjustment. The tab has no control for them and the engine does not apply them.
Relation to Voicing EQ
The Voicing 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), off by default and stored per organ, applied before the room. The Voicing tab of General settings changes single ranks and pipes in level and pitch. Both are per organ. See Organ settings for the equaliser.
The Voicing box among the switches of Organ settings > Loading is saved with the organ and does not change the sound; the adjustments of the Voicing tab apply whatever it says.
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 Simple WAV 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).
The metronome
Settings > General settings > Metronome adds a click to the output.
| Name | What it does | Default | Range |
|---|---|---|---|
| Metronome | Switches the click on | Off | On, off |
| Tempo | Beats per minute | 90 bpm | 20 to 300 in steps of 1 |
| Beats per bar | The bar length; the first beat of each bar is accented | 4 | 0 to 12 in steps of 1; 0 gives no accent |
| Level | The click volume | 0.5 | 0 to 1 in steps of 0.01 |
A label below the sliders reads Beat and the number of the beat in the bar while the click runs. All four controls act at once. Their settings last for the session; each start begins with the defaults above.
The click is a short decaying sine (a time constant of about 9 ms): 1000 Hz on ordinary beats and 1500 Hz at 100% strength on the accented first beat, with ordinary beats at 70% strength. It 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 sounds on both channels.
Note
The Metronome box starts unticked each time the window opens, whether or not the click is running. Tick it and clear it again to stop a click that was started earlier.
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 Log tab of General 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 | Organ settings > Loading > Polyphony limit. The default is 725 voices per usable processor core and at least 1,536 (1,536 when release streaming is on); the box offers 256 to 10,240 voices. 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; a lower limit applies at once and a higher one rebuilds the pool at once. |
| Processor | Late blocks on every busy passage | Turn on Faster audio engine. Turn off the room, or switch Simple WAV only on to find out whether the DSP stages 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 turn off Stream release tails from disk and load the organ again; see Memory, loading and streaming |
| Memory | Dropouts together with heavy disk use | Use the Recommended or Smallest memory profile, or a smaller set of ranks; see Small, medium and large organs |
| Other programs | Irregular late blocks | A native low-latency driver, and the larger buffer |
The voice-rendering threads are chosen automatically: the number of usable processor cores minus one (one thread when there are two or fewer cores), at most eight. The program has no control for the count.
The sample cache writing “in silence, while it plays” waits for silence and takes no voices from the organ; Save the sample cache in Organ settings > Loading chooses between this and writing before the organ plays.
Platform notes
- Plug-ins. The host owns the audio device and the MIDI ports. The General settings and Organ settings items of the Settings menu do nothing in the plug-in editor, so the tabs on this page are not available there. 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, the sample cache, release streaming, the memory limit and the voice pool fit together. Use it to decide the settings on Settings > Organ settings > Loading and Settings > Organ settings > Stops and perspectives, to read the memory figures Masterpiece shows, and to understand a load that stops at the memory limit or a stream that falls behind. Small, medium and large organs turns these mechanisms into recommended settings per computer.
Where the settings are
Every setting on this page is on the Loading tab of Settings > Organ settings (the entry is available while an organ is loaded). The tab holds the resident format, mono folding, the sample rate, the release choices, release streaming, the sample cache and its folder, the memory limit and the polyphony limit. The Stops and perspectives tab holds the choice of which stops, perspectives and ranks are loaded, with a memory estimate per entry. General settings holds none of them; its Log tab reports the cache folder and the cache files.
The Loading tab applies its choices in three ways.
| Group | Takes effect |
|---|---|
| Resident format, Preloaded per sample, Sample rate, Releases, Release length, release streaming and its hold, Load in mono, stops, perspectives and ranks left out | At the next organ load. The button Load the organ again to apply loads the organ at once. |
| Release tails end below, Polyphony limit, Faster audio engine | At once. |
| Memory limit for samples | Written at once to the general settings file; checked at every load. |
| Sample cache, Save the sample cache, Cache folder | Used at the next load. The cache folder and the time of saving are general settings; the cache mode is saved with the organ. |
A change to the loading choices 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.
When a change decides what the sample cache holds and 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, release streaming and its hold, Preloaded per sample, the sample rate, the cache mode, Releases and Release length.
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. 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 or 16-bit.
- Whether release tails are streamed from disk.
- Mono folding.
- Which stops, perspectives and ranks are loaded.
- 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 |
|---|---|---|
| 24-bit - what the samples are | 3 | The integers of a 24-bit file unchanged. The audio in memory is bit-for-bit what the file holds. |
| 16-bit - two thirds of that, inaudible | 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 - larger than the source | 4 | The decoder’s floating-point result. One third larger than 24-bit. |
Default: 24-bit. Takes effect: at the next load. The settings file stores the width (storage 16, 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.
Memory profile
The Memory profile box sets four choices at once: the resident format, mono, release streaming and Preloaded per sample.
| Profile | Resident format | Mono | Release streaming |
|---|---|---|---|
| Best quality - 24-bit, hold everything | 24-bit | Off | Off |
| Recommended - 16-bit, stream releases | 16-bit | Off | On |
| Smallest - 16-bit mono, stream releases | 16-bit | On | On |
| Custom | Any other combination |
Each profile also sets Preloaded per sample to Whole samples (most memory). The box shows Custom whenever the four choices match none of the three profiles. The profile box does not change the sample rate, the release choices, 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 Friesach ranks 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.
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 last quarter with a raised-cosine curve.
| Option | Kept |
|---|---|
| Whole | The whole release. |
| 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. 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 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….
For each sample the estimate takes the frame count, the channels and the rate from the file header, and applies the current settings: the resident format (2, 3 or 4 bytes per sample), mono, the load rate, the length of Release length, and, for a release played only as a release, the streamed head. 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.
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. Each stop, perspective and rank shows its own figure. A sample used by a stop that stays loaded is counted once and stays in the total even when another stop that uses it is left out.
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 release tails from disk turns streaming on. Default: off. Takes effect: at the next load.
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.
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 sounding voice has a ring buffer holding the next two seconds of 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, 16,384 frames at a time, into the ring. It passes over all streaming voices about every 10 milliseconds. 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, not of the samples. Its size is two seconds of stereo 32-bit float at the audio device’s rate: 768,000 bytes at 48 kHz for each voice in the pool. At the default 1,536 voices the rings take about 1.1 GB. 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 at its default polyphony takes more process memory than the sample figure alone. In the Friesach measurement with Masterpiece 0.3.3, process memory exceeded the sample memory by about 1.29 GB in both streamed runs (8,270 MB against 6,976 MB, and 5,939 MB against 4,651 MB).
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 16,384-frame read of every one of them has to arrive before the resident head ends, one second at the default. The load is many small reads from many files. These figures are worked from the constants above (a two-second ring, reads of 16,384 frames, a pass about every 10 ms); Masterpiece does not measure the disk. 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.
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.
Warning
A streamed release that underruns goes quiet partway. When either message appears, raise the hold share, move the sample files to a faster drive, or turn streaming off.
Savings
Streaming is the largest single saving. On Friesach 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 Friesach: 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 |
| 16-bit, streamed | 4,650.7 MB | 5,927.9 MB | 28.0 s |
| 16-bit mono, streamed | 2,325.3 MB | 2,964.0 MB | 25.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 |
| 24-bit to 16-bit, streamed | 6,976.0 MB | 4,650.7 MB | 0.667 |
| Stereo to mono | 4,650.7 MB | 2,325.3 MB | 0.500 |
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), 0.43 (24-bit streamed), 0.29 (16-bit streamed) and 0.14 (16-bit mono 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.
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 Friesach, 16-bit mono with streaming gives a cache file of 2,439 MB that stands in for about 7 GB of source files. On a five-rank load the cache files were 291.8 MB at 16-bit, 437.7 MB at 24-bit and 146.0 MB at 16-bit mono.
Time saved on Friesach at 16-bit mono with streaming:
| Decoded from the files | Read from the cache | Speed-up | |
|---|---|---|---|
| Sample loading | 13.0 s | 2.6 s | 5.0x |
| Whole organ | 25.9 s | 18.9 s | 1.4x |
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
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. The settings file stores the mode as the number in cache (0 off, 1 single, 2 per organ); the command line option is --cache <off | single | per-organ>.
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 Saving the samples for the next load with the bytes written, the rate and the time left. The button Skip saving 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 saving the samples for the next load: 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. General setting, 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.
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 Log tab of Settings > General settings shows the folder in use, whether it can be written, the free space, and the 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.
- The loop selection.
- Release streaming, the fixed head, the hold share, Releases and Release length.
- Whether the publisher’s licence was confirmed for the organ.
- 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 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 at the memory limit, 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.
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 Log tab of General settings shows the free space of the cache folder and the sum of the .mpcache files in it.
To clear the cache, 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 Log 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>. - 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 this organ playable without its installation files 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…. 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 is the most memory the samples 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 (defaultMemoryLimitMB). 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 loader charges every sample against the budget as it lands. A cached load charges the size of the cache file before it reads it.
When the budget is exceeded 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) and a window titled Only part of this organ fits states how many of the samples (and what percentage) were loaded. 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. The console is drawn without sound so that Settings > Organ settings can be opened from it.
The ways to make an organ fit, in order of cost to the sound: leave out perspectives, stops or ranks on the Stops and perspectives tab; stream release tails; load 16-bit; load in mono; raise Memory limit for samples, on the Loading tab of Settings > Organ settings, when the computer has the memory.
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 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 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, 768,000 bytes a voice at 48 kHz, so a pool of 4,096 voices takes about 3 GB.
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 and perspectives tab chooses what is loaded. The choices are saved for the organ and take effect at the next load, with the button Load the organ again on the tab (marked when the choice 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 shown ranks and Leave out shown ranks act on the ranks that match the filter. Clicking a division heading selects or clears its stops, and a drag over the ticks sets several at once.
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, not broken.
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 | The long phase, with a count of samples and an estimate of the time left. |
| Saving the samples for the next load | The cache is written, when Before the organ plays is chosen and no valid cache existed. |
| 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. The toggle Tap at each 10% while loading an organ plays a short tap at every tenth of the sample loading, so a long load can be followed by ear. It is a general setting, off by default.
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 Friesach, 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, and the plugin editor cannot open the settings windows: the standalone application alone connects the Organ settings… and General settings… entries of the Settings menu to their windows. A plugin loads an organ with the settings files in the same folder as the standalone application, so choose the loading settings in the standalone application 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.
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 resident format, mono folding, release streaming, 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 the Stops and perspectives tab of Settings > Organ settings 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 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 |
| 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 |
The 16-bit resident and the 16-bit mono resident rows follow from the exact ratios 0.667 (24-bit to 16-bit) and 0.500 (stereo to mono). Those figures are the samples only. The voice pool adds to them, and streaming makes the pool larger, because every voice carries a ring of 768,000 bytes at 48 kHz.
| Polyphony | Rings with release streaming on |
|---|---|
| 512 voices | about 0.4 GB |
| 1,024 voices | about 0.8 GB |
| 1,536 voices (the default with streaming) | about 1.1 GB |
| 3,072 voices | 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. The columns below use the default polyphony with streaming, 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.
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 a Memory profile where one matches.
| Computer | Small (3 GB) | Medium (12 GB) | Large (30 GB) |
|---|---|---|---|
| 8 GB | 24-bit, stereo, resident (Best quality) | 16-bit, stereo, streamed (Recommended): 3.4 GB | 16-bit, mono, streamed (Smallest): 4.3 GB; leave out perspectives or ranks if the Stops and perspectives tab shows a total near the limit |
| 16 GB | 24-bit, stereo, resident (Best quality) | 24-bit, stereo, streamed: 5.2 GB; or 16-bit, stereo, resident (8.0 GB) when the disk is slow | 16-bit, stereo, streamed (Recommended): 8.6 GB |
| 32 GB | 24-bit, stereo, resident (Best quality) | 24-bit, stereo, resident (Best quality): 12 GB | 24-bit, stereo, streamed: 12.9 GB; or 16-bit, stereo, resident (20 GB) when the disk is slow |
| 64 GB or more | 24-bit, stereo, resident (Best quality) | 24-bit, stereo, resident (Best quality) | 24-bit, stereo, resident (Best quality): 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. The alternative is the Stops 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.
Cache. 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, which cuts the rings with streaming by 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. The plugin editor cannot open the Organ settings window.
Checking a choice
- Open Settings > Organ settings > Stops and perspectives. The footer shows About %1 for this choice (the limit is %2). 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 again on that tab, or Load the organ again 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); change the settings 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
Settings > Organ settings… opens the settings of the organ that is loaded: how its samples are held in memory, which stops, perspectives and ranks are loaded at all, an equaliser for the whole organ, and the MIDI channels 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 General settings.
Opening the window
The entry Organ settings… in the Settings menu 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 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 660 x 560 pixels and can be resized; the Esc key closes it. It has four tabs.
| Tab | Content |
|---|---|
| Loading | How the organ’s samples are held in memory, the sample cache, the folders and the engine switches. |
| Stops and perspectives | Which perspectives, stops and ranks are loaded. |
| Voicing EQ | A ten-band equaliser for the whole organ. |
| MIDI | The channels and devices of the organ’s keyboards. Present in the standalone application. |
The MIDI tab is present whenever the window is opened by the standalone application, which always passes its audio device manager to it. The window opens only in the standalone application: in the plugin editor the menu entry does nothing.
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 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. General 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.
Engine switches
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Simple WAV only (bypass all DSP) | Plays the samples with no wind model, tremulants, enclosures or voicing, for a slow computer. While it is on, the four switches below are greyed out. The same switch is on the top bar. | Off | On, off | At once |
| Wind model | Simulates the wind supply. Off uses the constant-volume fast path. | On | On, off | At once |
| 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 voicing data of the definition. | On | On, off | At once |
| 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 |
Memory
Memory profile moves the four settings that follow it together. Choosing a profile sets Resident format, Load in mono, Stream release tails from disk and Preloaded per sample. The box shows Custom whenever the four match no profile.
| Profile | Resident format | Mono | Streaming | Preloaded |
|---|---|---|---|---|
| Best quality - 24-bit, hold everything (default) | 24-bit | Off | Off | Whole samples |
| Recommended - 16-bit, stream releases | 16-bit | Off | On | Whole samples |
| Smallest - 16-bit mono, stream releases | 16-bit | On | On | Whole samples |
| Custom | As set | As set | As set | As set |
| 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. 16-bit scales each sample by its own peak first, so a quiet stop keeps the full sixteen bits. | 24-bit - what the samples are | 24-bit - what the samples are, 16-bit - two thirds of that, inaudible, 32-bit float - larger than the source | 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 |
| Stream release tails 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 |
| Memory limit for samples | A load that would take more than this stops with a message 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; global file |
| 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. | Default: N voices (N MB): 725 voices for each processor thread, at least 1,536, at most 16,384; 1,536 while releases stream | 256, 512, 768, 1024, 2048, 3072, 4096, 6144, 8192, 10240 voices; a number set in the file shows as itself. The file accepts 64 to 16,384. | At once; a larger pool is built at once while the organ stays loaded; global file |
Releases
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| 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 |
| Release length | Each release is kept up to this length and fades out over its last quarter. 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. | Whole | Whole, 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 |
Sample cache
The sample cache keeps the decoded samples on disk, so the next load of the same organ is a read. A change to a setting that decides what the cache holds (resident format, mono, streaming, preload, sample rate, releases, release length, cache mode) rebuilds it 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.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Sample cache | How many caches are kept. | One cache, replaced as organs change | One cache, replaced as organs change, One cache per organ (uses more disk), Off | Next load |
| 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, 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 | Next load; global file |
| Cache folder | Where the cache is written. A folder that cannot be created is replaced by the default for that load. | Default (PATH), the cache folder in the data folder | Choose… opens a folder chooser; Default returns to the default folder | Next load; global file |
Folders
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| 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 | Next load; global file |
| 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 |
Options
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Tap at each 10% while loading an organ | 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; global file |
| Reopen the last organ when Masterpiece starts | Loads the organ that was open when Masterpiece last closed. An organ that was loaded when Masterpiece last closed unexpectedly is not reopened. | Off | On, off | At the next start; global file |
| Keep this organ playable without its installation files | Gives the organ a sample cache of its own whatever Sample cache says, and keeps 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 and costing the cache’s size on this disk. Streamed release tails still come from the installation files: turn streaming off for an organ that has to play without them. | Off | On, off | At the next complete load; organ file |
| Faster audio engine | Renders several samples at a time with the processor’s vector unit (AVX2 on a PC, NEON on ARM). The sound is the same, with more polyphony to spare. The label reads Faster audio engine: using AVX2 (or NEON) when the unit is found, and Faster audio engine: not available on this processor when it is missing. If anything sounds wrong with it on, switch it off. | On | On, off | At once; global file |
Readout
A line under the controls reads Resident samples: N MB (N samples, FORMAT, mono or stereo, RATE). 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.
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 again | Appears while an organ is loaded. Reads Load the organ again 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 format, mono, streaming, preload 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.
Stops 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 shown ranks | Ticks every rank in the filtered list. | At once | |
| Leave out shown ranks | Unticks every rank in the filtered list. | At once | |
| Load the organ again | 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 figures are estimates at the settings of the Loading tab. | 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.
Voicing EQ
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, plus or minus 12 dB; 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. | Off | On, off | At once |
| Flat | Returns every band and the gain to 0 dB. | At once | ||
| Save for this organ | Keeps the equaliser with the organ for its next load. Reads Saved or Could not save afterwards, and returns to its label at the next change. | At once | ||
| Ten band sliders, labelled 31.5, 63, 125, 250, 500, 1k, 2k, 4k, 8k, 16k | One slider for each octave band, in Hz. The lowest and highest bands are shelves; the other eight are peaks (Q 1.4). A double-click returns a slider to 0. | 0 dB | -12 to +12 dB in steps of 0.5 | 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 |
Stored. In the organ file as eq <on> <gain> <band 1> ... <band 10>, written when the equaliser is on or not flat, by Save for this organ and by any other change that makes Masterpiece rewrite the organ file.
MIDI
The same panel as the MIDI tab of General settings, placed here for the player who sets up one organ. Both edit the same mapping and the same global settings. Every control is described in General settings. The controls that belong to the organ are the channel and device boxes of each keyboard, Range, transpose…, and the learned bindings; those are saved in the organ’s .mpmidi file.
Where the organ’s settings are kept
The organ file is organs/<organ key>.mporgan in the data folder (see General 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, Mixer, Voicing and Voicing 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 release tail cutoff, the room, 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, 24 or 32 (32 is float) | Resident format |
mono | 1 or 0 | Load in mono |
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 |
reverb | <on> <wet> <path> | The Room tab |
rate | Hz, 0 as recorded | Sample rate |
cache | 0 off, 1 one cache, 2 one per organ | Sample cache |
stream | 1 or 0 | Stream release tails 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, tremulant, enclosure, voicing, originalpitch | 1 or 0 | The six engine switches |
gain | The master gain (linear) | The volume slider in the top bar |
buses, busir, groups | The mixer’s pairs, per-pair rooms and groups | The Mixer tab |
route <rank> bus <n> | The pair of one rank | The Mixer tab |
voicingadj, voicingslot | The voicing sets A and B and the live slot | The Voicing tab |
eq | The equaliser | The Voicing EQ tab |
skipstop, skipperspective, skiprank | One item left out | The Stops and perspectives tab |
portable | 1 | Keep this organ playable without its installation files |
combset | The combination set in use | The Combination sets tab |
licenceconfirmed | 1 | Licence confirmed for this organ |
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 |
When the volume slider moves, only the gain line is rewritten, so the slider writes no other unsaved change to disk.
General settings
Settings > General settings… opens one window with ten tabs: the audio device, the room, the metronome, MIDI, the mixer, voicing, combination sets, the console display, the language and the log. 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); this page links to them for depth. The settings that decide how a loaded organ is read from disk are in Organ settings.
Opening the window
The Settings button in the top bar opens a menu with up to four entries.
| Entry | What it does |
|---|---|
| Organ settings… | Opens Organ settings. Available while an organ is loaded. |
| Licence confirmed for this organ | Appears only for an organ whose samples carry a publisher licence. Ticked once the licence has been confirmed for this organ; choosing it while ticked withdraws the confirmation, saves the organ’s settings and loads the organ again. |
| General settings… | Opens the window described on this page. |
| Audio and MIDI… | Opens the same window on the Audio tab. Offered by the standalone application. |
The window is titled General settings, opens at 660 x 560 pixels and can be resized. The Esc key closes it. 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.
General settings hold the program and the player’s console. Four tabs hold choices that belong to the organ that is loaded and are saved with it: Room, Mixer (the rank routing), Voicing and Combination sets. The MIDI tab keeps the keyboard channels and learned controls per organ and the rest for every organ. Where settings are kept lists the files.
Note
In the plugin editor, Organ settings… and General settings… do nothing and Audio and MIDI… is absent. Only the standalone application opens these windows. Licence confirmed for this organ works in both.
Audio
The upper part of the tab is the device selector of the audio library. It chooses where Masterpiece sends sound and which MIDI inputs are open. Its controls are described here generically; their labels and the choices offered depend on the system and the driver.
| 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, listed as stereo pairs. | As the device opens | Up to 8 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 | ||
| MIDI inputs | One tick for each MIDI input device. | The inputs the system reports | At once |
Below the selector, a line reads Key to speaker: about N ms, of which the buffer is N ms and the output N ms, as the device reports it. 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 |
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.
Audio, room and mixer explains choosing a buffer size and a driver.
Room
Impulse-response reverb for a dry set or for headphones. Many sample sets are recorded in the room they live in, and several ship close, far and rear perspectives that already contain the room; for those the wet level wants to be low.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Impulse-response reverb | Switches the convolution on or off. | Off | On, off | At once |
| Load IR… | Opens a file chooser for an impulse response and switches the reverb on once it has loaded. A file that cannot be read produces the message The impulse response was not loaded. | WAV, AIFF and FLAC files | At once | |
| Clear | Removes the loaded impulse response. The label beside the buttons returns to No IR loaded. | At once | ||
| Name label | Shows IR: and the file name of the loaded response. | No IR loaded | ||
| Wet | The share of the wet signal in the output. | 0.25 | 0 to 1 in steps of 0.01 | At once |
A one-channel response feeds both sides, a two-channel response is read as stereo, and a four-channel response is read as true stereo (left input to both outputs, then right input to both outputs). The response is normalised by its energy, so a room keeps the loudness of its whole tail. When the file name ends in -<rate>Hz and a sibling file with the device’s rate in that place exists, the sibling is used.
Stored. In the organ file, as the key reverb <on> <wet> <path>. The path refers to the file where it lies: if the file has moved when the organ is loaded, the log records reverb: the impulse response saved with this organ was not found and the organ loads with no room. Each organ opens with its own room. The settings of the loaded organ are written shortly after a change.
Metronome
A click track for practice. It is generated inside the audio callback so that it stays in time with the organ. The click is a short 1000 Hz sine; the first beat of each bar is an octave and a half higher (1500 Hz) and louder. The click is added after the master fader and is left out of audio recordings made with the recorder.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Metronome | Starts and stops the click. | Off | On, off | At once |
| Tempo | Beats per minute. | 90 bpm | 20 to 300 bpm in steps of 1 | At once |
| Beats per bar | The bar length. The first beat of each bar is accented. 0 gives every beat the same click. | 4 | 0 to 12 | At once |
| Level | The loudness of the click. | 0.5 | 0 to 1 in steps of 0.01 | At once |
| Beat readout | Shows Beat N for the beat just played while the metronome runs. | Empty |
Stored. Nowhere. The metronome starts switched off at the defaults in every session.
MIDI
The same panel appears as the MIDI tab of Organ settings; both edit the same mapping. This section lists every control. MIDI and consoles explains the channel assignment, learning and the console actions in depth.
Inputs, keyboards and defaults
| Control | What it does | Default | Range or options | Takes effect and storage |
|---|---|---|---|---|
| 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>. |
| Keyboards heading, then one row for each playable keyboard of the loaded organ | The row holds the keyboard’s name, a channel box, a device box and a button. | |||
| Channel box | The MIDI channel that plays this keyboard. The channel decides which division sounds, and couplers work from it. | Default (channel N), the organ’s own assignment | Default (channel N), Channel 1 to Channel 16 | At once. Saved with the organ’s MIDI mapping. |
| Device box | Which console plays this keyboard, for the case of two consoles that send on the same channel. | Any device | Any device, or a device by its name | At once. Saved with the organ’s MIDI mapping. |
| Range, transpose… | Opens the dialog of one manual: key range, transposition, velocity window, tracker action, short octave and debounce. | The dialog’s own controls; see MIDI and consoles. | ||
| 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. | Empty | ||
| 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>, with role 0 for the pedal and 1 onward for the manuals. | ||
| Clear default | Removes that default. The line beside the buttons returns to No default: each organ starts from its own channels. | At once |
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.
Output and behaviour
| Control | What it does | Default | Range or options | Takes effect and storage |
|---|---|---|---|---|
| MIDI output | The port that lights a console’s drawstops and receives the console display. | None | None and each output port of the system | At once. Held while the window stays open; see the note below. |
| Send stop changes back to the console | Sends each stop change to the output so that a console with lit stops follows 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. Not stored. |
| General Cancel also puts the keyboards back on their own manuals | After pistons 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. |
| Noise filter: when learning, a key counts once held a quarter second | For a console whose contacts send stray notes: a shorter note is dropped. Controllers, program changes and system exclusive messages 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. |
Note
The MIDI output works while the settings window is open. The port is opened by this panel and released when the window closes; the box shows None each time the window opens, so the stop feedback and the console display need the port chosen again.
Learning
The buttons below start a learn: click the button, then press or move the control on the console. Each assignment is a momentary binding. MIDI and consoles covers right-click learning on the console itself.
| Row | Buttons | What each does |
|---|---|---|
| Sequencer | Learn sequencer -, Learn sequencer + | Bind the previous and next step of the player’s combination sequencer. |
| Manual buttons | Learn manual buttons… | Opens a menu of the 16 channels, each with a submenu of the organ’s manuals. Choosing a manual and then pressing a piston makes that piston send the keyboard on that channel to that manual. |
| Console | Learn page -, Learn page +, Learn console size | Previous console page, next console page, next console layout. |
| Learn panel, Learn keyboard, Learn combinations | Show the stop-list panel, the on-screen keyboard and the combinations window. | |
| Learn transpose -, Learn transpose + | Transpose down and up. | |
| Learn temperament -, Learn temperament + | Previous and next temperament. | |
| Save mapping, Clear mapping | Save mapping writes the mapping to disk. Clear mapping removes every binding from the mapping in use. The empty mapping reaches disk with Save mapping, or with the next learned binding or channel change. | |
| Status | N binding(s) | The number of bindings. While a learn waits it adds LEARNING: move a control now. |
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 and temperament buttons) go to midi/console.mpmidi and apply to every organ. The files are rewritten after each learned binding.
Mixer
Routes each rank to a stereo pair of output channels. No sample set declares an audio routing, so the routing is the player’s. A rank that is never touched plays through the first pair. Up to eight pairs can be set up, and they are mixed to the stereo output. Audio, room and mixer explains the use of several pairs.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Output pairs | The number of stereo pairs, mixed to the stereo output. Pair N is assigned device channels 2N-1 and 2N. | 1 (stereo) | 1 (stereo), 2 pairs to 8 pairs | At once |
| Status line | Reads N rank(s), N pair(s), and N unrouted, N stale when a rank has no pair or points at a pair that no longer exists. | |||
| Spread ranks evenly | Assigns the ranks to the pairs in turn, so the routing is audible at once. | At once | ||
| All to bus 1 | Sends every rank to the first pair. | At once | ||
| Save for this organ | Writes the organ’s settings file, including the routing. | At once | ||
| Rank list | One row per rank, labelled with the rank number and name, with a Pair N box. A rank that points at a pair removed by lowering Output pairs returns to Pair 1. | Pair 1 | Pair 1 to the chosen number of pairs | At once |
Stored. The number of pairs and their device channels are the key buses in the organ file, and in the global file when Save as default is used on the Loading tab. The rank routes are the keys route <rank> bus <n> in the organ file; they 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 and tuning, for a whole rank or for one pipe, 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 the DSP switched off. Notes already sounding keep what they began with.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Rank | The rank to adjust, listed as its number and name. | The first rank | The ranks of the loaded organ | At once |
| Applies to | Whether the sliders adjust the whole rank or one pipe of it. | The whole rank | The whole rank, One pipe | At once |
| MIDI note | The pipe, chosen by its note. 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. | 0 dB | -12 to +12 dB in steps of 0.1 | On the next note |
| Tuning | The pitch change. | 0 cents | -50 to +50 cents in steps of 0.1 | On the next note |
| 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 |
Stored. In the organ file, as voicingadj lines for both slots and voicingslot b when slot B is live, written by Save for this organ and by any other change that makes Masterpiece rewrite the organ file. A rank number has no meaning in another instrument, so adjustments never carry across organs.
Combination sets
A combination set is a complete registration book: the organ’s pistons and the player’s own, kept in one file. A recital and a service can each have a set. Changing set saves the one being left first.
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| In use | The set in use for the loaded organ. | (default) | (default) and every set saved for this organ | At once |
| Save as new set… | Asks for a name (A name for this registration set:), copies the registrations in use to a new set of that name and switches to it. | A name. Slash, backslash, colon, asterisk, question mark, quotation mark, angle brackets, the vertical bar and control characters become _; trailing dots and spaces are removed | At once | |
| Delete set | Switches to the default set and deletes the file of the set that was in use. The default set cannot be deleted (The default set cannot be deleted). | At once | ||
| Status line | Reports Now using NAME, or Deleted NAME, back on the default. |
The favourite organs are kept in the Open window.
Stored. The set in use is the key combset <name> in the organ file. Each set is a file in the combinations folder: <organ key>.mpcomb for the default set and <organ key>.<name>.mpcomb for a named one. Playing describes how registrations are stored and recalled.
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 output. It drives external hardware only. The heading on the tab is Console display. The framing bytes belong to the display hardware, so they are typed in here. Choose the MIDI output on the MIDI tab first: the messages leave through the port that lights 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. 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 twice a second.
Stored. Nowhere. The display works while the General settings window is open: the tab’s own timer sends the lines, so sending stops when the window closes, and each time the window opens the display starts switched off.
Language
| Control | What it does | Default | Range or options | Takes effect |
|---|---|---|---|---|
| Language box | 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 |
A string that a translation lacks appears in English.
Stored. In the global file as language <code> (en, cs, de, es, fr, it, nl or pl). The key is absent for System default.
Log
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 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 machine and the organ 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. | 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. | 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 |
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 in Loading | Appears as FAILED when the folder chosen on the Loading tab 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. |
| 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.
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 Loading 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 Loading tab |
polyphony | The voice limit. Written only when set. | Polyphony limit on the Loading 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, and that organ is not reopened. | The crash guard |
language | The language code. Written only when a language is chosen. | Language |
loadticks | 1 or 0. Always written. | Tap at each 10% while loading an organ on the Loading tab |
cancelresetskeyboards | 1. Written only while on. | General Cancel also puts the keyboards back on their own manuals |
learnnoisefilter | 1. Written only while on. | Noise filter: when learning, a key counts once held a quarter second |
combinationsontop | 1. Written only while on. | Always on top in the combinations window |
cachewhileplaying | 1. Written only while on. | Save the sample cache on the Loading tab, set to In silence, while it plays |
setoffafterstore | 1. Written only while on. | Set turns off after storing in the combinations window |
showkeys | 0. Written only while off. | View > Show played keys |
fasterengine | 1 or 0. Always written. | Faster audio engine on the Loading tab |
midiinputoff | A device name. One line per unticked input. | MIDI inputs |
consolechannel | A role (0 for the pedal, 1 onward for the manuals) and a channel 1 to 16. | Use as default for all organs |
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 |
cachedir | The cache folder. Absent for the default. | Cache folder on the Loading tab |
packagedir | The package folder. Absent for none. | Package folder on the Loading tab |
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 IR…, the recorder and the tuning panel |
favourite | <kind> <slot> <name> | <target>: the kind is organ, temperament or combinationset. | The favourites in the Open window and the tuning panel |
Save as default on the Loading tab adds the organ-level keys below to the global file as well, so that an organ without a file of its own starts from them: storage, mono, releases, releaselength, releasecutoff, reverb, rate, cache, stream, streamhead, streamheadpct, preload, root, simple, wind, tremulant, enclosure, voicing, originalpitch, gain, buses, busir and groups. These are described under Where the organ’s settings are kept. An organ that has a file of its own takes the values from that file. The obsolete key reopenlast is 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.
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 the Windows portable .zip, in the macOS .zip, and installed to /usr/lib/vst3 by the PC Debian package |
| LV2 | Linux | Masterpiece.lv2, installed to /usr/lib/lv2 by the PC Debian package |
| AU | macOS | Masterpiece.component, in the macOS .zip beside Masterpiece.app |
The Windows setup program (masterpiece-<version>-windows-setup.exe) installs the standalone program only. To use the VST3 on Windows, take Masterpiece.vst3 from the portable .zip and copy it to a folder that the host scans for VST3 plugins. On macOS, copy the plugins from the .zip to the folders the host scans. After a copy, rescan the plugins in the host.
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.
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 stereo output 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… 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.
The plugin does not reopen the last organ when a project opens. Load the organ again with File > Open… in each instance.
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
Nothing. The plugin returns an empty state to the host and ignores any state a host hands back. A saved project stores no organ, no stops drawn and no parameter values. After a project opens, choose the organ again in each instance.
| Item | Where it is kept |
|---|---|
| The organ’s path | Not kept. Open the organ again after loading a project. |
| 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 voicing EQ and the room reverb. Same switch as No DSP in the console’s top bar. | 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 (View > 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 back to the console, console displays) need a MIDI output that only the standalone program opens.
Audio outputs and buses
| Property | Value |
|---|---|
| Inputs | None |
| Outputs | One stereo bus named Out |
| Reported tail length | 5 seconds |
| MIDI in / out | In only |
The engine renders the organ to this single stereo bus. The mixer’s buses, set under Settings > General settings > Mixer, route ranks inside the engine and are summed to the stereo output; the plugin offers no separate output per division or per bus.
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 > General settings > Audio | Owned by the host |
| MIDI inputs | All enabled by default; selectable in General settings > MIDI | The host’s MIDI stream only |
| MIDI output | Chosen in General settings > MIDI | None |
| Settings windows | Organ settings…, General settings… and Audio and MIDI… in the Settings menu | The Settings menu lists Organ settings… and General settings…, and they do nothing. Audio and MIDI… is absent. |
| 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 | Never opens an organ by itself |
| 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 (File > Recorder…), the Combinations window, the split keyboard, the on-screen keyboard and the tuning controls 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 plugin saves no state in the host’s project; the organ is chosen again after a project opens.
- The Settings menu items do nothing in the plugin. Messages from the program that point to Organ settings (for example after a load stops at the memory limit) refer to windows that only the standalone program opens.
- The host owns the audio and MIDI devices.
- 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 |
| File and View buttons | 84 wide | 70 |
| Settings button | 98 wide | 84 |
| 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 gives the menus and the volume fader a row of their own when the width left after the buttons on the right is below 350 pixels.
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. 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…) 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. |
The Log tab of General settings 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 and MIDI… opens the Audio tab of the general settings. 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 Your keyboards 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. The app lists the inputs the system reports and has no pairing dialog of its own. |
| iPhone and iPad | The inputs CoreMIDI reports. The app has no pairing dialog of its own. |
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 > Organ settings… > Loading is the most memory the samples and the voice pool of one organ may take. 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. Stops and perspectives 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. 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:
| Memory profile (on Loading) | Samples in memory |
|---|---|
| Best quality - 24-bit, hold everything (24-bit) | 16.2 GB |
| Recommended - 16-bit, stream releases | 4.65 GB |
| Smallest - 16-bit mono, stream releases | 2.33 GB |
On a phone or tablet, start from Smallest - 16-bit mono, stream releases, and leave out the stops and perspectives that the repertoire leaves unused (Stops and perspectives). See Small, medium and large organs.
The voice pool counts against the limit. With streamed release tails each voice holds a ring buffer of 2 seconds, 768 KB at 48 kHz, and the default pool is 1,536 voices, about 1.1 GB. 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); 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; Cache folder on the Loading tab 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 Log 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 A page in its own 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 |
| Log 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… | Forgotten | Remembered |
Reporting a problem
Settings > General settings… > Log 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.
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. Settings > General settings > Log 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 in General settings > Log; 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 box in General settings > Log.
--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. A value given here takes precedence over the saved settings for that run, except --cache: a cache mode saved in the organ’s settings still applies. The log line memory config: shows the values in effect.
| Option | Values | Default | Effect |
|---|---|---|---|
--storage | int16, int24, float32 | int24 | How each sample frame is held in memory. int16 uses a third less than int24 and is enough for most sets. float32 uses the most and holds the samples as decoded. 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. |
--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 | single | 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.
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, which is nothing.
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). Settings > General settings > Log > Open the log folder 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
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
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 and the favourites. The first start of the standalone program shows the first-run wizard while this file does not exist; a plugin load creates it.
| Key | Holds | Set with |
|---|---|---|
reopenlastorgan | 1 to reopen the last organ at startup. Default off. | Reopen the last organ when Masterpiece starts |
lastorgan | Path of the last organ that loaded completely. | Automatic, after each load |
running | Path of the organ being loaded or loaded; the crash guard’s mark. Removed at a clean exit. | Automatic (standalone program) |
memlimit | Memory limit for samples, in MB. Absent: 80% of the computer’s memory. | Memory limit for samples |
polyphony | Polyphony limit in voices. Absent: the default. | Polyphony limit |
fasterengine | 1 or 0. Default 1. | Faster audio engine |
loadticks | 1 for a tap at each 10% of a load. | Tap at each 10% while loading an organ |
speakerkeepalive | Level in dB, -80 to -40, of the 20 Hz tone. Absent: off. | Keep portable speakers awake |
language | Language code. Absent: the system language. | Settings > General settings > Language |
cancelresetskeyboards, learnnoisefilter | 1 when on. | Settings > General settings > MIDI |
combinationsontop, setoffafterstore | 1 when on. | Always on top, Set turns off after storing in the Combinations window |
showkeys | 0 when played keys are hidden. | View > Show played keys |
cachewhileplaying | 1 saves the cache in silence while the organ plays. | Save the sample cache |
midiinputoff | Name of a MIDI input that is switched off; one line per input. | The inputs list in General settings > MIDI |
consolechannel | A console role and its MIDI channel, set as the player’s own console. | General settings > MIDI |
library | A folder of sample sets Masterpiece has seen or been given; one line each. The standard library folder of Hauptwerk-format installations in the home folder, ~/Hauptwerk/HauptwerkSampleSetsAndComponents, is added when it exists. | Automatic |
cachedir | Folder of the sample cache. Absent: the cache folder here. | Cache folder |
packagedir | Package folder where composites look for the organs they play. | Package folder |
openfolder, dialogfolder <kind> <path> | Where the file dialogs opened last. | Automatic |
favourite <kind> <slot> <name> | <target> | The favourites of organs, temperaments and combination sets. | File > Open…, the favourites window |
storage, mono, releases, releaselength, releasecutoff, rate, cache, stream, streamhead, streamheadpct, preload, simple, wind, tremulant, enclosure, voicing, originalpitch, buses, groups and others | The defaults that an organ without its own settings starts with. | Save as default in Organ settings > Loading |
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 general setting, 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 voicing EQ, mixer routes, stops and perspectives left out, 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 in Organ settings > Loading. If the chosen folder cannot be created, the usual folder is used and Run the checks reports it.
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 this organ playable without its installation files 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>, where <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 this organ playable without its installation files. 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 | File > Recorder…, Audio |
| MIDI performance | Standard MIDI file with notes, stops and shoes | File > Recorder…, Save MIDI… |
--record-audio, --record-midi | The same formats | The command line |
An existing file with the chosen name is replaced. 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 sends nothing over a network.
- The code contains no network access: no update check, no account, no analytics, no crash reporting. The build switches off JUCE’s web browser and network (
curl) features. - The Android app declares no internet permission. Its permissions are 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 asks for no network access at run time.
- 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. |
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 general settings, favourites and libraries reset; the first-run wizard returns. |
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 Settings > General settings > Log.
| 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. |
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 in Organ settings > Loading > Cache folder 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) 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…. |
| 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 Cancel and a stop at the memory limit. Reload the organ with Load the organ again to apply 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 > General 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 General settings > MIDI and check the manual’s channel. 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 Settings > Licence confirmed for this organ 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 General 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 General settings > Audio. The line Key to speaker: about N 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 | Lower Polyphony limit in Organ settings > Loading. 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 (General settings > Room) is the most expensive stage of the audio callback. Switch it off, or choose No DSP in the top bar. |
| 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 release tails from disk in Organ settings > Loading. Switch it off, 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 16-bit samples and 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 in Organ settings > Stops and perspectives. |
| Dimmed | Not loaded: chosen in Organ settings, Stops | The stop was left out of the load, by itself, with its perspective, or by Load only the stops drawn. Tick it in Organ settings > Stops and perspectives and load the organ again. |
Other causes:
- A perspective left out takes every rank recorded from that position. Check the perspectives list.
- 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 in Organ settings > Loading, and in the sample libraries it knows. 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 in Organ settings > Loading (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 not a RAR ... archive that Masterpiece can read | The file is not a RAR archive, or is 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. |
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.
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, Saving the samples for the next load, Preparing to play, Building the console) and, for samples, the count and the time left. Cancel stops the load. During Saving the samples for the next load the button reads Skip saving 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, 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, mono, rate, releases, streaming, 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 release tails from disk skips reading the tails, which were 56% of the sample data on the measured set (see PERFORMANCE.md). |
| Memory profile | Recommended - 16-bit, stream releases and Smallest - 16-bit mono, stream releases shorten loads. |
| Cache write after loading | Save the sample cache set to In silence, while it plays opens the organ first. |
Tap the progress by ear with Tap at each 10% while loading an organ in Organ settings > Loading.
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). Two dialogs follow.
- Not enough memory for this organ: nothing loaded. The console shows silent so that Organ settings can be opened from the Settings 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).
Remedies, in the order of their effect:
- Stream release tails from disk (needs an SSD).
- Resident format: 16-bit.
- 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 or stops in Organ settings > Stops and perspectives. 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) only when the computer has the memory to spare.
Settings take effect at the next load; Load the organ again 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 General 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 (in Organ settings > Loading) 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 cannot be read directly.
.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, 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 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 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 does not store the organ, the stops drawn or any plugin state.
- The Settings menu does not open the settings windows in a plugin.
- 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-14). - 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.14 | the definition loader (mp_core) | MP_FETCH_PUGIXML, MP_PUGIXML_TAG |
| libarchive | tag v3.8.1 | 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 |
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.
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.
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, AU, LV2 and a standalone wrapper. |
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. |
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 LV2 Standalone; JUCE builds the ones the platform supports. 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 and setStateInformation are empty; the organ and its 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 |
lib/vst3/Masterpiece.vst3, lib/lv2/Masterpiece.lv2 | The plugins, where the build made them |
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 and, where built, AU/Masterpiece.component and VST3/Masterpiece.vst3 into one folder and zips it with ditto, which keeps the bundle’s executable bit. The macOS build is unsigned.
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.
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 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) |
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) |
mp_control | src/mp_control | none | SwitchNetwork, key flow (Control), CombinationSystem, PlayerCombinations, StageSwitchBank, WindSolver, MidiMap, MidiDeviceMap, LcdPanel, Registration |
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, split keyboard host, translations |
mp_ui | src/mp_ui | yes | The console, settings windows, panels, loading dialog, mobile layout |
mp_core, mp_archive, mp_sampler, mp_control and mp_split 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 (and VoicingEq.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.
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, and JUCE’s loader for the impulse response |
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 thread count is the usable cores minus one (the cores the process may run on, found with sched_getaffinity on Linux), at most 8. 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.
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 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, not inrender. - 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 three resident formats (float, 16-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), int16_t with a per-file scale folded into the voice gain, or float. renderVoiceFrom<T> is instantiated per type so the inner loop never tests which one it reads.
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 and setStateInformation are empty, so 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.
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 second, 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/fixtures/ | Synthetic organ definitions |
tests/CMakeLists.txt links mp_core, mp_control, mp_archive and mp_split always, and adds mp_sampler, mp_dsp and mp_audio when those targets exist. For each of the three it defines a macro that the test code uses to guard what needs it:
| 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 |
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. 212 tests (210 named functional.*, 2 named probe.*) across the areas control, voice, midi, odf, archive, samples, split, ui, settings, fixtures, dsp, codm, audio, loader, i18n and others |
Perf | perf.* | Six benchmarks: ODF scan throughput, voice polyphony (single-threaded, threaded, compact storage, vector units) 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 |
The binary has no option to pick a single test by name. It prints [PASS] name or [FAIL] name with the message on the next line for each test, then N run, M failed, and exits with 1 when any test failed. Any other exception fails the test with unexpected exception: ....
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 preset ci-functional builds Debug with AddressSanitizer, UndefinedBehaviorSanitizer and gcov coverage; ci-perf builds Release for MpPerf. See Building from source.
Fixtures
All fixtures are synthetic organ definitions in tests/fixtures/, written for this project:
| File | Purpose |
|---|---|
minimal.Organ_Hauptwerk_xml | The smallest full definition that loads |
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
Three tests keep the language files in step with the code (functional.i18n.*). language-files requires that Spanish, German, Dutch, Polish, Czech, French and Italian are present and that every language file reads, has a language: line and a countries: line, has no byte order mark, contains every string of resources/translations/strings.txt with a non-empty translation and the same placeholders, and contains no string the template lacks. template-covers-sources requires that every TRANS("...") string in src/mp_ui/*.cpp, src/mp_ui/*.h and apps/MasterpieceApp/Main.cpp is in strings.txt; fix it with python tools/i18n.py --write. choose-language checks that choosing a language changes what TRANS() returns.
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-14 | ci-macos | Apple silicon app, deployment target 11.0 |
macos-14 | ci-macos with -DCMAKE_OSX_ARCHITECTURES=x86_64 | Intel app, deployment target 10.15; its tests and launch run under Rosetta |
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 (saved from
mainonly). - Install dependencies; for ARM rows, run
cmake/ci-arm-multiarch.sh. - 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).
Separate jobs in the same workflow:
| Job | Runner | Content |
|---|---|---|
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-14 | 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. No workflow builds the ci-functional or ci-perf presets.
Adding a test
- Choose the file. Put a test for a JUCE-free module in
test_core.cpportest_split.cpp, or add a new.cpptoadd_executable(mp_tests ...)intests/CMakeLists.txt. A new file needs#include "MpTest.h"and the module headers by their path undersrc(for examplemp_control/MidiMap.h). - 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 --no-perfand 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, full organ | 21.6 GB | 2.3 GB | 9.3x less |
| Sample memory, stereo kept | 21.6 GB | 4.7 GB | 4.6x less |
| Sample memory, bit-exact 24-bit | 21.6 GB | 16.2 GB | 1.3x less |
| Time to open the organ | 77.1 s | 25.9 s | 3.0x faster |
| Sample loading, from the cache | 13.0 s | 2.6 s | 5.0x 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.
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.
Techniques
The settings are on the Loading tab of Organ settings.
| Technique | Setting | What it does |
|---|---|---|
| Release streaming | Stream release tails 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: 24-bit - what the samples are | 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. The 32-bit float baseline widens every 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. |
| 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 Memory profile list sets several of these at once: Best quality - 24-bit, hold everything, Recommended - 16-bit, stream releases and Smallest - 16-bit mono, stream releases.
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 |
| 16-bit, streamed | 4,650.7 MB | 5,927.9 MB | 16,955.8 MB | 4.6x |
| 16-bit mono, streamed | 2,325.3 MB | 2,964.0 MB | 19,281.2 MB | 9.3x |
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 |
| 24-bit to 16-bit (streamed) | 6,976.0 MB | 4,650.7 MB | 0.667 |
| Stereo to mono | 4,650.7 MB | 2,325.3 MB | 0.500 |
The exact ratios confirm 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 |
| 16-bit, streamed | 5,939 MB | 5,927 MB | −12 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 |
| 16-bit, streamed | 28.0 s | 2.8x |
| 16-bit mono, streamed | 25.9 s | 3.0x |
Holding less also opens faster: a streaming load reads no release tails, and they are more than half the data on disk.
Sample cache
| 16-bit mono, streamed | Decoded from WAV | Read from cache | Speed-up |
|---|---|---|---|
| Sample loading | 13.0 s | 2.6 s | 5.0x |
| Whole organ | 25.9 s | 18.9 s | 1.4x |
The cache file is 2,439 MB and stands in for about 7 GB of source files.
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 16-bit cache is reused at 16-bit, and rebuilt at 24-bit and at 16-bit mono to exactly the expected sizes (291.8, 437.7 and 146.0 MB).
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/MasterpieceSettings > General settings > Log shows the current log in the program.
-
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, Linux arm64 and macOS (Apple silicon and Intel), and builds the 32-bit Raspberry Pi target, the Flatpak, iOS and Android. - 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 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, or with the UnRAR library by RARLAB under its own licence.
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:
- Copy
resources/translations/strings.txt, the list of every string in English, 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 in Settings > General settings > Language.
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 | Rewrites strings.txt from the TRANS("...") strings in src/ and apps/; run it after you add or change a string in the code |
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 run --write; the test functional.i18n.template-covers-sources fails when strings.txt is out of date. 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::split,mp::dsp,mp::simd,mp::codmandmp::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_controlandmp_splitfree 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 |