@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.
Files changed (101) hide show
  1. package/LICENSE.md +64 -0
  2. package/README.md +103 -0
  3. package/generator-gorilla-engine-plugin/app/index.js +338 -0
  4. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/SKILL.md +295 -0
  5. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/effects-filters.md +186 -0
  6. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/indexing.md +129 -0
  7. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/instrument-files.md +547 -0
  8. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/key-rules.md +81 -0
  9. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/modulation.md +210 -0
  10. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-control.md +217 -0
  11. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-bus-effects.md +663 -0
  12. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-core.md +145 -0
  13. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-misc.md +59 -0
  14. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-modulation.md +85 -0
  15. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/module-reference-voice-effects.md +407 -0
  16. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/note-events.md +278 -0
  17. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/properties.md +230 -0
  18. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/script-patterns.md +494 -0
  19. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-dsp/references/time-tempo.md +209 -0
  20. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/SKILL.md +104 -0
  21. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/advanced-controls.md +194 -0
  22. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/base-props.md +167 -0
  23. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/basic-controls.md +230 -0
  24. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/bindings.md +183 -0
  25. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/composite-components.md +258 -0
  26. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/containers.md +149 -0
  27. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/editors.md +191 -0
  28. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/event-handlers.md +150 -0
  29. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/getting-started.md +143 -0
  30. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/gorilla-engine-api.md +147 -0
  31. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/instrument-api.md +250 -0
  32. package/generator-gorilla-engine-plugin/app/templates/.agents/skills/gorilla-engine-ui/references/visualization.md +209 -0
  33. package/generator-gorilla-engine-plugin/app/templates/.prettierignore +13 -0
  34. package/generator-gorilla-engine-plugin/app/templates/.vscode/settings.json +14 -0
  35. package/generator-gorilla-engine-plugin/app/templates/.vscode_input/launch.json +89 -0
  36. package/generator-gorilla-engine-plugin/app/templates/README.md +36 -0
  37. package/generator-gorilla-engine-plugin/app/templates/assets/fonts/OFL.txt +93 -0
  38. package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Bold.otf +0 -0
  39. package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Medium.otf +0 -0
  40. package/generator-gorilla-engine-plugin/app/templates/assets/fonts/Roboto-Regular.otf +0 -0
  41. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Init.preset +1 -0
  42. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/Presets/Factory/Category 1/Three Quarters.preset +1 -0
  43. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider.png +0 -0
  44. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Horizontal Slider@2x.png +0 -0
  45. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary Bipolar.png +0 -0
  46. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary-Bipolar@2x.png +0 -0
  47. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary.png +0 -0
  48. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/Rotary@2x.png +0 -0
  49. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default.png +0 -0
  50. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-default@2x.png +0 -0
  51. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover.png +0 -0
  52. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-hover@2x.png +0 -0
  53. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed.png +0 -0
  54. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-down-pressed@2x.png +0 -0
  55. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default.png +0 -0
  56. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-default@2x.png +0 -0
  57. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover.png +0 -0
  58. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-hover@2x.png +0 -0
  59. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed.png +0 -0
  60. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/arrow-up-pressed@2x.png +0 -0
  61. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default.png +0 -0
  62. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-default@2x.png +0 -0
  63. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed.png +0 -0
  64. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/images/toggle-pressed@2x.png +0 -0
  65. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part1.blob +0 -0
  66. package/generator-gorilla-engine-plugin/app/templates/basic-synth/assets/instruments/Basic Synth Example_part2.blob +1 -0
  67. package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.inst +157 -0
  68. package/generator-gorilla-engine-plugin/app/templates/basic-synth/instrument/Basic Synth Example.txt +184 -0
  69. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/Root.tsx +35 -0
  70. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/ErrorBoundary.tsx +138 -0
  71. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/components/UserInterface.tsx +338 -0
  72. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/app/pluginConfig.ts +4 -0
  73. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/dialogsCustomStyle.ts +98 -0
  74. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/index.tsx +217 -0
  75. package/generator-gorilla-engine-plugin/app/templates/basic-synth/src/presetBrowserCustomStyle.ts +124 -0
  76. package/generator-gorilla-engine-plugin/app/templates/build.ugep +173 -0
  77. package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/01 - All The Way Down.preset +1 -0
  78. package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/02 - About Half.preset +1 -0
  79. package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/03 - Three Quarters.preset +1 -0
  80. package/generator-gorilla-engine-plugin/app/templates/effect/assets/Presets/Factory/Category 1/04 - All The Way Up.preset +1 -0
  81. package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary.png +0 -0
  82. package/generator-gorilla-engine-plugin/app/templates/effect/assets/images/Rotary@2x.png +0 -0
  83. package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part1.blob +0 -0
  84. package/generator-gorilla-engine-plugin/app/templates/effect/assets/instruments/Reverb Example_part2.blob +1 -0
  85. package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.inst +73 -0
  86. package/generator-gorilla-engine-plugin/app/templates/effect/instrument/Reverb Example.txt +21 -0
  87. package/generator-gorilla-engine-plugin/app/templates/effect/src/app/Root.tsx +35 -0
  88. package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/ErrorBoundary.tsx +114 -0
  89. package/generator-gorilla-engine-plugin/app/templates/effect/src/app/components/UserInterface.tsx +85 -0
  90. package/generator-gorilla-engine-plugin/app/templates/effect/src/app/pluginConfig.ts +4 -0
  91. package/generator-gorilla-engine-plugin/app/templates/effect/src/dialogsCustomStyle.ts +101 -0
  92. package/generator-gorilla-engine-plugin/app/templates/effect/src/index.tsx +214 -0
  93. package/generator-gorilla-engine-plugin/app/templates/effect/src/presetBrowserCustomStyle.ts +124 -0
  94. package/generator-gorilla-engine-plugin/app/templates/gitignore +9 -0
  95. package/generator-gorilla-engine-plugin/app/templates/licence.txt +0 -0
  96. package/generator-gorilla-engine-plugin/app/templates/package.json +38 -0
  97. package/generator-gorilla-engine-plugin/app/templates/prettierrc +9 -0
  98. package/generator-gorilla-engine-plugin/app/templates/tsconfig.json +20 -0
  99. package/generator-gorilla-engine-plugin/package.json +17 -0
  100. package/index.js +72 -0
  101. package/package.json +42 -0
@@ -0,0 +1,147 @@
1
+ # GorillaEngine Native API
2
+
3
+ The global `GorillaEngine` namespace is available at runtime inside the plugin's JavaScript environment. It provides access to the audio engine, instruments, blobs, UI utilities, and platform services.
4
+
5
+ ## Global Functions
6
+
7
+ ### Resource & Plugin Info
8
+
9
+ ```ts
10
+ GorillaEngine.getResourcePath(): string
11
+ // Returns the platform-specific path where assets, blobs, etc. are installed.
12
+
13
+ GorillaEngine.getPluginName(): string
14
+ GorillaEngine.getPluginType(): string
15
+ GorillaEngine.getPluginPath(): string
16
+ GorillaEngine.getManufacturerName(): string
17
+ GorillaEngine.getHostDescription(): string // Name of the host DAW
18
+ GorillaEngine.getBuildInformation(): any
19
+ ```
20
+
21
+ ### Instrument Management
22
+
23
+ ```ts
24
+ // Load a blob file and then get an instrument from it:
25
+ // encryptionKey is optional — only needed for encrypted blobs (32-char hex string)
26
+ const blob = GorillaEngine.loadBlob(blobPath: string, encryptionKey?: string): Blob; // throws on failure
27
+ blob.getInstrumentNames(): string[]; // list all instruments in the blob
28
+ const instrument = blob.loadInstrument(name: string): Instrument;
29
+
30
+ // Usage Example:
31
+ const blob = GorillaEngine.loadBlob('PATH_TO_BLOB');
32
+ const instrument = GorillaEngine.loadInstrument(blob.getInstrumentNames()[0]);
33
+
34
+ // Other ways to obtain an instrument:
35
+ GorillaEngine.createEmptyInstrument(): Instrument;
36
+ GorillaEngine.LoadInstrumentFromFile(instFilePath: string): Instrument; // loads .inst file
37
+
38
+ // Activate (route MIDI+audio) — only one instrument active at a time:
39
+ GorillaEngine.setActiveInstrument(instrument): void;
40
+ GorillaEngine.disposeInstrument(instrument): void;
41
+ ```
42
+
43
+ ### Preset
44
+
45
+ ```ts
46
+ // Session save/load callbacks (return serialised state string):
47
+ GorillaEngine.setSessionSaveCallback((state: string) => string, instance): void;
48
+ GorillaEngine.setSessionLoadCallback((state: string) => string, instance): void;
49
+ GorillaEngine.sessionSaveLoadCallbackTimeoutMs: number; // writable, default timeout
50
+ ```
51
+
52
+ Session Dirty State
53
+
54
+ ```ts
55
+ GorillaEngine.setParametersDirty(dirty: boolean): void;
56
+ GorillaEngine.areParametersDirty(): boolean;
57
+ GorillaEngine.setParametersDirtyCallback(callback: any): void;
58
+
59
+ // Usage example
60
+ const [isPresetDirty, setIsPresetDirty] = React.useState((GorillaEngine.areParametersDirty());
61
+ React.useEffect(() => {
62
+ GorillaEngine.setParametersDirtyCallback(setIsPresetDirty);
63
+
64
+ return () => {
65
+ GorillaEngine.setParametersDirtyCallback(() => {});
66
+ };
67
+ }, []);
68
+ ```
69
+
70
+ ### Startup / Ready Signalling
71
+
72
+ ```ts
73
+ // Call before async init; then call signalReady() when done.
74
+ // Not calling signalReady() after shouldWaitForReadySignal() causes DAW hangs.
75
+ GorillaEngine.shouldWaitForReadySignal(): void;
76
+ GorillaEngine.signalReady(): void;
77
+ ```
78
+
79
+ ### Licensing (Codemeter)
80
+
81
+ ```ts
82
+ GorillaEngine.checkLicense(): boolean; // true if valid license or codemeter not enabled
83
+ GorillaEngine.isTrial(): boolean; // true if running as trial
84
+ GorillaEngine.trialExpirationTimestamp(): number; // 0 if no trial
85
+ ```
86
+
87
+ ### Error Handling
88
+
89
+ ```ts
90
+ GorillaEngine.registerUncaughtUIExceptionCallback((err: Error) => void): void;
91
+ ```
92
+
93
+ ### UI / Window Utilities
94
+
95
+ ```ts
96
+ GorillaEngine.quitApplication(): void;
97
+ GorillaEngine.openURLinBrowser(path: string): void;
98
+ GorillaEngine.updateHostDisplay(): void; // Refreshes automatable parameter list in DAW (not all DAWs)
99
+ GorillaEngine.calculateTextWidth(text: string, font: string, fontSize: number, fontKerning: number): Promise<number>;
100
+
101
+ GorillaEngine.showNativeMessageBoxSync(options: MessageBoxOptions): void;
102
+ GorillaEngine.showNativeMessageBox(options: MessageBoxOptions): Promise<void>;
103
+ // MessageBoxOptions: { title: string; message: string; iconType: "info"|"question"|"warning"|"error" }
104
+
105
+ GorillaEngine.registerEditorCallbacks(openCallback?: any, closeCallback?: any): void;
106
+ ```
107
+
108
+ ### File I/O
109
+
110
+ ```ts
111
+ GorillaEngine.openFileChooser({
112
+ allowMultiple?: boolean;
113
+ browseDirectory?: boolean;
114
+ saveDialog?: boolean;
115
+ warnOnOverwrite?: boolean;
116
+ hint?: string;
117
+ allowedExtensions?: string; // e.g. "wav;aiff"
118
+ defaultLocation?: string;
119
+ }): Promise<string[]>;
120
+
121
+ GorillaEngine.convertMp3ToWav(mp3Filepath: string, wavFilePath: string): Promise<boolean>;
122
+ ```
123
+
124
+ ### Preview Player
125
+
126
+ ```ts
127
+ const player = GorillaEngine.getPreviewPlayer(): PreviewPlayer;
128
+ player.on(eventName: string, callback: any): void;
129
+ ```
130
+
131
+ ---
132
+
133
+ ## `GorillaEngine.UI` Namespace
134
+
135
+ ```ts
136
+ // Load a YAML layout file (used by loadUI() helper in gorilla-engine-react):
137
+ GorillaEngine.UI.loadUIfromYAML(ymlPath: string): void;
138
+
139
+ // Auto-generate a generic UI from the active blob (useful for prototyping):
140
+ GorillaEngine.UI.autoGenerate(): void;
141
+
142
+ // Get a component by its id from the loaded YAML:
143
+ GorillaEngine.UI.getControlById(id: string): Component; // throws if not found
144
+
145
+ // Create the native window from a Window control:
146
+ GorillaEngine.UI.createWindow(window: Window): void;
147
+ ```
@@ -0,0 +1,250 @@
1
+ # Instrument API
2
+
3
+ ## `Blob` Interface
4
+
5
+ Obtained via `GorillaEngine.loadBlob()`. Represents a loaded `.blob` file.
6
+
7
+ ```ts
8
+ // Instrument access
9
+ blob.getInstrumentNames(): string[]; // list all instruments
10
+ blob.loadInstrument(name: string): Instrument; // throws on failure
11
+
12
+ // Resource API
13
+ // Resources are identified by UUID strings.
14
+ blob.hasResource(id: string): boolean;
15
+ blob.findResources(type: string): Array<{ id: string; type: string; description: string }>;
16
+ blob.getResourceInfo(id: string): { id: string; type: string; description: string }; // throws if not found
17
+ blob.getResourceData(id: string): string | number; // throws if not found
18
+ ```
19
+
20
+ ---
21
+
22
+ ## `Instrument` Interface
23
+
24
+ Obtained via `blob.loadInstrument()`, `useInstrument()`, or `createEmptyInstrument()`.
25
+
26
+ ### Parameter access
27
+
28
+ Parameters are accessed directly on the instrument (e.g. `instrument.volume`). Names are lowercased with spaces replaced by `_`.
29
+
30
+ To enumerate all parameters, iterate the instrument's keys and check for the property that is of interest e.g. `normValue`. The list of available properties can be found in this file under ## `InstrumentProperty` Interface. Parameters are read/write:
31
+
32
+ ```ts
33
+ values = {};
34
+ for (const key of Object.keys(instrument)) {
35
+ const prop = instrument[key];
36
+ if (prop && typeof prop.normValue === 'number') {
37
+ values[key] = prop.normValue; // read value
38
+ prop.normValue = values[key]; // write value
39
+ }
40
+ }
41
+ ```
42
+
43
+ ### Event Subscription
44
+
45
+ ```ts
46
+ instrument.on(paramName: string, handler: (normValue: number) => void): number;
47
+ // Returns 1 on success. Does NOT fire for meter parameters.
48
+
49
+ instrument.off(paramName: string, handler?: Function): number;
50
+ // Returns the number of listeners removed.
51
+ // Pass handler to remove a specific listener (returns 1 if found, 0 if not).
52
+ // Omit handler to remove all listeners for that param (returns count removed).
53
+ ```
54
+
55
+ ### Loading Status
56
+
57
+ ```ts
58
+ instrument.getLoadingStatus(): boolean;
59
+ instrument.getLoadingProgressPercent(): number;
60
+ ```
61
+
62
+ ### Parameter State Recall
63
+
64
+ ```ts
65
+ instrument.startRecallingParameterState(): void;
66
+ instrument.endRecallingParameterState(): boolean;
67
+ ```
68
+
69
+ ### Dynamic Parameters
70
+
71
+ Dynamic parameters are runtime-created automatable parameters. They appear on the instrument as `'__dynamic0'`, `'__dynamic1'`, etc.
72
+
73
+ ```ts
74
+ // Persistence flags (bitfield):
75
+ // Private = 0x000
76
+ // ShowInHost = 0x001
77
+ // SaveInSession = 0x002
78
+ // SaveInPreset = 0x004
79
+ // e.g. pass 7 (ShowInHost | SaveInSession | SaveInPreset) for a fully-visible parameter
80
+ const param = instrument.addParameter(persistence: number): DynamicParameter;
81
+
82
+ // DynamicParameter extends InstrumentProperty with:
83
+ param.connect(path: string): void; // Bind to an engine path; sets name/label from target. Throws on invalid path.
84
+ param.disconnect(): void; // Unbind; clears name/label.
85
+ // connect() and disconnect() throw if called on a non-dynamic (script) parameter.
86
+ ```
87
+
88
+ ---
89
+
90
+ ## `InstrumentProperty` Interface
91
+
92
+ Returned by direct property access (`instrument.param_name`), `useInstrumentProperty()`, or `instrument.addParameter()`.
93
+
94
+ ```ts
95
+ interface InstrumentProperty {
96
+ // Read/write
97
+ normValue: number; // Normalized value (0–1), write to update engine
98
+ value: number; // Denormalized value, write to update engine
99
+ normValueAsync: number; // Async normalized value
100
+ valueAsync: number; // Async denormalized value
101
+
102
+ // Read-only metadata
103
+ readonly defaultValue: number;
104
+ readonly minValue: number;
105
+ readonly maxValue: number;
106
+ readonly resolution: number;
107
+ readonly numSteps: number; // 0 for continuous
108
+ readonly steps: string[]; // Step labels for stepped params
109
+ readonly key: string; // Path key
110
+ readonly name: string;
111
+ readonly category: string;
112
+ readonly label: string;
113
+ readonly text: string; // Formatted display string (with unit)
114
+ readonly unit: string;
115
+ readonly controlType: string[]; // Hints: "default"|"volume"|"menu"|"onOffSwitch"|"levelMeter"|...
116
+ readonly persistence: InstrumentPropertyPersistence;
117
+ readonly metadata: string; // JSON string; empty string if no metadata. Available at runtime but not in useInstrumentProperty hook.
118
+ }
119
+
120
+ interface InstrumentPropertyPersistence {
121
+ private: boolean;
122
+ showInHost: boolean;
123
+ saveInSession: boolean;
124
+ saveInPreset: boolean;
125
+ }
126
+ ```
127
+
128
+ ### `controlType` Values
129
+
130
+ | Value | Meaning |
131
+ | --------------- | --------------------------------------------------- |
132
+ | `"default"` | Knob, slider, or drag/spin |
133
+ | `"volume"` | Audio volume (down to silence) |
134
+ | `"drag"` | Drag/spin control (small useful range) |
135
+ | `"keySelect"` | Select a MIDI note |
136
+ | `"outSelect"` | Select audio output |
137
+ | `"modSource"` | Select from mod sources |
138
+ | `"voiceGroup"` | Select from voice groups |
139
+ | `"onOffSwitch"` | Off/On toggle |
140
+ | `"switch"` | Toggle between two non-Off/On values |
141
+ | `"menu"` | Dropdown menu |
142
+ | `"levelMeter"` | Audio level meter (log scale, may be multi-channel) |
143
+ | `"meter"` | Non-audio meter |
144
+ | `"display"` | Read-only numeric/text display |
145
+ | `"text"` | Editable text |
146
+ | `"textBox"` | Multi-line editable text |
147
+ | `"array"` | Multiple values (e.g. bargraph) |
148
+ | `"waveform"` | Waveform overview |
149
+ | `"notVisible"` | Not intended for display |
150
+
151
+ ### MIDI
152
+
153
+ ```ts
154
+ instrument.noteOn(key: number, velocity: number): void; // key/velocity: 0–127
155
+ instrument.noteOff(key: number): void;
156
+
157
+ instrument.getMidiDragData(): midiData[];
158
+ // midiData: { status: string; data0: string; data1: string; tickAbsolute: string }
159
+ ```
160
+
161
+ ### MIDI CC Mapping
162
+
163
+ ```ts
164
+ type ccState = { cc: number; path: string };
165
+
166
+ // Returns current CC→parameter mappings.
167
+ instrument.getMIDICCstate(): ccState[];
168
+
169
+ // Replaces all CC mappings. Valid cc range: 1–119.
170
+ // If two entries share the same path, the last one wins.
171
+ // Throws on malformed input (missing fields, out-of-range cc, non-array, etc.).
172
+ instrument.setMIDICCstate(state: ccState[]): void;
173
+ ```
174
+
175
+ ### Audio Rendering
176
+
177
+ ```ts
178
+ instrument.renderAudioFile(
179
+ renderFilePath: string,
180
+ key: number,
181
+ velocity: number,
182
+ renderUntilSilence: boolean,
183
+ minFileLength: number,
184
+ ): void;
185
+
186
+ instrument.renderAudioFileFromMidi(
187
+ renderFilePath: string,
188
+ midiData: midiData[],
189
+ renderUntilSilence: boolean,
190
+ minFileLength: number,
191
+ ): void;
192
+ ```
193
+
194
+ ## Advanced instrument manipulation
195
+
196
+ ### Path-based Value Access
197
+
198
+ All path accessors use strings like `'Scripts/0/Volume'` or `'Groups/0/Zones/0/Sample'`.
199
+
200
+ ```ts
201
+ // Generic
202
+ instrument.getValueAtPath(path): string | object | number | Int32Array | Float64Array | boolean;
203
+
204
+ // Typed getters/setters
205
+ instrument.getDoubleAtPath(path): number | boolean;
206
+ instrument.setDoubleAtPath(path, value: number): boolean;
207
+
208
+ instrument.getNormalizedDoubleAtPath(path): number | boolean;
209
+ instrument.setNormalizedDoubleAtPath(path, value: number): boolean;
210
+
211
+ instrument.getIntAtPath(path): number | boolean;
212
+ instrument.setIntAtPath(path, value: number): boolean;
213
+
214
+ instrument.getStringAtPath(path): string;
215
+ instrument.setStringAtPath(path, value: string): boolean;
216
+
217
+ instrument.getIntArrayAtPath(path): Int32Array | boolean;
218
+ instrument.setIntArrayAtPath(path, value: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array): boolean;
219
+
220
+ instrument.getDoubleArrayAtPath(path): Float64Array | boolean;
221
+ instrument.setDoubleArrayAtPath(path, value: Float32Array | Float64Array): boolean;
222
+ ```
223
+
224
+ ### Module Access
225
+
226
+ Modules are GE engine components serialised as JSON strings.
227
+
228
+ ```ts
229
+ instrument.getModuleAtPath(path): string | boolean;
230
+ instrument.moduleAtPath(path): string | boolean; // alias for getModuleAtPath
231
+ instrument.setModuleAtPath(path, module: string): boolean;
232
+ instrument.isModuleAtPath(path): boolean;
233
+
234
+ // Insert adds at index (does NOT overwrite); indices must be contiguous:
235
+ instrument.insertModuleAtPath(path, value: string): boolean;
236
+ // Remove by path before inserting to replace:
237
+ instrument.removeModuleAtPath(path): boolean;
238
+ ```
239
+
240
+ ### Utility
241
+
242
+ ```ts
243
+ // Convert a normalised value to a display string with unit:
244
+ instrument.valueToStringAtPath(path, value: number): boolean | string;
245
+
246
+ // Waveform rendering (for geWaveform component):
247
+ instrument.getWaveformData(numPoints, zoneId, start, end): Uint8Array;
248
+ instrument.getWaveformOverview(numPoints, zoneID, start, end, vertZoom): Uint8Array;
249
+ instrument.getSampleMetadata(filePath, overviewSize): { metadata: string; overview: Uint8Array };
250
+ ```
@@ -0,0 +1,209 @@
1
+ # Visualization Controls
2
+
3
+ ## geLevelMeter
4
+
5
+ Audio level meter display.
6
+
7
+ **JSX tag:** `<geLevelMeter />`
8
+ **Interfaces:** Common, Bounds, Background, Skinnable
9
+
10
+ | Prop | Type | Description |
11
+ |------|------|-------------|
12
+ | `peakHold` | `boolean` | Display and hold highest peak |
13
+ | `logScale` | `boolean` | Use logarithmic scale |
14
+ | `fillArea` | `boolean` | Fill area below current level |
15
+ | `inverted` | `boolean` | Vertically inverted |
16
+ | `stereo` | `boolean` | Display both L/R channels |
17
+ | `positionIndicator` | `boolean` | Don't fill area below peak |
18
+ | `rampUpFactor` | `number` | Logarithmic scale threshold |
19
+ | `rampDownFactor` | `number` | Scaling factor for log mapping below threshold |
20
+ | `maxRampDownSpeed` | `number` | Max fall-back speed from peak |
21
+ | `min` / `max` | `number` | Scale bounds |
22
+ | `levelColor` | `string` | Fill color |
23
+ | `peakColor` | `string` | Peak indicator color |
24
+ | `indicatorThickness` | `number` | Indicator line thickness |
25
+ | `direction` | `string` | `"horizontal"` or `"vertical"` |
26
+ | `value` | `any` | Current meter value |
27
+
28
+ ```tsx
29
+ <geLevelMeter x={350} y={10} width={20} height={200}
30
+ direction="vertical"
31
+ logScale={true} peakHold={true} fillArea={true}
32
+ levelColor="FF44FF44" peakColor="FFFF4444"
33
+ min={-60} max={6}
34
+ bindings={{ value: 'vm.outputLevel' }}
35
+ />
36
+ ```
37
+
38
+ ---
39
+
40
+ ## geWaveform
41
+
42
+ Waveform display with optional drag zones and markers.
43
+
44
+ **JSX tag:** `<geWaveform />`
45
+ **Interfaces:** Common, Bounds, Background, Font, Clickable, Margin
46
+ **Handlers:** `onDragzonePositionChanged`
47
+
48
+ | Prop | Type | Description |
49
+ |------|------|-------------|
50
+ | `waveformColor` | `string` | Waveform draw color |
51
+ | `gradientCenterColor` | `string` | Center gradient color |
52
+ | `gradientEndColor` | `string` | End gradient color |
53
+ | `horizontalAxisColor` | `string` | Center-line color |
54
+ | `waveformUnavailableText` | `string` | Text when no waveform data |
55
+ | `waveWidth` | `number` | Width of each wave line |
56
+ | `initialXOffset` | `number` | Initial horizontal offset |
57
+ | `waveHorizontalSapcing` | `number` | Horizontal spacing between waves |
58
+ | `verticalPadding` | `number` | Vertical padding |
59
+ | `fitHeight` | `boolean` | Fit waveform to height |
60
+ | `paintCenterLine` | `boolean` | Draw center line |
61
+ | `value` | `number` | Waveform data value |
62
+ | `drawUsingLegacy` | `boolean` | Use legacy draw mode |
63
+ | `dragzone` | `object` | Drag zone config (see below) |
64
+ | `markers` | `object` | Marker config |
65
+
66
+ **Drag zone config:**
67
+ ```tsx
68
+ dragzone={{
69
+ x: 0, y: 0, x2: 100, y2: 100,
70
+ leftHandleImage: 'handle_l.png', rightHandleImage: 'handle_r.png',
71
+ backgroundColor: '40FFFFFF',
72
+ overlayColor: '20000000',
73
+ canResize: true, canPan: true, enabled: true,
74
+ }}
75
+ ```
76
+
77
+ ```tsx
78
+ <geWaveform x={10} y={10} width={400} height={150}
79
+ backgroundColor="FF111111"
80
+ waveformColor="FF44AAFF"
81
+ horizontalAxisColor="FF333333"
82
+ paintCenterLine={true}
83
+ bindings={{ value: 'vm.waveformData' }}
84
+ onDragzonePositionChanged={(pos) => handleDragZone(pos)}
85
+ />
86
+ ```
87
+
88
+ ---
89
+
90
+ ## geCurve
91
+
92
+ Curve visualization with draggable handles.
93
+
94
+ **JSX tag:** `<geCurve />`
95
+ **Interfaces:** Common, Bounds, Background, Font, Clickable
96
+
97
+ | Prop | Type | Description |
98
+ |------|------|-------------|
99
+ | `value` | `any` | The curve data |
100
+ | `paramPath` | `string` | Bound parameter path |
101
+ | `color` | `string` | Curve line color |
102
+ | `thickness` | `number` | Curve line thickness |
103
+ | `handle` | `object` | `{ value?, color?, cornerRadius?, width?, height?, visible? }` |
104
+ | `marking` | `object` | `{ color?, textColor?, thickness?, visible? }` |
105
+
106
+ ```tsx
107
+ <geCurve x={10} y={10} width={300} height={200}
108
+ backgroundColor="FF222222"
109
+ color="FF44AAFF" thickness={2}
110
+ handle={{ color: 'FFFFFFFF', width: 10, height: 10, cornerRadius: 5, visible: true }}
111
+ marking={{ color: 'FF666666', thickness: 1, visible: true }}
112
+ bindings={{ value: 'Scripts/0/FilterCurve' }}
113
+ />
114
+ ```
115
+
116
+ ---
117
+
118
+ ## geAmpEnv
119
+
120
+ ADSR envelope editor with draggable handles.
121
+
122
+ **JSX tag:** `<geAmpEnv />`
123
+ **Interfaces:** Common, Bounds, Background, Font
124
+
125
+ | Prop | Type | Description |
126
+ |------|------|-------------|
127
+ | `attack` | `Partial<AmpItem>` | Attack handle config |
128
+ | `decay` | `Partial<AmpItem>` | Decay handle config |
129
+ | `sustain` | `Partial<AmpItem>` | Sustain handle config |
130
+ | `release` | `Partial<AmpItem>` | Release handle config |
131
+ | `curve` | `object` | `{ color?, thickness? }` |
132
+
133
+ **AmpItem properties:**
134
+ | Prop | Type | Description |
135
+ |------|------|-------------|
136
+ | `color` | `string` | Handle color |
137
+ | `size` | `number` | Handle size |
138
+ | `cornerRadius` | `number` | Handle corner radius |
139
+ | `value` | `number` | Default value |
140
+ | `'value&'` | `any` | Value binding (native syntax) |
141
+ | `visible` | `boolean` | Show/hide handle |
142
+ | `imagePath` | `string` | Handle image |
143
+ | `text` | `string` | Handle label text |
144
+ | `textColor` | `string` | Handle text color |
145
+
146
+ ```tsx
147
+ <geAmpEnv x={10} y={10} width={300} height={150}
148
+ backgroundColor="FF222222"
149
+ curve={{ color: 'FF44AAFF', thickness: 2 }}
150
+ attack={{ color: 'FFFF4444', size: 8, cornerRadius: 4 }}
151
+ decay={{ color: 'FFFF8844', size: 8, cornerRadius: 4 }}
152
+ sustain={{ color: 'FF44FF44', size: 8, cornerRadius: 4 }}
153
+ release={{ color: 'FF4444FF', size: 8, cornerRadius: 4 }}
154
+ bindings={{
155
+ attack: 'Scripts/0/AmpAttack',
156
+ decay: 'Scripts/0/AmpDecay',
157
+ sustain: 'Scripts/0/AmpSustain',
158
+ release: 'Scripts/0/AmpRelease',
159
+ }}
160
+ />
161
+ ```
162
+
163
+ ---
164
+
165
+ ## geLottieAnimation
166
+
167
+ Lottie JSON animation player.
168
+
169
+ **JSX tag:** `<geLottieAnimation />`
170
+ **Interfaces:** Common, Bounds
171
+ **Handlers:** KeyableHandlers
172
+
173
+ | Prop | Type | Description |
174
+ |------|------|-------------|
175
+ | `filePath` | `string` | Path to Lottie JSON file |
176
+ | `autoplay` | `boolean` | Start playing automatically |
177
+ | `loop` | `boolean` | Loop the animation |
178
+
179
+ **Read-only properties (via ref):**
180
+ - `totalFrames`, `duration`, `currentFrame`
181
+
182
+ **Methods (via ref):**
183
+ - `play()`, `stop()`, `pause()`, `setFrame(frame)`, `setTargetFrame(frame)`
184
+ - `setFrameFromLinearTransform(value, min, max)`
185
+ - `setProperties(selector, settings)` — modify fill/stroke/transform
186
+
187
+ ```tsx
188
+ <geLottieAnimation x={10} y={10} width={200} height={200}
189
+ filePath="assets/loading.json"
190
+ autoplay={true} loop={true}
191
+ />
192
+ ```
193
+
194
+ **Controlling via ref:**
195
+ ```tsx
196
+ const animRef = useRef(null);
197
+
198
+ <geLottieAnimation ref={animRef}
199
+ x={10} y={10} width={100} height={100}
200
+ filePath="assets/indicator.json"
201
+ />
202
+
203
+ // Later:
204
+ animRef.current?.nativeHandle.setFrame(42);
205
+ animRef.current?.nativeHandle.setProperties('**', {
206
+ fillColor: [1, 0, 0],
207
+ fillOpacity: 0.5,
208
+ });
209
+ ```
@@ -0,0 +1,13 @@
1
+ .DS_Store
2
+ **/.DS_Store
3
+ src/index.yaml
4
+ node_modules/
5
+ .ge-oyster-build-workspace/
6
+ .vscode/ipch
7
+ .gorilla-engine-artifacts/
8
+ signing*Key*
9
+ jsEncryptionKey*
10
+ docs/
11
+ dist/**/*
12
+ .vscode/**
13
+ .agents/
@@ -0,0 +1,14 @@
1
+ {
2
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
3
+ "[javascript]": {
4
+ "editor.formatOnSave": true,
5
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
6
+ },
7
+
8
+ "search.exclude": {
9
+ "**/node_modules": false
10
+ },
11
+ "search.useIgnoreFiles": false,
12
+ "editor.formatOnSave": true,
13
+ "git.ignoreLimitWarning": true
14
+ }