@gorilla-engine-sdk/create-gorilla-engine-plugin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +64 -0
- package/README.md +103 -0
- package/generator-gorilla-engine-plugin/app/index.js +338 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/SKILL.md +295 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/effects-filters.md +186 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/indexing.md +129 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/instrument-files.md +547 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/key-rules.md +81 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/modulation.md +210 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-control.md +217 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-bus-effects.md +663 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-core.md +145 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-misc.md +59 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-modulation.md +85 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-voice-effects.md +407 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/note-events.md +278 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/properties.md +230 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/script-patterns.md +494 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/time-tempo.md +209 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/SKILL.md +104 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/advanced-controls.md +194 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/base-props.md +167 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/basic-controls.md +230 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/bindings.md +183 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/composite-components.md +258 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/containers.md +149 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/editors.md +191 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/event-handlers.md +150 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/getting-started.md +143 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/gorilla-engine-api.md +147 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/instrument-api.md +250 -0
- package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/visualization.md +209 -0
- package/generator-gorilla-engine-plugin/app/templates/.prettierignore +13 -0
- package/generator-gorilla-engine-plugin/app/templates/.vscode/settings.json +14 -0
- package/generator-gorilla-engine-plugin/app/templates/.vscode_input/launch.json +89 -0
- package/generator-gorilla-engine-plugin/app/templates/README.md +36 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/OFL.txt +93 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Bold.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Medium.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Regular.otf +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Init.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Three Quarters.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary Bipolar.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary-Bipolar@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part1.blob +0 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part2.blob +1 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.inst +157 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.txt +184 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/Root.tsx +35 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/ErrorBoundary.tsx +138 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/UserInterface.tsx +338 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/pluginConfig.ts +4 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/dialogsCustomStyle.ts +98 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/index.tsx +217 -0
- package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/presetBrowserCustomStyle.ts +124 -0
- package/generator-gorilla-engine-plugin/app/templates/build.ugep +173 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/01 - All The Way Down.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/02 - About Half.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/03 - Three Quarters.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/04 - All The Way Up.preset +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary@2x.png +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part1.blob +0 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part2.blob +1 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.inst +73 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.txt +21 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/Root.tsx +35 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/ErrorBoundary.tsx +114 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/UserInterface.tsx +85 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/app/pluginConfig.ts +4 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/dialogsCustomStyle.ts +101 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/index.tsx +214 -0
- package/generator-gorilla-engine-plugin/app/templates/effect/src/presetBrowserCustomStyle.ts +124 -0
- package/generator-gorilla-engine-plugin/app/templates/gitignore +9 -0
- package/generator-gorilla-engine-plugin/app/templates/licence.txt +0 -0
- package/generator-gorilla-engine-plugin/app/templates/package.json +38 -0
- package/generator-gorilla-engine-plugin/app/templates/prettierrc +9 -0
- package/generator-gorilla-engine-plugin/app/templates/tsconfig.json +20 -0
- package/generator-gorilla-engine-plugin/package.json +17 -0
- package/index.js +72 -0
- package/package.json +42 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
# Instrument files
|
|
2
|
+
|
|
3
|
+
## General knowledge
|
|
4
|
+
- `.inst` files are JSON and are loaded and handled by the Gorilla Editor.
|
|
5
|
+
- When saving an instrument, it will copy the currently loaded instrument script into the instrument file.
|
|
6
|
+
- The script's content will only be applied if the script is reloaded in the editor.
|
|
7
|
+
- The instrument file controls the order of selected voice and effect modules.
|
|
8
|
+
- A module will initially be added to an inst file without further information about the parameter values and load with default values. Only when a user tweaks values in the editor and saves the new state, the new parameter values will appear in the inst file.
|
|
9
|
+
- Boolean-style parameters use the strings `"On"` and `"Off"`, not `true`/`false`.
|
|
10
|
+
- All float parameter values in the file are normalised floats in the range `0.0` to `1.0` unless otherwise noted. Scripts use a 0–1,000,000 integer scale when calling `set_module_param()`.
|
|
11
|
+
- Only include a parameter key in the JSON if the value differs from the module default.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Top-level structure
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"Module": "Instrument",
|
|
20
|
+
"Name": "My Instrument",
|
|
21
|
+
"Pitch Bend Range": 2,
|
|
22
|
+
"Version": "2.0.4",
|
|
23
|
+
"Volume": 0.630957,
|
|
24
|
+
"Glide": "On",
|
|
25
|
+
"Blob Path": null,
|
|
26
|
+
"Script Defines": null,
|
|
27
|
+
"Editor Data": null,
|
|
28
|
+
"Groups": [ ... ],
|
|
29
|
+
"Mappings": [ ... ],
|
|
30
|
+
"Voice Groups":[ ... ],
|
|
31
|
+
"FX Busses": [ ... ],
|
|
32
|
+
"MIDI Files": [ ... ],
|
|
33
|
+
"Data Files": [ ... ],
|
|
34
|
+
"Scripts": [ ... ]
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Top-level keys:**
|
|
39
|
+
|
|
40
|
+
| Key | Type | Notes |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `Module` | string | Always `"Instrument"` |
|
|
43
|
+
| `Name` | string\|null | Instrument display name |
|
|
44
|
+
| `Pitch Bend Range` | integer | Semitones, e.g. `2` or `48` for MPE |
|
|
45
|
+
| `Version` | string | Engine version, e.g. `"2.0.4"` |
|
|
46
|
+
| `Volume` | float | Master volume (0–1, default ~0.63) |
|
|
47
|
+
| `Glide` | string | `"On"` / `"Off"` |
|
|
48
|
+
| `Blob Path` | string\|null | Path to `.blob` file for compiled output, or `null` |
|
|
49
|
+
| `Script Defines` | null | Reserved, always `null` |
|
|
50
|
+
| `Editor Data` | null | Set by editor, leave as `null` |
|
|
51
|
+
| `Overview Size` | integer | Optional, used for slice editors |
|
|
52
|
+
|
|
53
|
+
`Mappings` and `FX Busses` are optional and can be omitted entirely if not needed.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Groups
|
|
58
|
+
|
|
59
|
+
Groups are the core polyphonic voice containers. Every note played triggers all active groups unless controlled by the script.
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
"Groups": [
|
|
63
|
+
{
|
|
64
|
+
"Module": "Group",
|
|
65
|
+
"Name": "My Group",
|
|
66
|
+
"Volume": 0.8,
|
|
67
|
+
"Output": -1,
|
|
68
|
+
"Quality": "Vintage",
|
|
69
|
+
"Alternate Mapping": 1,
|
|
70
|
+
"De-glitch Start": "On",
|
|
71
|
+
"ModSources": [ ... ],
|
|
72
|
+
"ModRoutings": [ ... ],
|
|
73
|
+
"Filters": [ ... ],
|
|
74
|
+
"Zones": [ ... ]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Group keys:**
|
|
80
|
+
|
|
81
|
+
| Key | Type | Notes |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `Module` | string | Always `"Group"` |
|
|
84
|
+
| `Name` | string\|null | Optional label |
|
|
85
|
+
| `Volume` | float | Group volume (0–1) |
|
|
86
|
+
| `Output` | integer | Omit = instrument output; `-1` = Bus 1; `-2` = Bus 2 |
|
|
87
|
+
| `Quality` | string | E.g. `"Vintage"` for vintage resampling |
|
|
88
|
+
| `Alternate Mapping` | integer | 1-based index of the first `Mapping` to use for round-robins/alternate samples |
|
|
89
|
+
| `De-glitch Start` | string | `"On"` – smooths sample start clicks |
|
|
90
|
+
|
|
91
|
+
In scripts, groups are indexed `M_GROUP+0`, `M_GROUP+1`, … (0-based).
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## ModSources
|
|
96
|
+
|
|
97
|
+
Each group has an array of mod sources. These define envelopes and LFOs that drive modulation. In scripts they are indexed `M_MOD_SRC+1`, `M_MOD_SRC+2`, … (1-based).
|
|
98
|
+
|
|
99
|
+
### ADSR Envelope — `ModSourceADSR`
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"Module": "ModSourceADSR",
|
|
104
|
+
"Name": "Amp Env",
|
|
105
|
+
"Attack": 0.0,
|
|
106
|
+
"Decay": 0.49,
|
|
107
|
+
"Hold": 0.0,
|
|
108
|
+
"Sustain": 1.0,
|
|
109
|
+
"Release": 0.23,
|
|
110
|
+
"Decay Curve": 90.0,
|
|
111
|
+
"ModRoutings": [ ... ]
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
All time/level values are normalised floats (0–1). `Decay Curve` is a shape value (0–100). `ModRoutings` inside an ADSR target ADSR parameters with `"Dest"` = `"Attack"`, `"Decay"`, `"Sustain"`, or `"Release"`.
|
|
116
|
+
|
|
117
|
+
### LFO — `ModSourceLFO`
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"Module": "ModSourceLFO",
|
|
122
|
+
"Name": "LFO",
|
|
123
|
+
"Wave": "Triangle",
|
|
124
|
+
"Rate": 0.7,
|
|
125
|
+
"Retrigger": "Off",
|
|
126
|
+
"ModRoutings": [ ... ]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`Wave` options: `"Sine"`, `"Triangle"`, `"Saw"`, `"Square"`. `Rate` is normalised (0–1). `Retrigger` `"Off"` means free-running. `ModRoutings` inside an LFO typically target its own depth/rate via `"Dest"` = `"Rate"` or a CC input.
|
|
131
|
+
|
|
132
|
+
### Custom Mod Source — `ModSourceCustom`
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"Module": "ModSourceCustom",
|
|
137
|
+
"Name": "Glide Curve",
|
|
138
|
+
"Curve": [ 1.0, 0.0, 0.0, 1.0, ... ],
|
|
139
|
+
"ModRoutings": [ ... ]
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`Curve` is a 54-element float array defining the custom envelope shape. Used for complex envelope shapes like glide curves.
|
|
144
|
+
|
|
145
|
+
> **Warning:** The internal format of the 54-element `Curve` array is not fully documented. Whether it stores (value, position) pairs, bezier handle triplets, or plain sample values is unknown. **Do not attempt to generate this array from scratch.** If you need a custom curve, omit the `"Curve"` key and let the editor set the default, or ask the user to supply a reference `.inst` file containing a saved curve.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## ModRoutings
|
|
150
|
+
|
|
151
|
+
ModRoutings appear at three levels:
|
|
152
|
+
1. **Group-level** – routes a source to a group parameter (volume, tune, pan)
|
|
153
|
+
2. **Inside a ModSource** – modulates a property of that mod source (ADSR attack from velocity, LFO rate from CC)
|
|
154
|
+
3. **Inside a Filter** – modulates a filter/oscillator parameter
|
|
155
|
+
|
|
156
|
+
In scripts, group-level routings are indexed `M_MOD+1`, `M_MOD+2`, … (1-based). The first routing that has no `"Source"` key is the amp envelope routing (implicit source = first ModSourceADSR).
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"Module": "ModRouting",
|
|
161
|
+
"Active": "Off",
|
|
162
|
+
"Source": "Velocity",
|
|
163
|
+
"CC": 74,
|
|
164
|
+
"Invert": "On",
|
|
165
|
+
"Depth": 0.9,
|
|
166
|
+
"Smooth": 0.26,
|
|
167
|
+
"Dest": "Tune",
|
|
168
|
+
"Custom Dest": 1,
|
|
169
|
+
"Curve Active": "On",
|
|
170
|
+
"Curve": [ 0.0, 0.004, ... ],
|
|
171
|
+
"Use MIDI Channel": "On",
|
|
172
|
+
"Freeze In Release": "On"
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
> **Note:** The example above shows all optional keys. In practice, most routings only need `"Source"`, `"Depth"`, and `"Dest"`. The `"Curve"` key (128-element float array) and `"Custom Dest"` are advanced features — do not include them unless you have a concrete reference value.
|
|
177
|
+
|
|
178
|
+
**ModRouting keys:**
|
|
179
|
+
|
|
180
|
+
| Key | Type | Notes |
|
|
181
|
+
|---|---|---|
|
|
182
|
+
| `Active` | string | `"Off"` to disable; omit for enabled (default) |
|
|
183
|
+
| `Source` | string | See source table below; omit = first ModSourceADSR |
|
|
184
|
+
| `CC` | integer | MIDI CC number (0–127), required when `Source` is `"MIDI CC"` |
|
|
185
|
+
| `Depth` | float | Modulation amount (0–1); negative values treated as inverted in some contexts |
|
|
186
|
+
| `Invert` | string | `"On"` = inverts the source signal |
|
|
187
|
+
| `Smooth` | float | Smoothing amount (0–1) |
|
|
188
|
+
| `Dest` | string | See destination table below; omit = Volume |
|
|
189
|
+
| `Custom Dest` | integer | Used when `Dest` is `"Custom"`, selects the custom parameter index |
|
|
190
|
+
| `Curve Active` | string | `"On"` = use the 128-point curve array |
|
|
191
|
+
| `Curve` | float array | 128-element normalised float array for non-linear mapping |
|
|
192
|
+
| `Use MIDI Channel` | string | `"On"` = per-channel (MPE) mode |
|
|
193
|
+
| `Freeze In Release` | string | `"On"` = hold value when note is released |
|
|
194
|
+
| `Steps` | float array | For step-based LFO shapes in EffectMods |
|
|
195
|
+
|
|
196
|
+
**Source values:**
|
|
197
|
+
|
|
198
|
+
| Value | Meaning |
|
|
199
|
+
|---|---|
|
|
200
|
+
| *(omitted)* | First ModSourceADSR in the group |
|
|
201
|
+
| `"Velocity"` | Note velocity |
|
|
202
|
+
| `"Key"` | MIDI key number |
|
|
203
|
+
| `"Pitch Bend"` | Pitch bend wheel |
|
|
204
|
+
| `"Aftertouch"` | Channel aftertouch |
|
|
205
|
+
| `"MIDI CC"` | A specific CC (set `"CC"` key) |
|
|
206
|
+
| `"Constant"` | Fixed value (for mod matrix targets) |
|
|
207
|
+
| `"Random"` | Random per note |
|
|
208
|
+
| `"Random +"` | Random per note, positive only |
|
|
209
|
+
| `"Glide"` | Glide amount |
|
|
210
|
+
| `"Mod 2"` … `"Mod 4"` | Named ModSource by index (2nd, 3rd, 4th in the group's `ModSources` array) |
|
|
211
|
+
| `"Event Param 0"` | `EVENT_PARAM_0` value set in script |
|
|
212
|
+
|
|
213
|
+
**Destination values (group-level routings):**
|
|
214
|
+
|
|
215
|
+
| Value | Meaning |
|
|
216
|
+
|---|---|
|
|
217
|
+
| *(omitted)* | Volume (amplitude) |
|
|
218
|
+
| `"Tune"` | Pitch / tuning |
|
|
219
|
+
| `"Pan"` | Stereo panning |
|
|
220
|
+
| `"Custom"` | Custom destination index (set `Custom Dest`) |
|
|
221
|
+
|
|
222
|
+
**Destination values (inside ModSource routings):**
|
|
223
|
+
|
|
224
|
+
| Value | Meaning |
|
|
225
|
+
|---|---|
|
|
226
|
+
| `"Attack"`, `"Decay"`, `"Sustain"`, `"Release"` | ADSR stage parameters |
|
|
227
|
+
| `"Time 1"` | Custom curve time parameter |
|
|
228
|
+
| `"Rate"` | LFO rate |
|
|
229
|
+
| `"Sub"`, `"Dest"` | Filter-specific targets |
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Filters (voice modules)
|
|
234
|
+
|
|
235
|
+
`"Filters"` is the array of per-voice DSP modules inside a group: oscillators, filters, utilities. They run in series in the order listed. In scripts they are indexed `M_FILTER+1`, `M_FILTER+2`, … (1-based).
|
|
236
|
+
|
|
237
|
+
Each filter module can have its own `"ModRoutings"` array to modulate its parameters from mod sources.
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
"Filters": [
|
|
241
|
+
{
|
|
242
|
+
"Module": "FilterAnalogOsc"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"Module": "FilterLP12",
|
|
246
|
+
"ModRoutings": [
|
|
247
|
+
{
|
|
248
|
+
"Module": "ModRouting",
|
|
249
|
+
"Depth": 0.75
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"Module": "ModRouting",
|
|
253
|
+
"Source": "Key",
|
|
254
|
+
"Depth": 0.3
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"Cutoff": 0.5
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Common filter modules:**
|
|
263
|
+
|
|
264
|
+
| Module | Key params | Notes |
|
|
265
|
+
|---|---|---|
|
|
266
|
+
| `FilterAnalogOsc` | `Tune`, `Saw`, `Square`, `Sub` | Analog-style oscillator |
|
|
267
|
+
| `FilterSineOsc` | `Tune`, `Mix`, `Keytrack` | Sine wave oscillator; set `"Keytrack": "Off"` for fixed pitch |
|
|
268
|
+
| `FilterSuperOsc` | `Oscillators`, `Detune`, `Sub`, `Mix` | Unison super oscillator |
|
|
269
|
+
| `FilterLP6` | `Cutoff`, `Resonance` | 6 dB/oct low-pass |
|
|
270
|
+
| `FilterLP12` | `Cutoff`, `Resonance` | 12 dB/oct low-pass |
|
|
271
|
+
| `FilterLP24` | `Cutoff`, `Resonance` | 24 dB/oct low-pass |
|
|
272
|
+
| `FilterLadder` | `Cutoff`, `Resonance` | Moog-style ladder filter |
|
|
273
|
+
| `FilterStateVariable` | `Cutoff`, `Resonance` | State variable filter |
|
|
274
|
+
| `FilterEnvFollower` | `Attack`, `Release`, `Mode`, `Output CC` | Converts mod signal to MIDI CC; set `"Mode": "Mod Input"` and `"Output CC": <cc>` |
|
|
275
|
+
| `FilterDownmix` | `Smoothing`, `Ch1 L`, `Ch1 R`, `Ch2 L`, `Ch2 R` | Multi-channel mixer/crossfader; channel mix values in % |
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Zones
|
|
280
|
+
|
|
281
|
+
Zones define which sample plays for which MIDI key range. They sit either directly inside a `Group` or inside a `Mapping`.
|
|
282
|
+
|
|
283
|
+
```json
|
|
284
|
+
"Zones": [
|
|
285
|
+
{
|
|
286
|
+
"Module": "Zone",
|
|
287
|
+
"Sample": "samples/piano.wav",
|
|
288
|
+
"Root Key": 64,
|
|
289
|
+
"Low Key": 60,
|
|
290
|
+
"High Key": 67,
|
|
291
|
+
"Volume": -2.0,
|
|
292
|
+
"Tune": 0.09,
|
|
293
|
+
"Start": 0,
|
|
294
|
+
"End": 36275,
|
|
295
|
+
"Loop": "On",
|
|
296
|
+
"Loop Start": 21501,
|
|
297
|
+
"Loop End": 36275,
|
|
298
|
+
"Start Mod Range": 5000,
|
|
299
|
+
"Slice Length": 2.0,
|
|
300
|
+
"Orig Tempo": 120.0,
|
|
301
|
+
"Slices": [ 4, 0, 5512, 11024, 16536, 22050 ]
|
|
302
|
+
},
|
|
303
|
+
{ "Module": "Zone", "Sample": "" }
|
|
304
|
+
]
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Use `"Sample": ""` for an empty zone when no sample is needed (e.g. oscillator-only sounds – required to trigger voices).
|
|
308
|
+
|
|
309
|
+
**Zone keys:**
|
|
310
|
+
|
|
311
|
+
| Key | Type | Notes |
|
|
312
|
+
|---|---|---|
|
|
313
|
+
| `Sample` | string | Relative path or `""` for empty |
|
|
314
|
+
| `Root Key` | integer | MIDI root key (default 69 = A3) |
|
|
315
|
+
| `Low Key` | integer | Lowest MIDI key this zone responds to |
|
|
316
|
+
| `High Key` | integer | Highest MIDI key this zone responds to |
|
|
317
|
+
| `Volume` | float | Per-zone volume offset in dB |
|
|
318
|
+
| `Tune` | float | Fine tune |
|
|
319
|
+
| `Start`, `End` | integer | Sample start/end in samples |
|
|
320
|
+
| `Loop` | string | `"On"` / `"Off"` |
|
|
321
|
+
| `Loop Start`, `Loop End` | integer | Loop points in samples |
|
|
322
|
+
| `Start Mod Range` | integer | Scriptable start position range (samples), enables `EVENT_PARAM_START_POS` |
|
|
323
|
+
| `Slice Length`, `Orig Tempo`, `Slices` | mixed | For REX/sliced loop playback |
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Mappings
|
|
328
|
+
|
|
329
|
+
Mappings hold alternate sample sets for round robins or alternate articulations. A group selects its mapping via `"Alternate Mapping": <index>` (1-based). The script changes the active mapping using `set_event_param(EVENT_ID, EVENT_PAR_ALT_MAPPING, value)`.
|
|
330
|
+
|
|
331
|
+
```json
|
|
332
|
+
"Mappings": [
|
|
333
|
+
{
|
|
334
|
+
"Module": "Mapping",
|
|
335
|
+
"Name": null,
|
|
336
|
+
"Zones": [
|
|
337
|
+
{ "Module": "Zone", "Sample": "rr1.wav", "Root Key": 69, "End": 3200, "Loop": "On", "Loop End": 3200 }
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"Module": "Mapping",
|
|
342
|
+
"Name": null,
|
|
343
|
+
"Zones": [
|
|
344
|
+
{ "Module": "Zone", "Sample": "rr2.wav", "Root Key": 69, "End": 3200, "Loop": "On", "Loop End": 3200 }
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
In scripts, mappings are indexed `M_MAPPING+1`, `M_MAPPING+2`, … (1-based).
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Voice Groups
|
|
355
|
+
|
|
356
|
+
Voice groups control polyphony limits and voice stealing. Every instrument needs at least one.
|
|
357
|
+
|
|
358
|
+
```json
|
|
359
|
+
"Voice Groups": [
|
|
360
|
+
{
|
|
361
|
+
"Module": "VoiceGroup",
|
|
362
|
+
"Name": null,
|
|
363
|
+
"Max Voices": 8
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"Module": "VoiceGroup",
|
|
367
|
+
"Name": null,
|
|
368
|
+
"Max Voices": 1
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Omit `"Max Voices"` for unlimited polyphony. Multiple voice groups allow separate polyphony limits (e.g. main synth poly vs. mono glide group).
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## FX Busses
|
|
378
|
+
|
|
379
|
+
Effect buses receive audio from groups routed to them (`"Output": -1` for Bus 1, `-2` for Bus 2, etc.).
|
|
380
|
+
|
|
381
|
+
```json
|
|
382
|
+
"FX Busses": [
|
|
383
|
+
{
|
|
384
|
+
"Module": "EffectBus",
|
|
385
|
+
"Name": null,
|
|
386
|
+
"Effects": [
|
|
387
|
+
{
|
|
388
|
+
"Module": "EffectChorus",
|
|
389
|
+
"Bypass": "On",
|
|
390
|
+
"Delay": 0.177,
|
|
391
|
+
"Voices": 3,
|
|
392
|
+
"Dry": 0.89,
|
|
393
|
+
"Wet": 0.71
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
In scripts, buses are indexed `M_BUS+1`, `M_BUS+2`, … (1-based). Effects within a bus are indexed `M_EFFECT+1`, `M_EFFECT+2`, … (1-based).
|
|
401
|
+
|
|
402
|
+
**Common effect modules:**
|
|
403
|
+
|
|
404
|
+
| Module | Key params | Notes |
|
|
405
|
+
|---|---|---|
|
|
406
|
+
| `EffectChorus` | `Bypass`, `Delay`, `Voices`, `Dry`, `Wet` | Chorus effect |
|
|
407
|
+
| `EffectDelay` | `Time`, `Sync`, `Feedback`, `Feedback Mode`, `Wet`, `Damping` | `"Sync": "beats"` for tempo sync; `"Feedback Mode": "Ping Pong"` |
|
|
408
|
+
| `EffectReverb` | `Pre Delay`, `Low Cut`, `Damping`, `Dry`, `Wet`, `Low Damping` | |
|
|
409
|
+
| `EffectFilter` | `Cutoff`, `Resonance`, `Smoothing`, `EffectMods` | Filter on the bus output |
|
|
410
|
+
| `EffectEmbedded` | `Inst Data` | Embeds a full instrument as a string-serialised JSON |
|
|
411
|
+
|
|
412
|
+
Effects can include `"EffectMods"` for bus-level modulation:
|
|
413
|
+
```json
|
|
414
|
+
"EffectMods": [
|
|
415
|
+
{
|
|
416
|
+
"Module": "EffectMod",
|
|
417
|
+
"Source": "MIDI CC",
|
|
418
|
+
"CC": 99,
|
|
419
|
+
"Depth": 0.15,
|
|
420
|
+
"Steps": [ 0.0, 0.38, 0.71, 0.92, 1.0, 0.92, 0.71, 0.38 ]
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Scripts
|
|
428
|
+
|
|
429
|
+
The `"Scripts"` array holds one or more script modules. The script content is the inline copy saved at edit time. The `.txt` file is the live source the editor reloads from.
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
"Scripts": [
|
|
433
|
+
{
|
|
434
|
+
"Module": "Script",
|
|
435
|
+
"Script Path": "My Script.txt",
|
|
436
|
+
"Script": "on init\nend on\n"
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Set `"Script Path": null` for scripts with no separate file (inline-only).
|
|
442
|
+
|
|
443
|
+
**Saved property values:** When the editor saves an instrument with script properties that have been adjusted, it appends extra keys to the Script object with the current property values. These are applied on load:
|
|
444
|
+
```json
|
|
445
|
+
{
|
|
446
|
+
"Module": "Script",
|
|
447
|
+
"Script Path": "Step Sequencer Script.txt",
|
|
448
|
+
"Script": "...",
|
|
449
|
+
"Step_Seq": [ 0, 0, 0, 0, -2, 0, 3, 0 ],
|
|
450
|
+
"FilterCutoff": 0.801809,
|
|
451
|
+
"RR_Max_Time": 0.200000003
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## Routing
|
|
458
|
+
|
|
459
|
+
- **Group → Instrument output**: omit the `"Output"` key entirely.
|
|
460
|
+
- **Group → FX Bus**: `"Output": -1` = Bus 1, `"Output": -2` = Bus 2, etc.
|
|
461
|
+
- **Bus → Bus**: a bus can also route to another bus the same way.
|
|
462
|
+
- **Multiple outputs**: positive values (`"Output": 1`, `2`, …) are for multi-output plug-ins; ignored in the Gorilla Editor (treated as stereo main).
|
|
463
|
+
|
|
464
|
+
### Bus renumbering checklist
|
|
465
|
+
|
|
466
|
+
When adding or removing FX buses, all `Output` values that reference
|
|
467
|
+
buses at or after the changed position must be updated.
|
|
468
|
+
|
|
469
|
+
Search scope: every `"Output"` that is a **negative integer** in:
|
|
470
|
+
- EffectBus entries (top-level Output)
|
|
471
|
+
- EffectSend effects (Output inside Effects array)
|
|
472
|
+
- Group entries (Output)
|
|
473
|
+
|
|
474
|
+
Float Output values (e.g. EffectGuitarAmps.Output = 0.664) are DSP
|
|
475
|
+
parameters — do not touch them.
|
|
476
|
+
|
|
477
|
+
Shift formula: if removing N buses at positions P1…PN, then for any
|
|
478
|
+
remaining Output reference -X where X > max(P1…PN):
|
|
479
|
+
new Output = -(X - N)
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## Common editing patterns
|
|
484
|
+
|
|
485
|
+
### Add a filter to a group
|
|
486
|
+
Add to `"Filters"` inside the group. Order matters — the signal flows top-to-bottom.
|
|
487
|
+
```json
|
|
488
|
+
"Filters": [
|
|
489
|
+
{ "Module": "FilterAnalogOsc" },
|
|
490
|
+
{ "Module": "FilterLP12", "Cutoff": 0.5, "Resonance": 0.3 }
|
|
491
|
+
]
|
|
492
|
+
```
|
|
493
|
+
Script accesses `M_FILTER+1` for the oscillator, `M_FILTER+2` for the LP12.
|
|
494
|
+
|
|
495
|
+
### Add a second ADSR (e.g. filter envelope)
|
|
496
|
+
Add to `"ModSources"` after `"Amp Env"`:
|
|
497
|
+
```json
|
|
498
|
+
{
|
|
499
|
+
"Module": "ModSourceADSR",
|
|
500
|
+
"Name": "Filter Env",
|
|
501
|
+
"Decay": 0.5,
|
|
502
|
+
"Decay Curve": 90.0
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
Reference it in a filter's `ModRoutings` as the first (unnamed) source, or in a group routing as `"Source": "Mod 2"`.
|
|
506
|
+
|
|
507
|
+
### Add an LFO modulating filter cutoff
|
|
508
|
+
Add the LFO to `"ModSources"`, then add a routing to the filter's `"ModRoutings"`:
|
|
509
|
+
```json
|
|
510
|
+
{
|
|
511
|
+
"Module": "ModSourceLFO",
|
|
512
|
+
"Name": "LFO",
|
|
513
|
+
"Rate": 0.7,
|
|
514
|
+
"Retrigger": "Off"
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
In the filter:
|
|
518
|
+
```json
|
|
519
|
+
"ModRoutings": [
|
|
520
|
+
{ "Module": "ModRouting", "Source": "Mod 2", "Depth": 0.3 }
|
|
521
|
+
]
|
|
522
|
+
```
|
|
523
|
+
`"Mod 2"` = the 2nd entry in the group's `ModSources` array (1-indexed).
|
|
524
|
+
|
|
525
|
+
### Add an FX bus with reverb
|
|
526
|
+
1. Add `"Output": -1` to the group.
|
|
527
|
+
2. Add the bus to `"FX Busses"`:
|
|
528
|
+
```json
|
|
529
|
+
"FX Busses": [
|
|
530
|
+
{
|
|
531
|
+
"Module": "EffectBus",
|
|
532
|
+
"Name": null,
|
|
533
|
+
"Effects": [
|
|
534
|
+
{ "Module": "EffectReverb", "Pre Delay": 0.1, "Dry": 0.5, "Wet": 0.5 }
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
```
|
|
539
|
+
Script uses `M_BUS+1` / `M_EFFECT+1`.
|
|
540
|
+
|
|
541
|
+
### Add alternate samples (round robin)
|
|
542
|
+
1. Set `"Alternate Mapping": 1` on the group.
|
|
543
|
+
2. Add one `Mapping` per round-robin variant to the top-level `"Mappings"` array, each with its own `"Zones"`.
|
|
544
|
+
3. In the script: `set_event_param(EVENT_ID, EVENT_PAR_ALT_MAPPING, rrIndex)`.
|
|
545
|
+
|
|
546
|
+
### Remove a module
|
|
547
|
+
Simply delete the object from its array. The remaining modules shift down — update all `M_FILTER+n`, `M_MOD_SRC+n`, `M_MOD+n` constants in the script to match the new indices.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Quick Start
|
|
2
|
+
|
|
3
|
+
The mandatory workflow and script language contract live in [SKILL.md](../SKILL.md). Load the focused references linked there for indexing, module control, events, properties, timing, and module-specific behavior.
|
|
4
|
+
|
|
5
|
+
## Script Example
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
on init
|
|
9
|
+
prop_linear Volume(0, 1000000, 1) = 500000
|
|
10
|
+
prop_exp Cutoff(1000000, 20000, 25000000) = 549000 ' 20 Hz to 25 kHz
|
|
11
|
+
prop_boolean Filter_On = 1
|
|
12
|
+
end on
|
|
13
|
+
|
|
14
|
+
on Volume
|
|
15
|
+
set_module_param(M_INST, 0, 0, 4, Volume) ' Instrument Volume (Name=1 str, BlobNum=2, BlobPath=3 str, Volume=4)
|
|
16
|
+
end on
|
|
17
|
+
|
|
18
|
+
on Cutoff
|
|
19
|
+
set_module_param(M_GROUP+0, M_FILTER+1, 0, 2, Cutoff) ' Filter Cutoff (Bypass=1, Cutoff=2 for all voice effects)
|
|
20
|
+
end on
|
|
21
|
+
|
|
22
|
+
on note
|
|
23
|
+
if Filter_On = 0
|
|
24
|
+
group_off(EVENT_ID, ALL_GROUPS)
|
|
25
|
+
group_on(EVENT_ID, 1) ' play unfiltered group
|
|
26
|
+
end if
|
|
27
|
+
end on
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Minimal working example: instrument file
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"Module": "Instrument",
|
|
37
|
+
"Name": "Default Instrument",
|
|
38
|
+
"Pitch Bend Range": 2,
|
|
39
|
+
"Version": "2.0.4",
|
|
40
|
+
"Groups": [
|
|
41
|
+
{
|
|
42
|
+
"Module": "Group",
|
|
43
|
+
"Name": "default",
|
|
44
|
+
"ModSources": [
|
|
45
|
+
{
|
|
46
|
+
"Module": "ModSourceADSR",
|
|
47
|
+
"Name": "Amp Env",
|
|
48
|
+
"Sustain": 1.0
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"ModRoutings": [
|
|
52
|
+
{ "Module": "ModRouting", "Depth": 1.0 },
|
|
53
|
+
{ "Module": "ModRouting", "Source": "Velocity", "Depth": 1.0 },
|
|
54
|
+
{
|
|
55
|
+
"Module": "ModRouting",
|
|
56
|
+
"Source": "Pitch Bend",
|
|
57
|
+
"Depth": 1.0,
|
|
58
|
+
"Smooth": 0.25906554,
|
|
59
|
+
"Dest": "Tune"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"Voice Groups": [{ "Module": "VoiceGroup" }],
|
|
65
|
+
"Scripts": [
|
|
66
|
+
{
|
|
67
|
+
"Module": "Script",
|
|
68
|
+
"Script Path": "script.txt",
|
|
69
|
+
"Script": "on init\nend on\n\non note\nend on\n\non release\nend on\n"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For oscillator-only instruments (no sample), add an empty zone inside the group so voices trigger:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
"Zones": [
|
|
79
|
+
{ "Module": "Zone", "Sample": "" }
|
|
80
|
+
]
|
|
81
|
+
```
|