💡 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.
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.



