Search guides and the APICtrl K
  1. API reference
  2. Plugin model

preset_file.h

Presets as FILES, in the format the rest of the world uses.

#include <sonore/preset_file.h>
On this page

Design notes

A plugin's factory presets live inside it, and the hosting API can already list and load them. That is not where most presets are. People have folders of .vstpreset files: bought, downloaded, swapped, saved from another host years ago. A host that cannot open one is a host that starts empty however much the user already owns.

The container is documented and small. A header naming the plugin, one or more chunks, and a list at the end saying where each chunk is:

"VST3" | version | class id, 32 hex chars | int64 offset of the list
...chunk data...
"List" | int32 count | entries of { id[4], int64 offset, int64 size }

Everything is little-endian, which is worth stating because the format is Steinberg's and AIFF-style big-endian would be the other reasonable guess.

The chunk that matters is "Comp", the component state: the same bytes getState() hands over. "Cont" is the controller's own copy and "Info" is an XML blurb; both are optional, and this writes Comp only. A preset that carries a controller chunk is read and its Comp used, because the component state is what actually decides the sound.

Types 1

What came out of a .vstpreset: which plugin it is for, and its state.

Functions 6

Constants 1

↑↓ to move↵ to openEvery public name in the headers, and every guide