@types/gorilla-engine 1.1.14 → 1.1.16

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: Wed, 13 Dec 2023 12:09:50 GMT
11
+ * Last updated: Tue, 20 Feb 2024 14:06:57 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
@@ -98,7 +98,13 @@ declare namespace GorillaEngine {
98
98
  }
99
99
 
100
100
  interface ccState {
101
+ /**
102
+ * MIDI CC number in the range of 1-119
103
+ */
101
104
  cc: number;
105
+ /**
106
+ * Path in the instrument, e.g. `Scripts/0/Volume`
107
+ */
102
108
  path: string;
103
109
  }
104
110
 
@@ -113,7 +119,23 @@ declare namespace GorillaEngine {
113
119
  * Instrument
114
120
  */
115
121
  interface Instrument {
116
- on(propName: string, handler: (normValue: number) => void): void;
122
+ /**
123
+ * Attach an event listener to an instrument parameter. Whenever the instrument parameter
124
+ * changes the callback will be called with the current normalized value of the parameter.
125
+ * Does not trigger for meter parameters.
126
+ * @param paramName the instrument parameter name
127
+ * @param handler the callback
128
+ * @returns `1` when the handler was successfully attached
129
+ */
130
+ on(paramName: string, handler: (normValue: number) => void): number;
131
+ /**
132
+ * Dettach one or multiple event listeners for an instrument parameter. Pass in a reference
133
+ * to the callback to remove a specific listener. If no callback is passed then all listeners
134
+ * for that parameter are removed
135
+ * @param paramName
136
+ * @returns the number of removed listeners
137
+ */
138
+ off(paramName: string, handler?: (normValue: number) => void): number;
117
139
  /**
118
140
  * Method used to retrieve a serialised module from the Gorilla Engine.
119
141
  *
@@ -256,21 +278,21 @@ declare namespace GorillaEngine {
256
278
  removeModuleAtPath(path: string): boolean;
257
279
 
258
280
  /**
259
- * Method used to set a normalised double at a ceterain path in the Gorilla Engine.
281
+ * Method used to set a normalized double at a ceterain path in the Gorilla Engine.
260
282
  *
261
283
  * @param path The path to the normalised double that should be set.
262
284
  * @param value The normalised double that should be set at the given `path`.
263
285
  * @returns `true` if the value has been set succcessfully or `false` otherwise.
264
286
  */
265
- setNormalisedDoubleAtPath(path: string, value: number): boolean;
287
+ setNormalizedDoubleAtPath(path: string, value: number): boolean;
266
288
 
267
289
  /**
268
- * Method used to retrieve a normalised double from the Gorilla Engine.
290
+ * Method used to retrieve a normalized double from the Gorilla Engine.
269
291
  *
270
- * @param path The path to the normalised double should be retrieved.
292
+ * @param path The path to the normalised double that should be retrieved.
271
293
  * @returns The normalised double found at the given `path` or `false` if nothing was found.
272
294
  */
273
- getNormalisedDoubleAtPath(): number | boolean;
295
+ getNormalizedDoubleAtPath(): number | boolean;
274
296
 
275
297
  /**
276
298
  * Method used to retrieve MIDI data from the first instrument script that implements `on midi_drag`
@@ -306,8 +328,23 @@ declare namespace GorillaEngine {
306
328
  */
307
329
  valueToStringAtPath(path: string, value: number): boolean | string;
308
330
 
331
+ /**
332
+ * Method used to retrieve a string from the Gorilla Engine.
333
+ * @param path The path to the string that should be retrieved.
334
+ * @returns the string found at the given `path` or `false` if nothing was found.
335
+ */
336
+ getStringAtPath(path: string): string;
337
+
338
+ /**
339
+ * Get the current MIDI CC state
340
+ * @returns an array of MIDI CC to instrument path mappings
341
+ */
309
342
  getMIDICCstate(): ccState[];
310
343
 
344
+ /**
345
+ * Set the MIDI CC state
346
+ * @param ccMidiSatate an array of MIDI CC to instrument path mappings
347
+ */
311
348
  setMIDICCstate(ccMidiSatate: ccState[]): void;
312
349
 
313
350
  renderAudioFile(
@@ -325,10 +362,6 @@ declare namespace GorillaEngine {
325
362
  minFileLength: number,
326
363
  ): void;
327
364
 
328
- setNormalizedDoubleAtPath(path: string, value: number): void;
329
-
330
- getNormalizedDoubleAtPath(path: string): number;
331
-
332
365
  getLoadingStatus(): boolean;
333
366
 
334
367
  getLoadingProgressPercent(): number;
@@ -337,6 +370,15 @@ declare namespace GorillaEngine {
337
370
 
338
371
  endRecallingParameterState(): boolean;
339
372
 
373
+ /**
374
+ * Add an unconnected dynamic parameter.
375
+ * Persistence flags:
376
+ * Private = 0x000
377
+ * ShowInHost = 0x001
378
+ * SaveInSession = 0x002
379
+ * SaveInPreset = 0x004
380
+ * @param persistence the or'd persistence flags of the parameter
381
+ */
340
382
  addParameter(persistence: number): InstrumentProperty;
341
383
 
342
384
  getWaveformOverview(
@@ -347,13 +389,18 @@ declare namespace GorillaEngine {
347
389
  vertZoom: number,
348
390
  ): Uint8Array;
349
391
 
350
- getStringAtPath(path: string): string;
351
-
352
392
  getSampleMetadata(filePath: string, overviewSize: number): { metadata: string; overview: Uint8Array };
353
393
  }
354
394
 
355
395
  interface Blob {
396
+ /**
397
+ * Load the specified instrument
398
+ * @param name the name of the instrument to load
399
+ */
356
400
  loadInstrument(name: string): Instrument;
401
+ /**
402
+ * List all instrument names contained in this blob
403
+ */
357
404
  getInstrumentNames(): string[];
358
405
  }
359
406
 
@@ -362,12 +409,22 @@ declare namespace GorillaEngine {
362
409
  }
363
410
 
364
411
  function registerUncaughtUIExceptionCallback(handler: (err: Error) => void): void;
412
+ /**
413
+ * Get the platform specific path where all the resources (assets, blobs, etc.) have
414
+ * been installed to.
415
+ * @returns the resource path
416
+ */
365
417
  function getResourcePath(): string;
366
418
  function getPluginName(): string;
367
419
  function getPluginType(): string;
368
420
  function getPluginPath(): string;
369
- function quitApplication(): void;
370
421
  function getManufacturerName(): string;
422
+ function quitApplication(): void;
423
+ /**
424
+ * Load blob at the specified path
425
+ * @param blobPath the load blob
426
+ * @throws if the blob could not be loaded e.g. it is not there or decryption failed
427
+ */
371
428
  function loadBlob(blobPath: string): Blob;
372
429
  function getPluginNRTB(enable: boolean): void;
373
430
  /**
@@ -387,19 +444,52 @@ declare namespace GorillaEngine {
387
444
  function showNativeMessageBoxSync(options: MessageBoxOptions): void;
388
445
  function showNativeMessageBox(options: MessageBoxOptions): Promise<void>;
389
446
  function calculateTextWidth(text: string, font: string, fontSize: number, fontKerning: number): Promise<number>;
447
+ /**
448
+ * If Codemeter is enabled this will check if a valid license is available. If it is
449
+ * then the MIDI and Audio will automatically be enabled if they were disabled.
450
+ * @returns `true` if a valid license has been found *or* codemeter is not enabled, `false` otherwise
451
+ */
390
452
  function checkLicense(): boolean;
391
- function checkBeatportRTO(): string;
453
+ /**
454
+ * If Codemeter is enabled this will indicate if the license checked with {@link checkLicense} is
455
+ * a trial license
456
+ * @returns `true` if it is a trial license, `false` if it isn't *or* codemeter is not enabled
457
+ */
392
458
  function isTrial(): boolean;
459
+ /**
460
+ * If Codemeter is enabled this can be used to query the expiration timestamp of the running trial
461
+ * @returns the timestamp when the trial expires. If there is no trial or codemeter is not enabled
462
+ * this will return `0`
463
+ */
393
464
  function trialExpirationTimestamp(): number;
465
+ function checkBeatportRTO(): string;
394
466
  function initialiseSpliceRTO(pluginName?: string): any;
395
467
  function disposeInstrument(instrument: Instrument): void;
468
+ /**
469
+ * Activates an instrument, i.e. route MIDI to the instrument and send Audio from the isntrument to
470
+ * the DAW. Currently only one instrument can be active. If there was
471
+ * another instrument active before, it will get deativated.
472
+ * @param instrument the instrument activate
473
+ */
396
474
  function setActiveInstrument(instrument: Instrument): void;
475
+ /**
476
+ * Create an empty dummy instrument. It can be modified with e.g. {@link Instrument.setModuleAtPath}
477
+ * @returns the empty instrument.
478
+ */
397
479
  function createEmptyInstrument(): Instrument;
398
480
  function setSessionSaveCallback(callback: (state: string) => string, instance: any): void;
399
481
  function setSessionLoadCallback(callback: (state: string) => string, instance: any): void;
400
482
  function setParametersDirty(dirty: boolean): void;
401
483
  function areParametersDirty(): boolean;
484
+ /**
485
+ * Set this flag to indicate that {@link signalReady} will be called once the plugin
486
+ * initialization has completed.
487
+ */
402
488
  function shouldWaitForReadySignal(): void;
489
+ /**
490
+ * Signal that the initialization is done. If this is not called although {@link shouldWaitForReadySignal}
491
+ * has been called, then this will cause all sorts of problmes like hanging or half working DAWs
492
+ */
403
493
  function signalReady(): void;
404
494
  function setParametersDirtyCallback(callback: any): void;
405
495
  function getBuildInformation(): any;
@@ -432,8 +522,26 @@ declare namespace GorillaEngine {
432
522
  let sessionSaveLoadCallbackTimeoutMs: number;
433
523
 
434
524
  namespace UI {
525
+ /**
526
+ * Load a UI laid out in a yaml file
527
+ * @param ymlPath The path to yaml layout file
528
+ */
435
529
  function loadUIfromYAML(ymlPath: string): void;
530
+ /**
531
+ * Auto generate a generic UI based on the activate blob. Useful for prototyping
532
+ */
533
+ function autoGenerate(): void;
534
+ /**
535
+ * Get the control with the given id.
536
+ * @param id The id of the control
537
+ * @returns the control
538
+ * @throws when there is no control with the specified id
539
+ */
436
540
  function getControlById(id: string): Component;
541
+ /**
542
+ * Creates the window based on the passed in window control {@link GorillaEngine.UI.Window}.
543
+ * @param window the window to show
544
+ */
437
545
  function createWindow(window: Window): void;
438
546
  }
439
547
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/gorilla-engine",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
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,6 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "7f50468200354f64b8b558be5061d3dc879811a2a46ebac88c9e87dd8263a31f",
49
- "typeScriptVersion": "4.6"
48
+ "typesPublisherContentHash": "a7809b080ad82089f36d68049b68350be363645fdfc0692e1c51fa745766c3d2",
49
+ "typeScriptVersion": "4.6",
50
+ "nonNpm": true
50
51
  }