Sandbox Mode
Build 4410 and later
Sandbox mode lets you run Cantabile with all of its files (settings, songs, racks, set lists, plugins and so on) kept together in a single folder of your choosing, called the root folder.
Sandbox mode was built mainly for Cantabile's own automated testing, where every test needs to start from a clean, known setup that doesn't touch real settings. Because it's useful in its own right, it's available to everyone, and you might find it handy if you want to:
- keep a completely separate setup for a particular band, project or experiment,
- try things out without disturbing your normal setup, or
- keep a self-contained Cantabile environment in one folder that's easy to back up, copy or move.
Please keep its origins in mind though. Sandbox mode isn't a security feature, it doesn't stop plugins or anything else from reading or writing files outside the root folder, and a few things are still shared with your normal installation of Cantabile (see below). If all you need is a second set of settings, the simpler Multiple Configurations feature may be all you need.
Starting Cantabile in Sandbox Mode
Sandbox mode is turned on with the --root command line option, giving it the full path to the folder you want
to use:
Cantabile.exe --root:"C:\Sandboxes\Band A"
If the folder doesn't exist, Cantabile creates it. Always use a full path (starting with a drive letter): a relative path is taken relative to whatever folder Cantabile happens to be started from. Put the path in quotes if it contains spaces.
The easiest way to use sandbox mode is with a desktop shortcut:
- Right click on the Windows Desktop and choose New → Shortcut
- Click the Browse button and locate Cantabile.exe, usually at
C:\Program Files\Topten Software\Cantabile 4\Cantabile.exe -
After the path to Cantabile.exe, add the root folder option, for example:
"C:\Program Files\Topten Software\Cantabile 4\Cantabile.exe" --root:"C:\Sandboxes\Band A" /config:"BandA"(The
/configpart is explained below. It's optional, but recommended.) -
Click Next, give the shortcut a name and click Finish.
Sandbox mode stays on for the whole session: if Cantabile restarts itself (for example after changing an option that needs a restart), it restarts in the same root folder with the same configuration.
--root can't be combined with the --settingsFolder option (see Settings Folder). If you try,
Cantabile reports an error and doesn't start.
The first time you start Cantabile with a new root folder it behaves just like a brand new installation: you'll see the first-run Options dialog, and you'll be asked to select which of your licenses to use (see What's Shared below).
How to Tell You're in Sandbox Mode
When Cantabile is running in sandbox mode, the root folder is shown in:
- the title bar, in square brackets after the configuration name, eg:
Cantabile ... (BandA) [C:\Sandboxes\Band A] - the Load & Info side panel, as
Root: <folder>on the last line - the About page in Options, as
Root: <folder> - the log file, as a
Sandbox root: <folder>line near the start
None of these appear when Cantabile is running normally.
What's in the Root Folder
All of Cantabile's own files go in the root folder, which is laid out like this:
- Settings
- The settings folder:
settings.json, the plugin lists (plugins.json,plugins.cache.json,plugins.user.json),log.txt, crash reports and, by default, the global pre- and post-racks. When you're using a configuration name, this folder is calledSettings (<config name>)instead, so one root folder can hold several configurations side by side. - Files
- Takes the place of the
Documents\Cantabilefolder. It's the default folder for songs and set lists, and holds theRacks,Templates,ResourcesandRecordingsfolders. - Plugins
- The default plugin folder. VST2 and VST3 plugins can be placed here together, in sub-folders if you like.
- VST3 Presets
- Factory presets for VST3 plugins, organized as
VST3 Presets\<vendor>\<plugin>(the same layout as the normal WindowsVST3 Presetsfolders).
The Files, Plugins and VST3 Presets folders are created the first time each configuration is run in the root.
Cantabile never deletes or replaces anything that's already there.
The quickest way to get to the settings folder is Tools → Open Settings Folder (or the "Open Settings Folder" button on the Diagnostics page in Options), which in sandbox mode opens the root's settings folder.
A few folder settings don't have a default in sandbox mode and start out empty: the media files folder, the presets and banks folder, the offline render folder and the network server's asset folder. Set these in Options if you use them.
Paths inside the root
When Cantabile saves a song, rack, set list or its settings while in sandbox mode, any file path that's inside the
root folder is saved relative to the root (it appears as $(Root)\... if you look inside the file). This means a
root folder can be moved or copied somewhere else, even to another machine, and everything inside it keeps working.
Paths to files outside the root are saved as normal.
What's Kept Separate, and What's Shared
Kept separate in each root (and each configuration)
- All global settings: audio driver and device settings, audio and MIDI port mappings, plugin folders and scan results, recent files, window layout, theme, language, network server settings, update settings and file locations.
- Songs, set lists, racks, templates, resources and recordings (in the
Filesfolder). - The plugins in the root's
Pluginsfolder and the presets in itsVST3 Presetsfolder. - The log file and crash reports.
What's shared with your normal installation
- The Cantabile installation itself. All root folders and your normal setup run the same copy of Cantabile.exe (with the same built-in themes and translations). If you install an update from a sandbox, you're updating the one installation used by everything.
- Licenses. Your Cantabile account and the licenses installed on the machine are shared, but which license to use is a setting, so each new root folder (and each new configuration in a root) asks you to select a license the first time it's run. Just pick one of the licenses already on the machine: you don't need to log in or activate again.
- Audio and MIDI hardware. Devices are physical and shared by everything on the machine. Many audio drivers (ASIO in particular) can only be used by one program at a time.
- Plugins' own files. Sample libraries, plugin settings and presets that a plugin saves itself, plugin licenses and copy protection all stay wherever the plugin normally keeps them. Plugins can read and write files anywhere, sandbox mode or not.
- The network server port. Every configuration uses the same default port. If you run a sandbox alongside another copy of Cantabile with the network server turned on in both, change the port in one of them.
- File associations. Windows only allows one set of file associations (see below).
- Variables like
$(MyDocuments)and$(AppData)still refer to your real Windows folders.
Sandbox Mode and Configuration Names
Important: the configuration name is not private to a root folder. It identifies a running copy of Cantabile within your Windows session, whether it's running in sandbox mode or not.
- Two root folders using the same configuration name can't run at the same time.
- A sandbox using the default configuration (no
/configoption) counts as the same instance as your normal Cantabile, so the two can't run at the same time either, in either order.- The same goes for a sandbox and a normal Cantabile that both use, say,
/config:Live.To run a sandbox side-by-side with your normal Cantabile, or two sandboxes side-by-side, give each one its own configuration name.
This is deliberate: it stops two copies of Cantabile with the same configuration from fighting over the same audio device.
If you try to start a second copy that clashes like this, Cantabile shows a message such as "Configuration 'BandA' is already running from 'C:\Sandboxes\Band A'" (or "The default configuration is already running from the standard location") and doesn't start.
If you start Cantabile again with the same root and the same configuration (for example from a shortcut that opens a song), the song or set list is handed to the copy that's already running, just as in normal use.
Note that only the running instance is linked by the configuration name. The settings are not: each root (and your normal installation) has its own settings folder for each configuration name, so using the same name in two places doesn't share any settings between them.
A few more notes about configuration names:
- Always spell a configuration name exactly the same way, including upper and lower case.
/config:Liveand/config:liveuse the same settings folder, but aren't treated as the same configuration when checking whether Cantabile is already running, so both could start at once and share one set of settings files. - Older versions of Cantabile aren't detected. A copy of an earlier Cantabile release that's already running isn't recognized, so a sandbox with a matching configuration name can still start alongside it. They won't share settings, but they may both try to use the same audio device.
Limitations and Restrictions
- File dialogs stay in the root. Cantabile's own Open, Save and folder dialogs start inside the root folder. You can browse elsewhere, but choosing a file or folder outside the root shows "Please choose a location inside ..." and the dialog stays open. This keeps a sandbox from accidentally picking up files from your normal setup. You can still type a path outside the root in the File Locations page in Options, or add one with "Enter Folder..." or "Paste" when adding plugin folders, if you really need to.
- Standard plugin folders aren't scanned. In sandbox mode the default plugin folder is the root's
Pluginsfolder. The machine's usual VST folders (eg:C:\Program Files\VstPlugins,C:\Program Files\Common Files\VST3) aren't used or offered, unless you add them yourself. - Standard VST3 preset folders aren't used. Only the root's
VST3 Presetsfolder is searched for VST3 factory presets. - Some plugins won't run from a copied location. Plugins that expect to be run from where their installer put
them may not work from the root's
Pluginsfolder. - One configuration name, one running copy, as described above.
- A license must be selected the first time each new root/configuration runs.
config.jsonis ignored. Aconfig.jsonfile next to Cantabile.exe that moves the settings folder (see Settings Folder) has no effect in sandbox mode.- File associations. Associating file types from a sandbox (Options → Misc → File Associations) makes double-clicked Cantabile files open in that sandbox, replacing your normal associations, because Windows only keeps one set. To get them back, associate again from your normal Cantabile.
- Settings are shared between Cantabile versions. Unlike the normal settings folder, the root's settings folder doesn't include the Cantabile version in its name, so different versions of Cantabile started with the same root and configuration use the same settings.
- Everything else works normally. Sandbox mode doesn't turn off update checks, crash reporting, the network server or anything else.
Moving an Existing Setup into a Sandbox
To copy your normal Cantabile setup into a new root folder (we'll use C:\Sandboxes\Band A as an example), make
sure Cantabile isn't running, then:
-
Songs, racks and other documents. Copy everything in
Documents\Cantabileinto the root'sFilesfolder (C:\Sandboxes\Band A\Files). Keep the folder structure the same: songs, set lists and racks find each other through their relative locations, so they'll keep working. -
Settings (optional). Either:
- start fresh: run Cantabile with the new root, then select your license, audio driver and ports and scan for plugins as you would on a new installation, or
- copy your existing settings folder: open it with Tools → Open Settings Folder in your normal
Cantabile, and copy its contents into the root's
Settingsfolder. If the sandbox will use a configuration name, copy intoSettings (<config name>)instead, eg:C:\Sandboxes\Band A\Settings (BandA). This brings over your audio setup, port mappings, window layout and license selection.
-
Fix up the folder settings (only if you copied the settings). The copied settings still point at your normal folders:
Documents\Cantabilefor songs and racks, the machine plugin folders, and so on. Cantabile will happily keep using those, but to make the sandbox self-contained open Options → File Locations and point each folder at its equivalent under the root'sFilesfolder, and update the plugin folders on the Plugins page. -
Plugins. Either leave the plugin folders pointing at your normal plugin folders (this works, but the sandbox won't be self-contained), or copy the plugins you need into the root's
Pluginsfolder and rescan. For large plugins you can create a directory junction in thePluginsfolder that points at the real plugin folder instead of copying it (no administrator rights needed), eg from a command prompt:mklink /J "C:\Sandboxes\Band A\Plugins\Big Synth" "C:\Program Files\Common Files\VST3\Big Synth"Because copied plugins are in a new location, expect Cantabile to rescan them. Remember that a junction still depends on the plugin being installed on the machine.
-
VST3 factory presets. If you use them, copy the
<vendor>\<plugin>folders you need from yourDocuments\VST3 Presets(or other VST3 Presets) folder into the root'sVST3 Presetsfolder.
Moving from a Sandbox Back to Normal
-
Songs, racks and other documents. Copy the contents of the root's
Filesfolder intoDocuments\Cantabile(or wherever you keep your Cantabile files), keeping the folder structure the same. -
Settings. We recommend keeping your normal settings rather than copying a sandbox's settings back. Settings saved in a sandbox store paths inside the root as
$(Root)\..., which normal Cantabile can't resolve, so file locations, plugin folders and recent files would all appear missing. If you do copy them, re-set the folders in Options → File Locations and on the Plugins page, then rescan your plugins. -
Plugins. If you copied plugins into the root's
Pluginsfolder, make sure they're installed (or copied) into your normal plugin folders and rescan.
Songs, racks and set lists saved in a sandbox open fine in normal Cantabile as long as they've been copied together
with the files they refer to, because Cantabile finds referenced files by their relative location first. If a
referenced file can't be found that way, it shows as missing (with a $(Root)\... path), and you'll need to
locate it again. Older versions of Cantabile also show $(Root)\... paths as missing files.
Moving or Copying a Root Folder
A root folder is self-contained, so to move it, or make a copy of it, just move or copy the whole folder and start
Cantabile with the new --root path. Use Windows Explorer (or a tool like robocopy) that keeps file dates, so that
Cantabile doesn't need to rescan your plugins.
If you move a root to a different machine, remember that its settings include your audio driver and MIDI port choices, so you may need to re-select them there (just as with a copied settings folder).
