Subsample configuration: library
The 4 settings under library, each with the type, default and limits its schema declares.
The playable sample library: where Subsample loads samples from, how much memory they may use, and where named references come from.
max_memory_mb in library
- Type
number- Limits
- above 0
Memory, in MB, for the samples held in the library. When a new sample would go over it, Subsample drops the oldest samples from memory, and a note that played one plays its next-best match instead; files on disk are never deleted. When absent, it is 60% of max_memory_mb.
directory in library
- Type
stringornull- Default
samples/captures
Directory of samples to load at start-up, including its subdirectories. Subsample recreates missing .analysis.json and .preview.png sidecars, analyses a sample again when its sidecar comes from an earlier release or its audio has changed, and deletes sidecars whose audio has gone. It loads WAV, FLAC, AIFF, OGG and MP3 files. null loads nothing in bulk, so every sample comes from the MIDI map's directory: and path: rules, and watch has nothing to watch. A programs: block in the MIDI map overrides it.
reference_directory in library
- Type
stringornull- Default
null
Directory of reference fingerprints that a MIDI map can name in where: { reference: ... }. null uses the General MIDI set that ships with Subsample, so a name such as GM46_OpenHiHat resolves on any machine. Set it to a directory of your own references, whose names then replace the built-in ones. A reference is the .analysis.json sidecar Subsample writes beside an audio file it analyses, named after that file without its extension, and a map may write the name in any case. A reference given as a path is not affected.
watch in library
- Type
boolean- Default
false
Loads audio files that appear in library.directory, or in each program's directory when the MIDI map declares programs:, while Subsample runs, without a restart, whatever wrote them: another Subsample, a DAW or a script. Subsample waits until a file stops growing, analyses it when it has no sidecar, and adds it to the library; a file that arrives with its sidecar, as another Subsample's captures do, is not analysed again, and plays within a second or two; one without a sidecar plays within about ten seconds. A file deleted or renamed away leaves the library too. Only the top level of the directory is watched, and the files read are WAV, FLAC, AIFF, OGG and MP3. A directory on a network drive is checked for new files every two seconds, so a file another machine writes there loads too. If the drive drops, the library stays as it was until it is back. Requires player.enabled, and library.directory unless the map declares programs:.