@types/gorilla-engine 1.1.15 → 1.1.17

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.
gorilla-engine/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for gorilla-engine (https://gorilla-engin
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gorilla-engine.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 30 Jan 2024 21:35:45 GMT
11
+ * Last updated: Thu, 22 Feb 2024 16:07:11 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -22,6 +22,7 @@ declare namespace GorillaEngine.UI {
22
22
  }>;
23
23
  }
24
24
 
25
+ // tslint:disable-next-line:no-empty-interface
25
26
  interface AmpEnv extends AmpEnvProps {}
26
27
  class AmpEnv extends Component {
27
28
  constructor(options: Partial<AmpEnvProps>);
@@ -24,5 +24,6 @@ declare namespace GorillaEngine.UI {
24
24
  class BarStepEditor extends Component {
25
25
  constructor(options: Partial<BarStepEditorProps>);
26
26
  }
27
+ // tslint:disable-next-line:no-empty-interface
27
28
  interface BarStepEditor extends BarStepEditorProps {}
28
29
  }
@@ -57,6 +57,7 @@ declare namespace GorillaEngine.UI {
57
57
  subPopup: Partial<ComboBoxPopupStyles>;
58
58
  }
59
59
 
60
+ // tslint:disable-next-line:no-empty-interface
60
61
  interface ComboBox extends ComboBoxProps {}
61
62
  class ComboBox extends Component {
62
63
  onChange?: (value: number) => void;
@@ -11,6 +11,7 @@ declare namespace GorillaEngine.UI {
11
11
  onExternalDragEnd: string;
12
12
  }
13
13
 
14
+ // tslint:disable-next-line:no-empty-interface
14
15
  interface DragContainer extends DragContainerProps {}
15
16
 
16
17
  class DragContainer extends Component {
@@ -8,5 +8,6 @@ declare namespace GorillaEngine.UI {
8
8
  constructor(options: Partial<DragTargetProps>);
9
9
  }
10
10
 
11
+ // tslint:disable-next-line:no-empty-interface
11
12
  interface DragTarget extends DragTargetProps {}
12
13
  }
@@ -5,6 +5,7 @@ declare namespace GorillaEngine.UI {
5
5
  onDroppedFile: string;
6
6
  }
7
7
 
8
+ // tslint:disable-next-line:no-empty-interface
8
9
  interface DropZone extends DropZoneProps {}
9
10
 
10
11
  class DropZone extends Component {
@@ -13,6 +13,7 @@ declare namespace GorillaEngine.UI {
13
13
  maxRotation: number;
14
14
  }
15
15
 
16
+ // tslint:disable-next-line:no-empty-interface
16
17
  interface Knob extends KnobProps {}
17
18
  class Knob extends Component {
18
19
  constructor(options: Partial<KnobProps>);
@@ -13,5 +13,6 @@ declare namespace GorillaEngine.UI {
13
13
  class Label extends Component {
14
14
  constructor(options: Partial<LabelProps>);
15
15
  }
16
+ // tslint:disable-next-line:no-empty-interface
16
17
  interface Label extends LabelProps {}
17
18
  }
@@ -20,6 +20,7 @@ declare namespace GorillaEngine.UI {
20
20
  value: any;
21
21
  }
22
22
 
23
+ // tslint:disable-next-line:no-empty-interface
23
24
  interface LevelMeter extends LevelMeterProps {}
24
25
 
25
26
  class LevelMeter extends Component {
@@ -10,6 +10,7 @@ declare namespace GorillaEngine.UI {
10
10
  rowClickedAction?: string;
11
11
  }
12
12
 
13
+ // tslint:disable-next-line:no-empty-interface
13
14
  interface ListBox extends ListBoxProps {}
14
15
  class ListBox extends Component {
15
16
  constructor(options: Partial<ListBoxProps>);
@@ -32,5 +32,6 @@ declare namespace GorillaEngine.UI {
32
32
  class LottieAnimation extends Component {
33
33
  constructor(options: Partial<LottieAnimationProps>);
34
34
  }
35
+ // tslint:disable-next-line:no-empty-interface
35
36
  interface LottieAnimation extends LottieAnimationProps {}
36
37
  }
@@ -29,6 +29,7 @@ declare namespace GorillaEngine.UI {
29
29
  keys: Partial<MidiKeyboardKeys>;
30
30
  }
31
31
 
32
+ // tslint:disable-next-line:no-empty-interface
32
33
  interface MidiKeyboard extends MidiKeyboardProps {}
33
34
 
34
35
  class MidiKeyboard extends Component {
@@ -10,6 +10,7 @@ declare namespace GorillaEngine.UI {
10
10
  }>;
11
11
  }
12
12
 
13
+ // tslint:disable-next-line:no-empty-interface
13
14
  interface Pad extends PadProps {}
14
15
  class Pad extends Component {
15
16
  constructor(options: Partial<PadProps>);
@@ -5,5 +5,6 @@ declare namespace GorillaEngine.UI {
5
5
  class Rubberband extends Component {
6
6
  constructor(options: Partial<RubberbandProps>);
7
7
  }
8
+ // tslint:disable-next-line:no-empty-interface
8
9
  interface Rubberband extends RubberbandProps {}
9
10
  }
@@ -11,5 +11,6 @@ declare namespace GorillaEngine.UI {
11
11
  class ScrollView extends Component {
12
12
  constructor(options: Partial<ScrollViewProps>);
13
13
  }
14
+ // tslint:disable-next-line:no-empty-interface
14
15
  interface ScrollView extends ScrollViewProps {}
15
16
  }
@@ -133,6 +133,7 @@ declare namespace GorillaEngine.UI {
133
133
  modulations: Modulation[];
134
134
  }
135
135
 
136
+ // tslint:disable-next-line:no-empty-interface
136
137
  interface SliceEditor extends SliceEditorProps {}
137
138
 
138
139
  class SliceEditor extends Component {
@@ -17,5 +17,6 @@ declare namespace GorillaEngine.UI {
17
17
  class Slider extends Component {
18
18
  constructor(options: Partial<SliderProps>);
19
19
  }
20
+ // tslint:disable-next-line:no-empty-interface
20
21
  interface Slider extends SliderProps {}
21
22
  }
@@ -24,6 +24,7 @@ declare namespace GorillaEngine.UI {
24
24
  }>;
25
25
  }
26
26
 
27
+ // tslint:disable-next-line:no-empty-interface
27
28
  interface StepEditor extends StepEditorProps {}
28
29
  class StepEditor extends Component {
29
30
  constructor(options: Partial<StepEditorProps>);
@@ -7,5 +7,6 @@ declare namespace GorillaEngine.UI {
7
7
  class TagBrowser extends Component {
8
8
  constructor(options: Partial<TagBrowserProps>);
9
9
  }
10
+ // tslint:disable-next-line:no-empty-interface
10
11
  interface TagBrowser extends TagBrowserProps {}
11
12
  }
@@ -10,5 +10,6 @@ declare namespace GorillaEngine.UI {
10
10
  class TagEditor extends Component {
11
11
  constructor(options: Partial<TagEditorProps>);
12
12
  }
13
+ // tslint:disable-next-line:no-empty-interface
13
14
  interface TagEditor extends TagEditorProps {}
14
15
  }
@@ -23,6 +23,7 @@ declare namespace GorillaEngine.UI {
23
23
  value: boolean;
24
24
  animation: LottieAnimation;
25
25
  }
26
+ // tslint:disable-next-line:no-empty-interface
26
27
  interface Toggle extends ToggleProps {}
27
28
  class Toggle extends Component {
28
29
  constructor(options: Partial<ToggleProps>);
@@ -9,7 +9,7 @@ declare namespace GorillaEngine.UI {
9
9
  };
10
10
  animation: LottieAnimation;
11
11
  }
12
-
12
+ // tslint:disable-next-line:no-empty-interface
13
13
  interface Trigger extends TriggerProps {}
14
14
  class Trigger extends Component {
15
15
  constructor(options: Partial<TriggerProps>);
@@ -52,6 +52,7 @@ declare namespace GorillaEngine.UI {
52
52
  markers: Partial<WaveformMarker>;
53
53
  }
54
54
 
55
+ // tslint:disable-next-line:no-empty-interface
55
56
  interface Waveform extends WaveformProps {}
56
57
  class Waveform extends Component {
57
58
  constructor(options: Partial<WaveformProps>);
@@ -6,6 +6,7 @@ declare namespace GorillaEngine.UI {
6
6
  uiScaleMin: number;
7
7
  uiScaleMax: number;
8
8
  }
9
+ // tslint:disable-next-line:no-empty-interface
9
10
  interface Window extends WindowProps {}
10
11
  class Window extends Component {
11
12
  constructor(options: Partial<WindowProps>);
@@ -12,6 +12,7 @@ declare namespace GorillaEngine.UI {
12
12
  thumbImage: string;
13
13
  }
14
14
 
15
+ // tslint:disable-next-line:no-empty-interface
15
16
  interface XYPad extends XYPadProps {}
16
17
  class XYPad extends Component {
17
18
  constructor(options: Partial<XYPadProps>);
gorilla-engine/index.d.ts CHANGED
@@ -94,11 +94,40 @@ declare namespace GorillaEngine {
94
94
  * Its steps if it's a stepped paramter
95
95
  */
96
96
  readonly steps: string[];
97
+ /**
98
+ * Hint for the best type of UI control for this parameter:
99
+ * "default": usually a knob, could also be a slider or drag/spin control
100
+ * "volume": audio volume control down to silence, often a vertical slider but could be horizontal or a knob
101
+ * "drag": more suited to a drag/spin control because usually only a small part of the range is used
102
+ * "keySelect": select a MIDI note
103
+ * "outSelect": select an audio output (zero for default, negative values for internal busses)
104
+ * "modSource": select from a list of mod sources (where mod source names should be inserted instead of numbers)
105
+ * "voiceGroup": select from a list of voice groups (where voice group names should be inserted instead of numbers)
106
+ * (the above types can fall back to e.g. ControlTypeDrag if no special behaviour is implemented for them in the UI)
107
+ * "onOffSwitch": toggle between Off/On (could be a power switch or \"Bypass\" or \"Solo\" etc. - see parameter name)
108
+ * "switch": toggle between two values that are not Off/On, could also be displayed as a menu
109
+ * "menu": dropdown menu, could also be a multi-way switch or a stepped knob if there are not many steps
110
+ * "levelMeter": audio level meter: display should apply log scaling (may have multiple channels)
111
+ * "meter": meter that may be showing something other than audio level (may have multiple channels)
112
+ * "display": numeric or text display: value is not user editable
113
+ * "text": editable text
114
+ * "textBox": multi-line text with at least copy/paste of the whole text, if not full editing
115
+ * "array": edit multiple values e.g. as a bargraph
116
+ * "waveform": display a waveform overview
117
+ * "notVisible": not intended for display to the user
118
+ */
119
+ readonly controlType: string[];
97
120
  readonly persistence: InstrumentPropertyPersistence;
98
121
  }
99
122
 
100
123
  interface ccState {
124
+ /**
125
+ * MIDI CC number in the range of 1-119
126
+ */
101
127
  cc: number;
128
+ /**
129
+ * Path in the instrument, e.g. `Scripts/0/Volume`
130
+ */
102
131
  path: string;
103
132
  }
104
133
 
@@ -113,7 +142,23 @@ declare namespace GorillaEngine {
113
142
  * Instrument
114
143
  */
115
144
  interface Instrument {
116
- on(propName: string, handler: (normValue: number) => void): void;
145
+ /**
146
+ * Attach an event listener to an instrument parameter. Whenever the instrument parameter
147
+ * changes the callback will be called with the current normalized value of the parameter.
148
+ * Does not trigger for meter parameters.
149
+ * @param paramName the instrument parameter name
150
+ * @param handler the callback
151
+ * @returns `1` when the handler was successfully attached
152
+ */
153
+ on(paramName: string, handler: (normValue: number) => void): number;
154
+ /**
155
+ * Dettach one or multiple event listeners for an instrument parameter. Pass in a reference
156
+ * to the callback to remove a specific listener. If no callback is passed then all listeners
157
+ * for that parameter are removed
158
+ * @param paramName
159
+ * @returns the number of removed listeners
160
+ */
161
+ off(paramName: string, handler?: (normValue: number) => void): number;
117
162
  /**
118
163
  * Method used to retrieve a serialised module from the Gorilla Engine.
119
164
  *
@@ -256,21 +301,21 @@ declare namespace GorillaEngine {
256
301
  removeModuleAtPath(path: string): boolean;
257
302
 
258
303
  /**
259
- * Method used to set a normalised double at a ceterain path in the Gorilla Engine.
304
+ * Method used to set a normalized double at a ceterain path in the Gorilla Engine.
260
305
  *
261
306
  * @param path The path to the normalised double that should be set.
262
307
  * @param value The normalised double that should be set at the given `path`.
263
308
  * @returns `true` if the value has been set succcessfully or `false` otherwise.
264
309
  */
265
- setNormalisedDoubleAtPath(path: string, value: number): boolean;
310
+ setNormalizedDoubleAtPath(path: string, value: number): boolean;
266
311
 
267
312
  /**
268
- * Method used to retrieve a normalised double from the Gorilla Engine.
313
+ * Method used to retrieve a normalized double from the Gorilla Engine.
269
314
  *
270
- * @param path The path to the normalised double should be retrieved.
315
+ * @param path The path to the normalised double that should be retrieved.
271
316
  * @returns The normalised double found at the given `path` or `false` if nothing was found.
272
317
  */
273
- getNormalisedDoubleAtPath(): number | boolean;
318
+ getNormalizedDoubleAtPath(): number | boolean;
274
319
 
275
320
  /**
276
321
  * Method used to retrieve MIDI data from the first instrument script that implements `on midi_drag`
@@ -306,8 +351,23 @@ declare namespace GorillaEngine {
306
351
  */
307
352
  valueToStringAtPath(path: string, value: number): boolean | string;
308
353
 
354
+ /**
355
+ * Method used to retrieve a string from the Gorilla Engine.
356
+ * @param path The path to the string that should be retrieved.
357
+ * @returns the string found at the given `path` or `false` if nothing was found.
358
+ */
359
+ getStringAtPath(path: string): string;
360
+
361
+ /**
362
+ * Get the current MIDI CC state
363
+ * @returns an array of MIDI CC to instrument path mappings
364
+ */
309
365
  getMIDICCstate(): ccState[];
310
366
 
367
+ /**
368
+ * Set the MIDI CC state
369
+ * @param ccMidiSatate an array of MIDI CC to instrument path mappings
370
+ */
311
371
  setMIDICCstate(ccMidiSatate: ccState[]): void;
312
372
 
313
373
  renderAudioFile(
@@ -325,10 +385,6 @@ declare namespace GorillaEngine {
325
385
  minFileLength: number,
326
386
  ): void;
327
387
 
328
- setNormalizedDoubleAtPath(path: string, value: number): void;
329
-
330
- getNormalizedDoubleAtPath(path: string): number;
331
-
332
388
  getLoadingStatus(): boolean;
333
389
 
334
390
  getLoadingProgressPercent(): number;
@@ -337,6 +393,15 @@ declare namespace GorillaEngine {
337
393
 
338
394
  endRecallingParameterState(): boolean;
339
395
 
396
+ /**
397
+ * Add an unconnected dynamic parameter.
398
+ * Persistence flags:
399
+ * Private = 0x000
400
+ * ShowInHost = 0x001
401
+ * SaveInSession = 0x002
402
+ * SaveInPreset = 0x004
403
+ * @param persistence the or'd persistence flags of the parameter
404
+ */
340
405
  addParameter(persistence: number): InstrumentProperty;
341
406
 
342
407
  getWaveformOverview(
@@ -347,13 +412,18 @@ declare namespace GorillaEngine {
347
412
  vertZoom: number,
348
413
  ): Uint8Array;
349
414
 
350
- getStringAtPath(path: string): string;
351
-
352
415
  getSampleMetadata(filePath: string, overviewSize: number): { metadata: string; overview: Uint8Array };
353
416
  }
354
417
 
355
418
  interface Blob {
419
+ /**
420
+ * Load the specified instrument
421
+ * @param name the name of the instrument to load
422
+ */
356
423
  loadInstrument(name: string): Instrument;
424
+ /**
425
+ * List all instrument names contained in this blob
426
+ */
357
427
  getInstrumentNames(): string[];
358
428
  }
359
429
 
@@ -362,12 +432,22 @@ declare namespace GorillaEngine {
362
432
  }
363
433
 
364
434
  function registerUncaughtUIExceptionCallback(handler: (err: Error) => void): void;
435
+ /**
436
+ * Get the platform specific path where all the resources (assets, blobs, etc.) have
437
+ * been installed to.
438
+ * @returns the resource path
439
+ */
365
440
  function getResourcePath(): string;
366
441
  function getPluginName(): string;
367
442
  function getPluginType(): string;
368
443
  function getPluginPath(): string;
369
- function quitApplication(): void;
370
444
  function getManufacturerName(): string;
445
+ function quitApplication(): void;
446
+ /**
447
+ * Load blob at the specified path
448
+ * @param blobPath the load blob
449
+ * @throws if the blob could not be loaded e.g. it is not there or decryption failed
450
+ */
371
451
  function loadBlob(blobPath: string): Blob;
372
452
  function getPluginNRTB(enable: boolean): void;
373
453
  /**
@@ -387,19 +467,52 @@ declare namespace GorillaEngine {
387
467
  function showNativeMessageBoxSync(options: MessageBoxOptions): void;
388
468
  function showNativeMessageBox(options: MessageBoxOptions): Promise<void>;
389
469
  function calculateTextWidth(text: string, font: string, fontSize: number, fontKerning: number): Promise<number>;
470
+ /**
471
+ * If Codemeter is enabled this will check if a valid license is available. If it is
472
+ * then the MIDI and Audio will automatically be enabled if they were disabled.
473
+ * @returns `true` if a valid license has been found *or* codemeter is not enabled, `false` otherwise
474
+ */
390
475
  function checkLicense(): boolean;
391
- function checkBeatportRTO(): string;
476
+ /**
477
+ * If Codemeter is enabled this will indicate if the license checked with {@link checkLicense} is
478
+ * a trial license
479
+ * @returns `true` if it is a trial license, `false` if it isn't *or* codemeter is not enabled
480
+ */
392
481
  function isTrial(): boolean;
482
+ /**
483
+ * If Codemeter is enabled this can be used to query the expiration timestamp of the running trial
484
+ * @returns the timestamp when the trial expires. If there is no trial or codemeter is not enabled
485
+ * this will return `0`
486
+ */
393
487
  function trialExpirationTimestamp(): number;
488
+ function checkBeatportRTO(): string;
394
489
  function initialiseSpliceRTO(pluginName?: string): any;
395
490
  function disposeInstrument(instrument: Instrument): void;
491
+ /**
492
+ * Activates an instrument, i.e. route MIDI to the instrument and send Audio from the isntrument to
493
+ * the DAW. Currently only one instrument can be active. If there was
494
+ * another instrument active before, it will get deativated.
495
+ * @param instrument the instrument activate
496
+ */
396
497
  function setActiveInstrument(instrument: Instrument): void;
498
+ /**
499
+ * Create an empty dummy instrument. It can be modified with e.g. {@link Instrument.setModuleAtPath}
500
+ * @returns the empty instrument.
501
+ */
397
502
  function createEmptyInstrument(): Instrument;
398
503
  function setSessionSaveCallback(callback: (state: string) => string, instance: any): void;
399
504
  function setSessionLoadCallback(callback: (state: string) => string, instance: any): void;
400
505
  function setParametersDirty(dirty: boolean): void;
401
506
  function areParametersDirty(): boolean;
507
+ /**
508
+ * Set this flag to indicate that {@link signalReady} will be called once the plugin
509
+ * initialization has completed.
510
+ */
402
511
  function shouldWaitForReadySignal(): void;
512
+ /**
513
+ * Signal that the initialization is done. If this is not called although {@link shouldWaitForReadySignal}
514
+ * has been called, then this will cause all sorts of problmes like hanging or half working DAWs
515
+ */
403
516
  function signalReady(): void;
404
517
  function setParametersDirtyCallback(callback: any): void;
405
518
  function getBuildInformation(): any;
@@ -432,8 +545,26 @@ declare namespace GorillaEngine {
432
545
  let sessionSaveLoadCallbackTimeoutMs: number;
433
546
 
434
547
  namespace UI {
548
+ /**
549
+ * Load a UI laid out in a yaml file
550
+ * @param ymlPath The path to yaml layout file
551
+ */
435
552
  function loadUIfromYAML(ymlPath: string): void;
553
+ /**
554
+ * Auto generate a generic UI based on the activate blob. Useful for prototyping
555
+ */
556
+ function autoGenerate(): void;
557
+ /**
558
+ * Get the control with the given id.
559
+ * @param id The id of the control
560
+ * @returns the control
561
+ * @throws when there is no control with the specified id
562
+ */
436
563
  function getControlById(id: string): Component;
564
+ /**
565
+ * Creates the window based on the passed in window control {@link GorillaEngine.UI.Window}.
566
+ * @param window the window to show
567
+ */
437
568
  function createWindow(window: Window): void;
438
569
  }
439
570
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/gorilla-engine",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "TypeScript definitions for gorilla-engine",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gorilla-engine",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "e0d162a02e883cbb186e54f77250d7ea5d1c34d47c18e5b6d839f7fc8c61cd61",
48
+ "typesPublisherContentHash": "27b30f376d60074704e9d017e48e6935268e2a7986fc6b24ba4d16eaa759f5dd",
49
49
  "typeScriptVersion": "4.6",
50
50
  "nonNpm": true
51
51
  }