Browse Source

Add syntax languages to Presets.

master
Andrew Belt 3 years ago
parent
commit
3392cc2776
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      Presets.md

+ 3
- 3
Presets.md View File

@@ -6,14 +6,14 @@ Factory module presets are a great tool for teaching and inspiring users of your
They store parameter values, as well as internal data from your `Module::dataToJson()` method if overridden. They store parameter values, as well as internal data from your `Module::dataToJson()` method if overridden.


To include a factory module preset in your module, save a module preset file (`.vcvm`) to To include a factory module preset in your module, save a module preset file (`.vcvm`) to
```
```txt
<your plugin's root dir>/presets/<module slug>/<preset name>.vcvm <your plugin's root dir>/presets/<module slug>/<preset name>.vcvm
``` ```


Module presets are sorted alphabetically by filename. Module presets are sorted alphabetically by filename.
However, (since Rack 2) if a filename begins with numerical digits followed by `_` (regex `/^\d+_/`), that prefix is not displayed to the user, so you can apply your own custom preset sorting order. However, (since Rack 2) if a filename begins with numerical digits followed by `_` (regex `/^\d+_/`), that prefix is not displayed to the user, so you can apply your own custom preset sorting order.
For example, the above screenshot uses the following preset filenames. For example, the above screenshot uses the following preset filenames.
```
```txt
/presets/DrumMachine/00_House.vcvm /presets/DrumMachine/00_House.vcvm
/presets/DrumMachine/01_House 2.vcvm /presets/DrumMachine/01_House 2.vcvm
/presets/DrumMachine/02_Techno.vcvm /presets/DrumMachine/02_Techno.vcvm
@@ -24,7 +24,7 @@ For example, the above screenshot uses the following preset filenames.


Presets can be edited with a text editor to update only a subset of parameters. Presets can be edited with a text editor to update only a subset of parameters.
For example, to change parameters #0 and #2 but leave #1 unchanged, remove the `"param"` object with `id` 1. For example, to change parameters #0 and #2 but leave #1 unchanged, remove the `"param"` object with `id` 1.
```
```json
"params": [ "params": [
{ {
"id": 0, "id": 0,


Loading…
Cancel
Save