@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
package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.txt
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
' SimpleSynth
|
|
2
|
+
'
|
|
3
|
+
' Demonstrating a basic set of synth controls
|
|
4
|
+
'
|
|
5
|
+
|
|
6
|
+
on init
|
|
7
|
+
'oscillator properties
|
|
8
|
+
prop_stepped Mode
|
|
9
|
+
add_step(Mode, "Poly")
|
|
10
|
+
add_step(Mode, "Mono")
|
|
11
|
+
set_prop_param(Mode, PROP_GROUP, "Osc")
|
|
12
|
+
|
|
13
|
+
prop_stepped Octave = 2
|
|
14
|
+
add_step(Octave, "-2")
|
|
15
|
+
add_step(Octave, "-1")
|
|
16
|
+
add_step(Octave, " 0")
|
|
17
|
+
add_step(Octave, "+1")
|
|
18
|
+
add_step(Octave, "+2")
|
|
19
|
+
set_prop_param(Octave, PROP_GROUP, "Osc")
|
|
20
|
+
|
|
21
|
+
prop_exp LFO_Rate(1000000, 10, 100000) = 694589
|
|
22
|
+
set_prop_param(LFO_Rate, PROP_UNITS, "Hz")
|
|
23
|
+
set_prop_param(LFO_Rate, PROP_GROUP, "Osc")
|
|
24
|
+
|
|
25
|
+
prop_linear Glide_Time(0, 127, 1)
|
|
26
|
+
set_prop_param(Glide_Time, PROP_GROUP, "Osc")
|
|
27
|
+
|
|
28
|
+
'filter properties
|
|
29
|
+
prop_exp Filter_Cutoff(1000000, 20000, 25000000) = 500000
|
|
30
|
+
set_prop_param(Filter_Cutoff, PROP_UNITS, "Hz")
|
|
31
|
+
set_prop_param(Filter_Cutoff, PROP_GROUP, "Filter")
|
|
32
|
+
|
|
33
|
+
prop_linear Filter_Reso(0, 1000, 10)
|
|
34
|
+
set_prop_param(Filter_Reso, PROP_UNITS, "%")
|
|
35
|
+
set_prop_param(Filter_Reso, PROP_GROUP, "Filter")
|
|
36
|
+
|
|
37
|
+
prop_linear Filter_Env(-1000, 1000, 10) = 750
|
|
38
|
+
set_prop_param(Filter_Env, PROP_UNITS, "%")
|
|
39
|
+
set_prop_param(Filter_Env, PROP_GROUP, "Filter")
|
|
40
|
+
|
|
41
|
+
prop_exp Filter_Attack(1000000, 0, 16000)
|
|
42
|
+
set_prop_param(Filter_Attack, PROP_UNITS, "s")
|
|
43
|
+
set_prop_param(Filter_Attack, PROP_GROUP, "Filter")
|
|
44
|
+
|
|
45
|
+
prop_exp Filter_Decay(1000000, 0, 16000) = 500000
|
|
46
|
+
set_prop_param(Filter_Decay, PROP_UNITS, "s")
|
|
47
|
+
set_prop_param(Filter_Decay, PROP_GROUP, "Filter")
|
|
48
|
+
|
|
49
|
+
prop_linear Filter_Sustain(0, 1000, 10)
|
|
50
|
+
set_prop_param(Filter_Sustain, PROP_UNITS, "%")
|
|
51
|
+
set_prop_param(Filter_Sustain, PROP_GROUP, "Filter")
|
|
52
|
+
|
|
53
|
+
prop_exp Filter_Release(1000000, 0, 16000) = 250000
|
|
54
|
+
set_prop_param(Filter_Release, PROP_UNITS, "s")
|
|
55
|
+
set_prop_param(Filter_Release, PROP_GROUP, "Filter")
|
|
56
|
+
|
|
57
|
+
'amp properties
|
|
58
|
+
prop_exp Amp_Attack(1000000, 0, 16000)
|
|
59
|
+
set_prop_param(Amp_Attack, PROP_UNITS, "s")
|
|
60
|
+
set_prop_param(Amp_Attack, PROP_GROUP, "Amp")
|
|
61
|
+
|
|
62
|
+
prop_exp Amp_Decay(1000000, 0, 16000) = 500000
|
|
63
|
+
set_prop_param(Amp_Decay, PROP_UNITS, "s")
|
|
64
|
+
set_prop_param(Amp_Decay, PROP_GROUP, "Amp")
|
|
65
|
+
|
|
66
|
+
prop_linear Amp_Sustain(0, 1000, 10) = 1000
|
|
67
|
+
set_prop_param(Amp_Sustain, PROP_UNITS, "%")
|
|
68
|
+
set_prop_param(Amp_Sustain, PROP_GROUP, "Amp")
|
|
69
|
+
|
|
70
|
+
prop_exp Amp_Release(1000000, 0, 16000) = 250000
|
|
71
|
+
set_prop_param(Amp_Release, PROP_UNITS, "s")
|
|
72
|
+
set_prop_param(Amp_Release, PROP_GROUP, "Amp")
|
|
73
|
+
|
|
74
|
+
prop_linear Amp_Velocity(0, 100, 1) = 50
|
|
75
|
+
set_prop_param(Amp_Velocity, PROP_UNITS, "%")
|
|
76
|
+
set_prop_param(Amp_Velocity, PROP_GROUP, "Amp")
|
|
77
|
+
var v 'for velocity sensitivity calculations
|
|
78
|
+
|
|
79
|
+
prop_boolean Chorus
|
|
80
|
+
|
|
81
|
+
prop_decibels Volume(1000000, 12)
|
|
82
|
+
set_prop_param(Volume, PROP_MIDI_CC, 7)
|
|
83
|
+
end on
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
on Mode
|
|
87
|
+
set_module_param(M_GROUP, 0, 0, 8, Mode) 'select Voice Group
|
|
88
|
+
end on
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
on Octave
|
|
92
|
+
'could set in oscillator directly instead of in "on note"
|
|
93
|
+
'set_module_param(M_GROUP+0, M_FILTER+1, 0, 2, 166666 + 166667 * Octave)
|
|
94
|
+
end on
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
on note
|
|
98
|
+
'adjust octave
|
|
99
|
+
set_key(EVENT_ID, EVENT_KEY + 12 * Octave - 24)
|
|
100
|
+
end on
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
on LFO_Rate
|
|
104
|
+
set_module_param(M_GROUP, M_MOD_SRC+4, 0, 3, LFO_Rate)
|
|
105
|
+
end on
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
on Glide_Time 'set MIDI CC used as a mod source
|
|
109
|
+
set_controller(5, Glide_Time)
|
|
110
|
+
end on
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
on Filter_Cutoff
|
|
114
|
+
set_module_param(M_GROUP, M_FILTER+2, 0, 2, Filter_Cutoff)
|
|
115
|
+
end on
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
on Filter_Reso
|
|
119
|
+
set_module_param(M_GROUP, M_FILTER+2, 0, 3, 1000 * Filter_Reso)
|
|
120
|
+
end on
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
on Filter_Env
|
|
124
|
+
set_module_param(M_GROUP, M_FILTER+2, M_MOD+1, 4, -Filter_Env) 'Invert
|
|
125
|
+
set_module_param(M_GROUP, M_FILTER+2, M_MOD+1, 5, 1000 * abs(Filter_Env)) 'Depth
|
|
126
|
+
end on
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
on Filter_Attack
|
|
130
|
+
set_module_param(M_GROUP, M_MOD_SRC+1, 0, 2, Filter_Attack)
|
|
131
|
+
end on
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
on Filter_Decay
|
|
135
|
+
set_module_param(M_GROUP, M_MOD_SRC+1, 0, 5, Filter_Decay)
|
|
136
|
+
end on
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
on Filter_Sustain
|
|
140
|
+
set_module_param(M_GROUP, M_MOD_SRC+1, 0, 7, 1000 * Filter_Sustain)
|
|
141
|
+
end on
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
on Filter_Release
|
|
145
|
+
set_module_param(M_GROUP, M_MOD_SRC+1, 0, 8, Filter_Release)
|
|
146
|
+
end on
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
on Amp_Attack
|
|
150
|
+
set_module_param(M_GROUP, M_MOD_SRC+2, 0, 2, Amp_Attack)
|
|
151
|
+
end on
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
on Amp_Decay
|
|
155
|
+
set_module_param(M_GROUP, M_MOD_SRC+2, 0, 5, Amp_Decay)
|
|
156
|
+
end on
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
on Amp_Sustain
|
|
160
|
+
set_module_param(M_GROUP, M_MOD_SRC+2, 0, 7, 1000 * Amp_Sustain)
|
|
161
|
+
end on
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
on Amp_Release
|
|
165
|
+
set_module_param(M_GROUP, M_MOD_SRC+2, 0, 8, Amp_Release)
|
|
166
|
+
end on
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
on Amp_Velocity
|
|
170
|
+
v = 100 - Amp_Velocity
|
|
171
|
+
v = 1000000 - v * v * v
|
|
172
|
+
set_module_param(M_GROUP, 0, M_MOD+2, 5, v)
|
|
173
|
+
end on
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
on Chorus
|
|
177
|
+
set_module_param(M_BUS+1, M_EFFECT+1, 0, 1, 1 - Chorus)
|
|
178
|
+
end on
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
on Volume
|
|
182
|
+
set_module_param(M_INST, 0, 0, 4, Volume)
|
|
183
|
+
end on
|
|
184
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { UserInterface } from './components/UserInterface';
|
|
3
|
+
import { useNotification } from '@gorilla-engine-sdk/ge-dialogs-lib';
|
|
4
|
+
import {
|
|
5
|
+
IPresetManager,
|
|
6
|
+
useSessionAndPresetsManager,
|
|
7
|
+
} from '@gorilla-engine-sdk/ge-session-presets-lib';
|
|
8
|
+
|
|
9
|
+
export function Root(props) {
|
|
10
|
+
const presetManager: IPresetManager = useSessionAndPresetsManager();
|
|
11
|
+
const [showNotification] = useNotification();
|
|
12
|
+
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
if (presetManager) {
|
|
15
|
+
// it is possible to add additional logic when saving or loading sessions or presets
|
|
16
|
+
// typically you would add custom logic here to handle additional tasks when saving or loading presets
|
|
17
|
+
presetManager.setAdditionalSavePreset(
|
|
18
|
+
async (
|
|
19
|
+
instrument: GorillaEngine.Instrument,
|
|
20
|
+
presetObj: any,
|
|
21
|
+
fileObj: { filePath: string },
|
|
22
|
+
) => {
|
|
23
|
+
showNotification({ message: 'Preset saved successfully' });
|
|
24
|
+
return true;
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}, [presetManager]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<geLabel x={0} y={0} width={920} height={590} backgroundColor={'2F323D'}>
|
|
32
|
+
<UserInterface instrument={props.instrument} />
|
|
33
|
+
</geLabel>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
const FONT_MEDIUM = 'fonts/Roboto-Medium.otf';
|
|
4
|
+
const FONT_BOLD = 'fonts/Roboto-Bold.otf';
|
|
5
|
+
const FONT_REGULAR = 'fonts/Roboto-Regular.otf';
|
|
6
|
+
|
|
7
|
+
type ErrorBoundaryState = {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
stack: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export class ErrorBoundary extends React.Component<React.PropsWithChildren, ErrorBoundaryState> {
|
|
14
|
+
declare state: ErrorBoundaryState;
|
|
15
|
+
|
|
16
|
+
constructor(props) {
|
|
17
|
+
super(props);
|
|
18
|
+
this.state = { hasError: false, message: '', stack: '' };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static getDerivedStateFromError(error: Error) {
|
|
22
|
+
return { hasError: true, message: error.message || String(error) };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
|
26
|
+
this.setState({
|
|
27
|
+
message: error.message || String(error),
|
|
28
|
+
stack: errorInfo.componentStack || error.stack || '',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
render() {
|
|
33
|
+
if (this.state.hasError) {
|
|
34
|
+
return (
|
|
35
|
+
<geLabel x={0} y={0} width={920} height={590} backgroundColor="17191F">
|
|
36
|
+
<geLabel x={0} y={0} width={8} height={590} backgroundColor="E85D5D" />
|
|
37
|
+
<geLabel x={8} y={0} width={912} height={72} backgroundColor="20232B">
|
|
38
|
+
<geLabel
|
|
39
|
+
x={32}
|
|
40
|
+
y={18}
|
|
41
|
+
width={38}
|
|
42
|
+
height={38}
|
|
43
|
+
backgroundColor="E85D5D"
|
|
44
|
+
text="!"
|
|
45
|
+
textColor="FFFFFF"
|
|
46
|
+
font={FONT_BOLD}
|
|
47
|
+
fontSize={24}
|
|
48
|
+
textAlign="center"
|
|
49
|
+
/>
|
|
50
|
+
<geLabel
|
|
51
|
+
x={86}
|
|
52
|
+
y={24}
|
|
53
|
+
width={420}
|
|
54
|
+
height={24}
|
|
55
|
+
text="PLUGIN UI INTERRUPTED"
|
|
56
|
+
textColor="F4F6FA"
|
|
57
|
+
font={FONT_BOLD}
|
|
58
|
+
fontSize={20}
|
|
59
|
+
/>
|
|
60
|
+
<geLabel
|
|
61
|
+
x={748}
|
|
62
|
+
y={25}
|
|
63
|
+
width={132}
|
|
64
|
+
height={20}
|
|
65
|
+
text="RENDER ERROR"
|
|
66
|
+
textColor="E85D5D"
|
|
67
|
+
font={FONT_MEDIUM}
|
|
68
|
+
fontSize={11}
|
|
69
|
+
textAlign="center"
|
|
70
|
+
backgroundColor="33262A"
|
|
71
|
+
/>
|
|
72
|
+
</geLabel>
|
|
73
|
+
|
|
74
|
+
<geLabel
|
|
75
|
+
x={40}
|
|
76
|
+
y={104}
|
|
77
|
+
width={840}
|
|
78
|
+
height={18}
|
|
79
|
+
text="WHAT HAPPENED"
|
|
80
|
+
textColor="7E8797"
|
|
81
|
+
font={FONT_MEDIUM}
|
|
82
|
+
fontSize={11}
|
|
83
|
+
/>
|
|
84
|
+
<geLabel
|
|
85
|
+
x={40}
|
|
86
|
+
y={128}
|
|
87
|
+
width={840}
|
|
88
|
+
height={76}
|
|
89
|
+
text={this.state.message || 'An unexpected rendering error occurred.'}
|
|
90
|
+
textColor="F4F6FA"
|
|
91
|
+
font={FONT_MEDIUM}
|
|
92
|
+
fontSize={16}
|
|
93
|
+
backgroundColor="242730"
|
|
94
|
+
/>
|
|
95
|
+
|
|
96
|
+
<geLabel x={40} y={226} width={840} height={1} backgroundColor="353945" />
|
|
97
|
+
<geLabel
|
|
98
|
+
x={40}
|
|
99
|
+
y={246}
|
|
100
|
+
width={840}
|
|
101
|
+
height={18}
|
|
102
|
+
text="COMPONENT TRACE"
|
|
103
|
+
textColor="7E8797"
|
|
104
|
+
font={FONT_MEDIUM}
|
|
105
|
+
fontSize={11}
|
|
106
|
+
/>
|
|
107
|
+
<geLabel
|
|
108
|
+
x={40}
|
|
109
|
+
y={274}
|
|
110
|
+
width={840}
|
|
111
|
+
height={236}
|
|
112
|
+
text={this.state.stack || 'No component trace was provided.'}
|
|
113
|
+
textColor="B9C1CF"
|
|
114
|
+
font={FONT_REGULAR}
|
|
115
|
+
fontSize={11}
|
|
116
|
+
textAlign="left"
|
|
117
|
+
backgroundColor="111319"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<geLabel x={40} y={536} width={840} height={1} backgroundColor="353945" />
|
|
121
|
+
<geLabel
|
|
122
|
+
x={748}
|
|
123
|
+
y={552}
|
|
124
|
+
width={132}
|
|
125
|
+
height={18}
|
|
126
|
+
text="GORILLA ENGINE"
|
|
127
|
+
textColor="596171"
|
|
128
|
+
font={FONT_MEDIUM}
|
|
129
|
+
fontSize={10}
|
|
130
|
+
textAlign="right"
|
|
131
|
+
/>
|
|
132
|
+
</geLabel>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return (this.props as any).children;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LabeledKnob, LabeledSlider } from '@gorilla-engine-sdk/ge-labeled-components';
|
|
3
|
+
|
|
4
|
+
const FONT_M = 'fonts/Roboto-Medium.otf';
|
|
5
|
+
const FONT_B = 'fonts/Roboto-Bold.otf';
|
|
6
|
+
const FONT_R = 'fonts/Roboto-Regular.otf';
|
|
7
|
+
|
|
8
|
+
const KNOB_PROPS = {
|
|
9
|
+
width: 85,
|
|
10
|
+
height: 85,
|
|
11
|
+
backgroundColor: '00FFFFFF',
|
|
12
|
+
hideValueLabel: true,
|
|
13
|
+
hideTextValue: true,
|
|
14
|
+
toggleVisibilityOnHover: true,
|
|
15
|
+
valueLabel: { y: 71, height: 14, font: FONT_M, fontSize: 14, textAlign: 'center' as const },
|
|
16
|
+
knob: {
|
|
17
|
+
filmstrip: { path: 'images/Rotary.png', count: 128, direction: 'vertical' as const },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const BIPOLAR_KNOB = {
|
|
22
|
+
filmstrip: {
|
|
23
|
+
path: 'images/Rotary Bipolar.png',
|
|
24
|
+
count: 128,
|
|
25
|
+
direction: 'vertical' as const,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const knobLabel = (text: string) => ({ ...KNOB_PROPS.valueLabel, text });
|
|
30
|
+
|
|
31
|
+
const SLIDER_PROPS = {
|
|
32
|
+
width: 160,
|
|
33
|
+
height: 40,
|
|
34
|
+
backgroundColor: '00FFFFFF',
|
|
35
|
+
hideValueLabel: true,
|
|
36
|
+
hideTextValue: true,
|
|
37
|
+
toggleVisibilityOnHover: true,
|
|
38
|
+
valueLabel: { y: 0, height: 16, font: FONT_M, fontSize: 13, textAlign: 'center' as const },
|
|
39
|
+
slider: {
|
|
40
|
+
width: 140,
|
|
41
|
+
height: 18,
|
|
42
|
+
y: 20,
|
|
43
|
+
direction: 'horizontal' as const,
|
|
44
|
+
filmstrip: {
|
|
45
|
+
path: 'images/Horizontal Slider.png',
|
|
46
|
+
count: 128,
|
|
47
|
+
direction: 'vertical' as const,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const sliderLabel = (text: string) => ({ ...SLIDER_PROPS.valueLabel, text });
|
|
53
|
+
|
|
54
|
+
type Props = {
|
|
55
|
+
instrument: GorillaEngine.Runtime.Instrument;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export function UserInterface({ instrument }: Props) {
|
|
59
|
+
return (
|
|
60
|
+
<>
|
|
61
|
+
{/* ── Header: centred in the space to the right of the preset browser ── */}
|
|
62
|
+
<geLabel
|
|
63
|
+
x={397}
|
|
64
|
+
y={25}
|
|
65
|
+
width={484}
|
|
66
|
+
height={14}
|
|
67
|
+
text={GorillaEngine.getManufacturerName()}
|
|
68
|
+
textColor="5177E0"
|
|
69
|
+
font={FONT_M}
|
|
70
|
+
fontSize={12}
|
|
71
|
+
textAlign="center"
|
|
72
|
+
/>
|
|
73
|
+
<geLabel
|
|
74
|
+
x={397}
|
|
75
|
+
y={40}
|
|
76
|
+
width={484}
|
|
77
|
+
height={28}
|
|
78
|
+
text={GorillaEngine.getPluginName()}
|
|
79
|
+
textColor="E1E6F5"
|
|
80
|
+
font={FONT_B}
|
|
81
|
+
fontSize={24}
|
|
82
|
+
textAlign="center"
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
{/* ── Section labels ──────────────────────────────────────────── */}
|
|
86
|
+
<geLabel
|
|
87
|
+
x={40}
|
|
88
|
+
y={100}
|
|
89
|
+
width={200}
|
|
90
|
+
height={14}
|
|
91
|
+
text="AMP"
|
|
92
|
+
textColor="5177E0"
|
|
93
|
+
font={FONT_M}
|
|
94
|
+
fontSize={13}
|
|
95
|
+
/>
|
|
96
|
+
<geLabel
|
|
97
|
+
x={439}
|
|
98
|
+
y={100}
|
|
99
|
+
width={200}
|
|
100
|
+
height={14}
|
|
101
|
+
text="FILTER"
|
|
102
|
+
textColor="5177E0"
|
|
103
|
+
font={FONT_M}
|
|
104
|
+
fontSize={13}
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
{/* ── AMP — row 1: Attack, Decay, Sustain ─────────────────────── */}
|
|
108
|
+
<LabeledKnob
|
|
109
|
+
{...KNOB_PROPS}
|
|
110
|
+
x={60}
|
|
111
|
+
y={118}
|
|
112
|
+
instrument={instrument}
|
|
113
|
+
instrumentProp={instrument.amp_attack}
|
|
114
|
+
textLabel={knobLabel('ATTACK')}
|
|
115
|
+
/>
|
|
116
|
+
<LabeledKnob
|
|
117
|
+
{...KNOB_PROPS}
|
|
118
|
+
x={160}
|
|
119
|
+
y={118}
|
|
120
|
+
instrument={instrument}
|
|
121
|
+
instrumentProp={instrument.amp_decay}
|
|
122
|
+
textLabel={knobLabel('DECAY')}
|
|
123
|
+
/>
|
|
124
|
+
<LabeledKnob
|
|
125
|
+
{...KNOB_PROPS}
|
|
126
|
+
x={260}
|
|
127
|
+
y={118}
|
|
128
|
+
instrument={instrument}
|
|
129
|
+
instrumentProp={instrument.amp_sustain}
|
|
130
|
+
textLabel={knobLabel('SUSTAIN')}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
{/* ── AMP — row 2: Release, Velocity ──────────────────────────── */}
|
|
134
|
+
<LabeledKnob
|
|
135
|
+
{...KNOB_PROPS}
|
|
136
|
+
x={120}
|
|
137
|
+
y={228}
|
|
138
|
+
instrument={instrument}
|
|
139
|
+
instrumentProp={instrument.amp_release}
|
|
140
|
+
textLabel={knobLabel('RELEASE')}
|
|
141
|
+
/>
|
|
142
|
+
<LabeledKnob
|
|
143
|
+
{...KNOB_PROPS}
|
|
144
|
+
x={220}
|
|
145
|
+
y={228}
|
|
146
|
+
instrument={instrument}
|
|
147
|
+
instrumentProp={instrument.amp_velocity}
|
|
148
|
+
textLabel={knobLabel('VELOCITY')}
|
|
149
|
+
/>
|
|
150
|
+
|
|
151
|
+
{/* ── FILTER — row 1: ADSR ────────────────────────────────────── */}
|
|
152
|
+
<LabeledKnob
|
|
153
|
+
{...KNOB_PROPS}
|
|
154
|
+
x={469}
|
|
155
|
+
y={118}
|
|
156
|
+
instrument={instrument}
|
|
157
|
+
instrumentProp={instrument.filter_attack}
|
|
158
|
+
textLabel={knobLabel('ATTACK')}
|
|
159
|
+
/>
|
|
160
|
+
<LabeledKnob
|
|
161
|
+
{...KNOB_PROPS}
|
|
162
|
+
x={569}
|
|
163
|
+
y={118}
|
|
164
|
+
instrument={instrument}
|
|
165
|
+
instrumentProp={instrument.filter_decay}
|
|
166
|
+
textLabel={knobLabel('DECAY')}
|
|
167
|
+
/>
|
|
168
|
+
<LabeledKnob
|
|
169
|
+
{...KNOB_PROPS}
|
|
170
|
+
x={669}
|
|
171
|
+
y={118}
|
|
172
|
+
instrument={instrument}
|
|
173
|
+
instrumentProp={instrument.filter_sustain}
|
|
174
|
+
textLabel={knobLabel('SUSTAIN')}
|
|
175
|
+
/>
|
|
176
|
+
<LabeledKnob
|
|
177
|
+
{...KNOB_PROPS}
|
|
178
|
+
x={769}
|
|
179
|
+
y={118}
|
|
180
|
+
instrument={instrument}
|
|
181
|
+
instrumentProp={instrument.filter_release}
|
|
182
|
+
textLabel={knobLabel('RELEASE')}
|
|
183
|
+
/>
|
|
184
|
+
|
|
185
|
+
{/* ── FILTER — row 2: Cutoff, Reso, Env ───────────────────────── */}
|
|
186
|
+
<LabeledKnob
|
|
187
|
+
{...KNOB_PROPS}
|
|
188
|
+
x={524}
|
|
189
|
+
y={228}
|
|
190
|
+
instrument={instrument}
|
|
191
|
+
instrumentProp={instrument.filter_cutoff}
|
|
192
|
+
textLabel={knobLabel('CUTOFF')}
|
|
193
|
+
/>
|
|
194
|
+
<LabeledKnob
|
|
195
|
+
{...KNOB_PROPS}
|
|
196
|
+
x={624}
|
|
197
|
+
y={228}
|
|
198
|
+
instrument={instrument}
|
|
199
|
+
instrumentProp={instrument.filter_reso}
|
|
200
|
+
textLabel={knobLabel('RESO')}
|
|
201
|
+
/>
|
|
202
|
+
<LabeledKnob
|
|
203
|
+
{...KNOB_PROPS}
|
|
204
|
+
x={724}
|
|
205
|
+
y={228}
|
|
206
|
+
instrument={instrument}
|
|
207
|
+
instrumentProp={instrument.filter_env}
|
|
208
|
+
textLabel={knobLabel('ENV')}
|
|
209
|
+
knob={BIPOLAR_KNOB}
|
|
210
|
+
/>
|
|
211
|
+
|
|
212
|
+
{/* ── Divider ─────────────────────────────────────────────────── */}
|
|
213
|
+
<geLabel x={0} y={380} width={920} height={1} backgroundColor="3F4354" />
|
|
214
|
+
|
|
215
|
+
{/* ── Lower: Mode ─────────────────────────────────────────────── */}
|
|
216
|
+
<geLabel
|
|
217
|
+
x={40}
|
|
218
|
+
y={390}
|
|
219
|
+
width={96}
|
|
220
|
+
height={14}
|
|
221
|
+
text="MODE"
|
|
222
|
+
textColor="E1E6F5"
|
|
223
|
+
font={FONT_M}
|
|
224
|
+
fontSize={13}
|
|
225
|
+
textAlign="center"
|
|
226
|
+
/>
|
|
227
|
+
<geComboBox
|
|
228
|
+
x={40}
|
|
229
|
+
y={408}
|
|
230
|
+
width={96}
|
|
231
|
+
height={24}
|
|
232
|
+
backgroundColor="1d2029"
|
|
233
|
+
textColor="E1E6F5"
|
|
234
|
+
font={FONT_R}
|
|
235
|
+
fontSize={13}
|
|
236
|
+
bindings={{ value: instrument.mode, items: instrument.mode }}
|
|
237
|
+
/>
|
|
238
|
+
|
|
239
|
+
{/* ── Lower: Octave ───────────────────────────────────────────── */}
|
|
240
|
+
<geLabel
|
|
241
|
+
x={174}
|
|
242
|
+
y={390}
|
|
243
|
+
width={96}
|
|
244
|
+
height={14}
|
|
245
|
+
text="OCTAVE"
|
|
246
|
+
textColor="E1E6F5"
|
|
247
|
+
font={FONT_M}
|
|
248
|
+
fontSize={13}
|
|
249
|
+
textAlign="center"
|
|
250
|
+
/>
|
|
251
|
+
<geComboBox
|
|
252
|
+
x={174}
|
|
253
|
+
y={408}
|
|
254
|
+
width={96}
|
|
255
|
+
height={24}
|
|
256
|
+
backgroundColor="1d2029"
|
|
257
|
+
textColor="E1E6F5"
|
|
258
|
+
font={FONT_R}
|
|
259
|
+
fontSize={13}
|
|
260
|
+
bindings={{ value: instrument.octave, items: instrument.octave }}
|
|
261
|
+
/>
|
|
262
|
+
|
|
263
|
+
{/* ── Lower: LFO Rate ─────────────────────────────────────────── */}
|
|
264
|
+
<LabeledSlider
|
|
265
|
+
{...SLIDER_PROPS}
|
|
266
|
+
x={308}
|
|
267
|
+
y={390}
|
|
268
|
+
instrument={instrument}
|
|
269
|
+
instrumentProp={instrument.lfo_rate}
|
|
270
|
+
textLabel={sliderLabel('LFO RATE')}
|
|
271
|
+
/>
|
|
272
|
+
|
|
273
|
+
{/* ── Lower: Glide Time ───────────────────────────────────────── */}
|
|
274
|
+
<LabeledSlider
|
|
275
|
+
{...SLIDER_PROPS}
|
|
276
|
+
x={506}
|
|
277
|
+
y={390}
|
|
278
|
+
instrument={instrument}
|
|
279
|
+
instrumentProp={instrument.glide_time}
|
|
280
|
+
textLabel={sliderLabel('GLIDE')}
|
|
281
|
+
/>
|
|
282
|
+
|
|
283
|
+
{/* ── Lower: Chorus toggle ────────────────────────────────────── */}
|
|
284
|
+
<geLabel
|
|
285
|
+
x={704}
|
|
286
|
+
y={390}
|
|
287
|
+
width={80}
|
|
288
|
+
height={14}
|
|
289
|
+
text="CHORUS"
|
|
290
|
+
textColor="E1E6F5"
|
|
291
|
+
font={FONT_M}
|
|
292
|
+
fontSize={13}
|
|
293
|
+
textAlign="center"
|
|
294
|
+
/>
|
|
295
|
+
<geToggle
|
|
296
|
+
x={725}
|
|
297
|
+
y={408}
|
|
298
|
+
width={38}
|
|
299
|
+
height={20}
|
|
300
|
+
onImage="images/toggle-pressed.png"
|
|
301
|
+
offImage="images/toggle-default.png"
|
|
302
|
+
bindings={{ value: instrument.chorus }}
|
|
303
|
+
/>
|
|
304
|
+
|
|
305
|
+
{/* ── Lower: Volume ───────────────────────────────────────────── */}
|
|
306
|
+
<LabeledKnob
|
|
307
|
+
{...KNOB_PROPS}
|
|
308
|
+
x={810}
|
|
309
|
+
y={466}
|
|
310
|
+
instrument={instrument}
|
|
311
|
+
instrumentProp={instrument.volume}
|
|
312
|
+
textLabel={knobLabel('VOLUME')}
|
|
313
|
+
/>
|
|
314
|
+
|
|
315
|
+
{/* ── MIDI Keyboard ───────────────────────────────────────────── */}
|
|
316
|
+
<geMidiKeyboard
|
|
317
|
+
x={40}
|
|
318
|
+
y={483}
|
|
319
|
+
width={745}
|
|
320
|
+
height={90}
|
|
321
|
+
lowKey={48}
|
|
322
|
+
highKey={101}
|
|
323
|
+
keys={{
|
|
324
|
+
whiteHeight: 70,
|
|
325
|
+
blackHeight: 38,
|
|
326
|
+
spacing: 2,
|
|
327
|
+
whiteColor: 'DDDDDD',
|
|
328
|
+
whiteHoverColor: 'EEEEEE',
|
|
329
|
+
whitePressedColor: '5177E0',
|
|
330
|
+
whiteOutlineColor: 'AAAAAA',
|
|
331
|
+
blackColor: '222222',
|
|
332
|
+
blackHoverColor: '444444',
|
|
333
|
+
blackPressedColor: '5177E0',
|
|
334
|
+
}}
|
|
335
|
+
/>
|
|
336
|
+
</>
|
|
337
|
+
);
|
|
338
|
+
}
|