💡 Check your presets right now with DSLint: dslint.fly.dev
Making virtual instruments for DecentSampler eventually means some tedious editing of the XML-based .dspreset files by hand...
However, if you use a text editor that supports XML schemas, you can super-charge your editing experience:
Press this button on the GitHub page to create a new codespace:
You will receive a VS Code editor inside your browser. If you use Firefox and open local files, you might need to save the files to the codespace before the schema autocompletion kicks in.
Install Red Hat's XML editing extension.
Paste the following contents in a new text file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://raw.githubusercontent.com/praashie/DecentSampler-schema/main/DecentSampler.xsd" ?>
<DecentSampler >
<ui width="812" height="375">
</ui>
<groups>
<group>
</group>
</groups>
</DecentSampler>Place your cursor inside the <group> tag, and hit Ctrl+Space to trigger suggestions!
You can copy the <?xml-model ...?> line inside another .dspreset file to activate the schema.
This will also work with some online XML validation tools.
Open your settings.json (instructions here), and copy the following settings inside it:
{
"xml.fileAssociations": [
{
"pattern": "**/*.dspreset",
"systemId": "https://raw.githubusercontent.com/praashie/DecentSampler-schema/main/DecentSampler.xsd"
}
]
}An XML Schema Definition (XSD) is a standard way to describe the expected structure of an XML document.
engine-vocabulary.json lists the names the Decent Sampler engine actually accepts: binding levels,
types and parameters, seqMode values and note names. It's generated from the engine's source, so
don't edit it by hand:
tools/generate-engine-vocabulary.py ../DecentSampler # regenerate from a DecentSampler checkout
tools/check-xsd-vocabulary.py # fails if DecentSampler.xsd disagrees with it
The Decent Samples store's upload validator reads a copy of it, so the store and Decent Sampler's own
Validate Preset check presets against the same names. Regenerate it, and copy it to the store
(store/resources/decentsampler/engine-vocabulary.json), whenever the engine gains a binding
parameter, type, level or seqMode value.
Thanks to David Hilowitz for his exciting DecentSampler project. This schema has been mostly based on the DecentSampler file format documentation: https://www.decentsamples.com/docs/format-documentation.html
This schema was kickstarted and edited with the VS Code extension XML by Red Hat. Impressive XSD-based code completion features are the main inspiration for developing this schema in the first place.



