-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBitwigControllerApi.d.ts
More file actions
5688 lines (5586 loc) · 228 KB
/
BitwigControllerApi.d.ts
File metadata and controls
5688 lines (5586 loc) · 228 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare function loadAPI(val: number): void;
declare function println(s : string) : void;
declare function load(file: string) : void;
declare var host : Host;
declare enum CursorNavigationMode {
NESTED = 0,
FLAT,
GUI,
}
/**
* Instances of this interface represent actions in Bitwig Studio, such as commands that
* can be launched from the main menu or via keyboard shortcuts.
*
* To receive the list of all actions provided by Bitwig Studio call {@link Application#getActions()}.
* The list of actions that belong to a certain category can be queried by calling {@link ActionCategory#getActions()}.
* Access to specific actions is provided in {@link Application#getAction(String)}.
*
* @since Bitwig Studio 1.1
*/
interface Action {
/**
* Returns a string the identifies this action uniquely.
*
* @return {string} the identifier string
* @since Bitwig Studio 1.1
*/
getId() : string,
/**
* Returns the name of this action.
*
* @return {string} the name string
* @since Bitwig Studio 1.1
*/
getName() : string,
/**
* Returns the category of this action.
*
* @return {ActionCategory} the category string
* @since Bitwig Studio 1.1
*/
getCategory() : ActionCategory,
/**
* Returns the text that is displayed in menu items associated with this action.
*
* @return {string} the menu item text
* @since Bitwig Studio 1.1
*/
getMenuItemText() : string,
/**
* Invokes the action.
*
* @since Bitwig Studio 1.1
*/
invoke() : void
}
/**
* Instances of this interface are used to categorize actions in Bitwig Studio.
* The list of action categories provided by Bitwig Studio can be queried by calling
* {@link Application#getActionCategories()}. To receive a specific action category
* call {@link Application#getActionCategory(String)}.
*
* @see Application#getActionCategories()
* @see Application#getActionCategory(String)
* @since Bitwig Studio 1.1
*/
interface ActionCategory {
/**
* Returns a string the identifies this action category uniquely.
*
* @return {string} the identifier string
* @since Bitwig Studio 1.1
*/
getId() : string,
/**
* Returns the name of this action category.
*
* @return {string} the name string
* @since Bitwig Studio 1.1
*/
getName() : string,
/**
* Lists all actions in this category.
*
* @return {Action[]} the array of actions in this category
* @throws ControlSurfaceException
* @since Bitwig Studio 1.1
*/
getActions() : Action[]
}
/**
* An interface that provides methods for accessing the most common global application commands.<br/>
*
* In addition, functions are provided for accessing any application action in a generic and categorized way,
* pretty much as displayed in the Bitwig Studio commander dialog (see {@link #getActions()},
* {@link #getAction(String)}, {@link #getActionCategories()}), {@link #getActionCategory(String)}).<br/>
*
* To receive an instance of the application interface call {@link Host#createApplication()}.
*
* @since Bitwig Studio 1.0
*/
interface Application {
/**
* Creates a new audio track at the given position.
*
* @param {int} position the index within the list of main tracks where the new track should be inserted, or `-1` in case
the track should be inserted at the end of the list. Values outside the valid range will get
pinned to the valid range, so the actual position might be different from the provided
parameter value.
* @since Bitwig Studio 1.1
*/
createAudioTrack(position : number) : void,
/**
* Creates a new instrument track at the given position.
*
* @param {int} position the index within the list of main tracks where the new track should be inserted, or `-1` in case
the track should be inserted at the end of the list. Values outside the valid range will get
pinned to the valid range, so the actual position might be different from the provided
parameter value.
* @since Bitwig Studio 1.1
*/
createInstrumentTrack(position : number) : void,
/**
* Creates a new effect track at the given position.
*
* @param {int} position the index within the list of effect tracks where the new track should be inserted, or `-1` in case
the track should be inserted at the end of the list. Values outside the valid range will get
pinned to the valid range, so the actual position might be different from the provided
parameter value.
* @since Bitwig Studio 1.1
*/
createEffectTrack(position : number) : void,
/**
* Returns a list of actions that the application supports. Actions are commands in Bitwig Studio that
* are typically accessible through menus or keyboard shortcuts.
*
* Please note that many of the commands encapsulated by the reported actions are also accessible through other
* (probably more convenient) interfaces methods of the API. In contrast to that, this method provides a more
* generic way to find available application functionality.
*
* @return {Action[]} the list of actions
* @throws ControlSurfaceException
* @since Bitwig Studio 1.1
*/
getActions() : Action[],
/**
* Returns the action for the given action identifier. For a list of available actions, see {@link #getActions()}.
*
* @param {string} id the action identifier string, must not be `null`
* @return {Action} the action associated with the given id, or null in case there is no action with the given identifier.
* @throws ControlSurfaceException
* @since Bitwig Studio 1.1
*/
getAction(id : string) : Action,
/**
* Returns a list of action categories that is used by Bitwig Studio to group actions into categories.
*
* @return {ActionCategory[]} the list of action categories
* @throws ControlSurfaceException
* @since Bitwig Studio 1.1
*/
getActionCategories() : ActionCategory[],
/**
* Returns the action category associated with the given identifier.
* For a list of available action categories, see {@link #getActionCategories()}.
*
* @param {string} id the category identifier string, must not be `null`
* @return {ActionCategory} the action associated with the given id, or null in case there is no category with the given identifier
* @throws ControlSurfaceException
* @since Bitwig Studio 1.1
*/
getActionCategory(id : string) : ActionCategory,
/**
* Activates the audio engine in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
activateEngine() : void,
/**
* Deactivates the audio engine in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
deactivateEngine() : void,
/**
* Registers an observer that gets called when the audio engine becomes active or inactive.
*
* @param {function} callable a callback function that accepts a single boolean parameter. The callback parameter
indicates whether the audio engine became active (true) or inactive (false).
* @since Bitwig Studio 1.0
*/
addHasActiveEngineObserver(callable : (engineactive : boolean) => void) : void,
/**
* Registers an observer that reports the name of the current project.
*
* @param {function} callback a callback function that accepts a single string parameter.
* @param {int} maxChars the maximum length of the reported name. Longer names will get truncated.
* @since Bitwig Studio 1.1
*/
addProjectNameObserver(callback : (name : string) => void, maxChars : number) : void,
/**
* Switches to the next project tab in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
nextProject() : void,
/**
* Switches to the previous project tab in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
previousProject() : void,
/**
* Sends an undo command to Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
undo() : void,
/**
* Sends a redo command to Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
redo() : void,
/**
* Switches the Bitwig Studio user interface to the panel layout with the given name.
* The list of available panel layouts depends on the active display profile.
*
* @param {string} panelLayout the name of the new panel layout
* @since Bitwig Studio 1.1
*/
setPanelLayout(panelLayout : string) : void,
/**
* Switches to the next panel layout of the active display profile in Bitwig Studio.
*
* @since Bitwig Studio 1.1
*/
nextPanelLayout() : void,
/**
* Switches to the previous panel layout of the active display profile in Bitwig Studio.
*
* @since Bitwig Studio 1.1
*/
previousPanelLayout() : void,
/**
* Registers an observer that reports the name of the active panel layout.
*
* @param {function} callable a callback function object that accepts a single string parameter
* @param {int} maxChars the maximum length of the panel layout name
* @since Bitwig Studio 1.1
*/
addPanelLayoutObserver(callable : (layoutName : string) => void, maxChars : number) : void,
/**
* Registers an observer that reports the name of the active display profile.
*
* @param {function} callable a callback function object that accepts a single string parameter
* @param {int} maxChars the maximum length of the display profile name
* @since Bitwig Studio 1.1
*/
addDisplayProfileObserver(callable : (profileName : string) => void, maxChars : number) : void,
/**
* Toggles the visibility of the inspector panel.
*
* @since Bitwig Studio 1.1
*/
toggleInspector() : void,
/**
* Toggles the visibility of the device chain panel.
*
* @since Bitwig Studio 1.0
*/
toggleDevices() : void,
/**
* Toggles the visibility of the mixer panel.
*
* @since Bitwig Studio 1.0
*/
toggleMixer() : void,
/**
* Toggles the visibility of the note editor panel.
*
* @since Bitwig Studio 1.0
*/
toggleNoteEditor() : void,
/**
* Toggles the visibility of the automation editor panel.
*
* @since Bitwig Studio 1.0
*/
toggleAutomationEditor() : void,
/**
* Toggles the visibility of the browser panel.
*
* @since Bitwig Studio 1.0
*/
toggleBrowserVisibility() : void,
/**
* Equivalent to an Arrow-Left key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
arrowKeyLeft() : void,
/**
* Equivalent to an Arrow-Right key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
arrowKeyRight() : void,
/**
* Equivalent to an Arrow-Up key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
arrowKeyUp() : void,
/**
* Equivalent to an Arrow-Down key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
arrowKeyDown() : void,
/**
* Equivalent to an Enter key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
enter() : void,
/**
* Equivalent to an Escape key stroke on the computer keyboard.
* The concrete functionality depends on the current keyboard focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
escape() : void,
/**
* Selects all items according the current selection focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
selectAll() : void,
/**
* Deselects any items according the current selection focus in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
selectNone() : void,
/**
* Cuts the selected items in Bitwig Studio if applicable.
*
* @since Bitwig Studio 1.0
*/
cut() : void,
/**
* Copies the selected items in Bitwig Studio to the clipboard if applicable.
*
* @since Bitwig Studio 1.0
*/
copy() : void,
/**
* Pastes the clipboard contents into the current selection focus in Bitwig Studio if applicable.
*
* @since Bitwig Studio 1.0
*/
paste() : void,
/**
* Duplicates the active selection in Bitwig Studio if applicable.
*
* @since Bitwig Studio 1.0
*/
duplicate() : void,
/**
* Deletes the selected items in Bitwig Studio if applicable. Originally this function was called
* `delete` (Bitwig Studio 1.0). But as `delete` is reserved in JavaScript this function got renamed to `remove`
* in Bitwig Studio 1.0.9.
*
* @since Bitwig Studio 1.0.9
*/
remove() : void,
/**
* Opens a text input field in Bitwig Studio for renaming the selected item.
*
* @since Bitwig Studio 1.0
*/
rename() : void,
/**
* Zooms in one step into the currently focused editor of the Bitwig Studio user interface.
*
* @since Bitwig Studio 1.0
*/
zoomIn() : void,
/**
* Zooms out one step in the currently focused editor of the Bitwig Studio user interface.
*
* @since Bitwig Studio 1.0
*/
zoomOut() : void,
/**
* Adjusts the zoom level of the currently focused editor so that it matches the active selection.
*
* @since Bitwig Studio 1.0
*/
zoomToSelection() : void,
/**
* Adjusts the zoom level of the currently focused editor so that all content becomes visible.
*
* @since Bitwig Studio 1.0
*/
zoomToFit() : void,
/**
* Moves the panel focus to the panel on the left of the currently focused panel.
*
* @since Bitwig Studio 1.0
*/
focusPanelToLeft() : void,
/**
* Moves the panel focus to the panel right to the currently focused panel.
*
* @since Bitwig Studio 1.0
*/
focusPanelToRight() : void,
/**
* Moves the panel focus to the panel above the currently focused panel.
*
* @since Bitwig Studio 1.0
*/
focusPanelAbove() : void,
/**
* Moves the panel focus to the panel below the currently focused panel.
*
* @since Bitwig Studio 1.0
*/
focusPanelBelow() : void,
/**
* Toggles between full screen and windowed user interface.
*
* @since Bitwig Studio 1.0
*/
toggleFullScreen() : void
}
/**
* An interface representing various commands which can be performed on the Bitwig Studio arranger.<br/>
*
* To receive an instance of the application interface call {@link Host#createArranger}.
*
* @since Bitwig Studio 1.0
*/
interface Arranger {
/**
* Gets an object that allows to enable/disable arranger playback follow. Observers can be registered on
* the returned object for receiving notifications when the setting switches between on and off.
*
* @return {BooleanValue} a boolean value object that represents the enabled state of arranger playback follow
* @since Bitwig Studio 1.1
*/
isPlaybackFollowEnabled() : BooleanValue,
/**
* Gets an object that allows to control the arranger track height. Observers can be registered on
* the returned object for receiving notifications when the track height changes.
*
* @return {BooleanValue} a boolean value object that has the state `true` when the tracks have double row height
and `false` when the tracks have single row height.
* @since Bitwig Studio 1.1
*/
hasDoubleRowTrackHeight() : BooleanValue,
/**
* Gets an object that allows to show/hide the cue markers in the arranger panel. Observers can be registered on
* the returned object for receiving notifications when the cue marker lane switches between shown and hidden.
*
* @return {BooleanValue} a boolean value object that represents the cue marker section visibility
* @since Bitwig Studio 1.1
*/
areCueMarkersVisible() : BooleanValue,
/**
* Gets an object that allows to show/hide the clip launcher in the arranger panel. Observers can be registered
* on the returned object for receiving notifications when the clip launcher switches between shown and hidden.
*
* @return {BooleanValue} a boolean value object that represents the clip launcher visibility
* @since Bitwig Studio 1.1
*/
isClipLauncherVisible() : BooleanValue,
/**
* Gets an object that allows to show/hide the timeline in the arranger panel. Observers can be registered
* on the returned object for receiving notifications when the timeline switches between shown and hidden.
*
* @return {BooleanValue} a boolean value object that represents the timeline visibility
* @since Bitwig Studio 1.1
*/
isTimelineVisible() : BooleanValue,
/**
* Gets an object that allows to show/hide the track input/output choosers in the arranger panel. Observers can
* be registered on the returned object for receiving notifications when the I/O section switches between shown
* and hidden.
*
* @return {BooleanValue} a boolean value object that represents the visibility of the track I/O section
* @since Bitwig Studio 1.1
*/
isIoSectionVisible() : BooleanValue,
/**
* Gets an object that allows to show/hide the effect tracks in the arranger panel. Observers can be registered on
* the returned object for receiving notifications when the effect track section switches between shown and hidden.
*
* @return {BooleanValue} a boolean value object that represents the visibility of the effect track section
* @since Bitwig Studio 1.1
*/
areEffectTracksVisible() : BooleanValue
}
/**
* Instances of this interface represent ranged parameters that can be controlled with automation in Bitwig Studio.
*
* @since Bitwig Studio 1.0
*/
interface AutomatableRangedValue extends RangedValue {
/**
* Adds an observer which reports changes to the name of the automated parameter. The callback will get called
* at least once immediately after calling this method for reporting the current name.
*
* @param {int} maxChars maximum length of the string sent to the observer
* @param {string} textWhenUnassigned the default text to use
* @param {function} callback a callback function that receives a single string parameter
* @since Bitwig Studio 1.0
*/
addNameObserver(maxChars : number, textWhenUnassigned : string, callback : (name : string) => void) : void,
/**
* Adds an observer which sends a formatted text representation of the value whenever the value changes.
* The callback will get called at least once immediately after calling this method for reporting the current state.
*
* @param {int} maxChars maximum length of the string sent to the observer
* @param {string} textWhenUnassigned the default text to use
* @param {function} callback a callback function that receives a single string parameter
* @since Bitwig Studio 1.0
*/
addValueDisplayObserver(maxChars : number, textWhenUnassigned : string, callback : (displayValue : string) => void) : void,
/**
* Resets the value to its default.
*
* @since Bitwig Studio 1.0
*/
reset() : void,
/**
* Touch (or un-touch) the value for automation recording.
*
* @param {boolean} isBeingTouched `true` for touching, `false` for un-touching
* @since Bitwig Studio 1.0
*/
touch(isBeingTouched : boolean) : void,
/**
* Specifies if this value should be indicated as mapped in Bitwig Studio, which is visually shown as colored dots
* or tinting on the parameter controls.
*
* @param {boolean} shouldIndicate `true` in case visual indications should be shown in Bitwig Studio,
`false` otherwise
* @since Bitwig Studio 1.0
*/
setIndication(shouldIndicate : boolean) : void,
/**
* Specifies a label for the mapped hardware parameter as shown in Bitwig Studio, for example in menu items for
* learning controls.
*
* @param {string} label the label to be shown in Bitwig Studio
* @since Bitwig Studio 1.0
*/
setLabel(label : string) : void,
/**
* Restores control of this parameter to automation playback.
*
* @since 1.1
*/
restoreAutomationControl() : void
}
/**
* Instances of this interface represent beat time values.
*
* @since Bitwig Studio 1.0
*/
interface BeatTime extends RangedValue {
/**
* Registers an observer that reports the internal beat time value as formatted text, for example "012:03:00:01".
*
* @param {string} separator the character used to separate the segments of the formatted beat time, typically ":", "." or "-"
* @param {int} barsLen the number of digits reserved for bars
* @param {int} beatsLen the number of digits reserved for beats
* @param {int} subdivisionLen the number of digits reserved for beat subdivisions
* @param {int} ticksLen the number of digits reserved for ticks
* @param {function} callback a callback function that receives a single string parameter
* @since Bitwig Studio 1.0
*/
addTimeObserver(separator : string, barsLen : number, beatsLen : number, subdivisionLen : number, ticksLen : number, callback : (timeFloat : number) => void) : void,
/**
* Adds an observer which receives the internal raw value of the parameter as floating point value.
*
* @param {function} callback a callback function that receives a single floating point parameter with double precision.
* @since Bitwig Studio 1.0
*/
addRawValueObserver(callback : (floatValue : number) => void) : void,
/**
* Sets the internal (raw) value.
*
* @param {double} value a numeric value with double-precision. Range is undefined.
* @since Bitwig Studio 1.0
*/
setRaw(value : number) : void,
/**
* Increments / decrements the internal (raw) value by the given delta.
*
* @param {double} delta the amount that gets added to the internal value.
* @since Bitwig Studio 1.0
*/
incRaw(delta : number) : void
}
/**
* Instances of this interface are used for browsing Bitwig Studio document such as devices, presets,
* multi-samples, or clips. Full access to all filter columns and the result column as shown in
* Bitwig Studio's contextual browser window is provided.
*
* @see BrowsingSession
* @since Bitwig Studio 1.2
*/
interface BitwigBrowsingSession extends BrowsingSession {
/**
* Returns the creator filter as shown in the category column of Bitwig Studio's contextual browser.
*
* @return {BrowserFilterColumn} the requested creator filter object.
* @since Bitwig Studio 1.2
*/
getCreatorFilter() : BrowserFilterColumn,
/**
* Returns the tags filter as shown in the category column of Bitwig Studio's contextual browser.
*
* @return {BrowserFilterColumn} the requested tags filter object.
* @since Bitwig Studio 1.2
*/
getTagsFilter() : BrowserFilterColumn
}
/**
* Instances of this interface represent boolean values.
*
* @since Bitwig Studio 1.0
*/
interface BooleanValue extends Value {
/**
* Sets the internal value.
*
* @param {boolean} value the new boolean value.
* @since Bitwig Studio 1.0
*/
set(value : boolean) : void,
/**
* Toggles the current state. In case the current value is `false`, the new value will be `true` and
* the other way round.
*
* @since Bitwig Studio 1.0
*/
toggle(exclusive?) : void
}
/**
* Instances of this interface represent a contextual browser in Bitwig Studio.
*
* @since Bitwig Studio 1.2
*/
interface Browser {
/**
* Registers an observer that reports if a browsing session was started.
*
* @param {function} callback a callback function that receivers a single boolean parameter.
* @since Bitwig Studio 1.2
*/
addIsBrowsingObserver(callback : (isbrowsing : boolean) => void) : void,
/**
* Starts a new browser session.
*
* @since Bitwig Studio 1.2
*/
startBrowsing() : void,
/**
* Cancels the current browser session.
*
* @since Bitwig Studio 1.2
*/
cancelBrowsing() : void,
/**
* Finished the browser session by loading the selected item.
*
* @since Bitwig Studio 1.2
*/
commitSelectedResult() : void,
/**
* Activates the given search session. Please note that only one search session can be active at a time.
*
* @param {BrowsingSession} session the session that should be activated.
* @throws ControlSurfaceException
* @since Bitwig Studio 1.2
*/
activateSession(session : BrowsingSession) : void,
/**
* Return an object allows to observe and control if the browser window should be small or full-sized.
*
* @return {BooleanValue} a boolean value object
* @since Bitwig Studio 1.2
*/
isWindowMinimized() : BooleanValue,
/**
* Return an object allows to observe and control if the selected result should be auditioned.
*
* @return {BooleanValue} a boolean value object
* @since Bitwig Studio 1.2
*/
shouldAudition() : BooleanValue,
/**
* Returns an object that provided bank-wise navigation of the available search sessions.
* Each search session is dedicated to a certain material type, as shown in the tabs of
* Bitwig Studio's contextual browser.
*
* @param {int} size the size of the windows used to navigate the available browsing sessions.
* @return {BrowsingSessionBank} the requested file column bank object
* @since Bitwig Studio 1.2
*/
createSessionBank(size : number) : BrowsingSessionBank,
/**
* Returns an object that represents the selected tab as shown in Bitwig Studio's contextual browser window.
*
* @return {CursorBrowsingSession} the requested browsing session cursor
* @since Bitwig Studio 1.2
*/
createCursorSession() : CursorBrowsingSession,
/**
* Returns an object that provides access to the contents of the device tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {DeviceBrowsingSession} the requested device browsing session instance
* @since Bitwig Studio 1.2
*/
getDeviceSession() : DeviceBrowsingSession,
/**
* Returns an object that provides access to the contents of the preset tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {PresetBrowsingSession} the requested preset browsing session instance
* @since Bitwig Studio 1.2
*/
getPresetSession() : PresetBrowsingSession,
/**
* Returns an object that provides access to the contents of the samples tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {SampleBrowsingSession} the requested sample browsing session instance
* @since Bitwig Studio 1.2
*/
getSampleSession() : SampleBrowsingSession,
/**
* Returns an object that provides access to the contents of the multi-samples tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {MultiSampleBrowsingSession} the requested multi-sample browsing session instance
* @since Bitwig Studio 1.2
*/
getMultiSampleSession() : MultiSampleBrowsingSession,
/**
* Returns an object that provides access to the contents of the clips tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {ClipBrowsingSession} the requested clip browsing session instance
* @since Bitwig Studio 1.2
*/
getClipSession() : ClipBrowsingSession,
/**
* Returns an object that provides access to the contents of the music tab as shown in Bitwig Studio's
* contextual browser window.
*
* @return {MusicBrowsingSession} the requested music browsing session instance
* @since Bitwig Studio 1.2
*/
getMusicSession() : MusicBrowsingSession
}
/**
* Instances of this interface are used to navigate a column in the Bitwig Studio browser.
*
* @since Bitwig Studio 1.2
*/
interface BrowserColumn {
/**
* Registers an observer that reports if the column exists.
*
* @param {function} callback a callback function that receives a single boolean parameter
* @since Bitwig Studio 1.2
*/
addExistsObserver(callback : (exists : boolean ) => void) : void,
/**
* Registers an observer that reports the underlying total count of column entries
* (not the size of the column window).
*
* @param {function} callback a callback function that receives a single integer parameter
* @since Bitwig Studio 1.2
*/
addEntryCountObserver(callback : (count: number ) => void) : void,
/**
* Returns the cursor item, which can be used to navigate over the list of entries.
*
* @return {BrowserItem} the requested filter item object
* @since Bitwig Studio 1.2
*/
createCursorItem() : BrowserItem,
/**
* Returns an object that provides access to a bank of successive entries using a window configured with the
* given size, that can be scrolled over the list of entries.
*
* @param {int} size the number of simultaneously accessible items
* @return {BrowserItemBank} the requested item bank object
*/
createItemBank(size : number) : BrowserItemBank
}
/**
* Instances of this interface are used to navigate a filter column in the Bitwig Studio browser.
*
* @since Bitwig Studio 1.2
*/
interface BrowserFilterColumn extends BrowserColumn {
/**
* Returns the filter item that represents the top-level all/any/everything wildcard item.
*
* @return {BrowserFilterItem} the requested filter item object
* @since Bitwig Studio 1.2
*/
getWildcardItem() : BrowserFilterItem,
/**
* Returns the cursor filter item, which can be used to navigate over the list of entries.
*
* @return {BrowserFilterItem} the requested filter item object
* @since Bitwig Studio 1.2
*/
createCursorItem() : BrowserFilterItem,
/**
* Returns an object that provides access to a bank of successive entries using a window configured with the
* given size, that can be scrolled over the list of entries.
*
* @param {int} size the number of simultaneously accessible items
* @return {BrowserFilterItemBank} the requested item bank object
*/
createItemBank(size : number) : BrowserFilterItemBank,
/**
* Registers an observer that reports the name of the filter column.
*
* @param {int} maxCharacters
* @param {string} textWhenUnassigned
* @param {function} callback
* @since Bitwig Studio 1.2
*/
addNameObserver(maxCharacters : number, textWhenUnassigned : string, callback : (name: string ) => void) : void
}
/**
* Instances of this interface are used to navigate the columns of a Bitwig Studio browser session.
*
* @since Bitwig Studio 1.2
*/
interface BrowserFilterColumnBank {
/**
* Returns the window size that was used to configure the filter column during creation.
*
* @return {int} the size of the filter column.
*/
getSize() : number,
/**
* Returns the filter column for the given index.
*
* @param {int} index the item index, must be in the range `[0..getSize-1]`
* @return {BrowserFilterColumn} the requested filter column object
*/
getItem(index : number) : BrowserFilterColumn,
/**
* Scrolls the filter columns one item up.
*
* @since Bitwig Studio 1.2
*/
scrollUp() : void,
/**
* Scrolls the filter columns one item down.
*
* @since Bitwig Studio 1.2
*/
scrollDown() : void,
/**
* Scrolls the filter columns one page up.
* For example if the bank is configured with a window size of 8 entries and is currently showing items
* [1..8], calling this method would scroll the window to show columns [9..16].
*
* @since Bitwig Studio 1.2
*/
scrollPageUp() : void,
/**
* Scrolls the filter columns one page up.
* For example if the bank is configured with a window size of 8 entries and is currently showing items
* [9..16], calling this method would scroll the window to show columns [1..8].
*
* @since Bitwig Studio 1.2
*/
scrollPageDown() : void,
/**
* Registers an observer that reports the current scroll position, more specifically the position of the first
* item within the underlying list of columns, that is shown as the first column within the window.
*
* @param {function} callback a callback function that receives a single integer number parameter. The parameter reflects
the scroll position, or `-1` in case the column has no content.
* @since Bitwig Studio 1.2
*/
addScrollPositionObserver(callback : (position: number) => void) : void,
/**
* Registers an observer that reports if the columns can be scrolled further up.
*
* @param {function} callback a callback function that receives a single boolean parameter
* @since Bitwig Studio 1.2
*/
addCanScrollUpObserver(callback : (canscroll: boolean) => void) : void,
/**
* Registers an observer that reports if the columns can be scrolled further down.
*
* @param {function} callback a callback function that receives a single boolean parameter
* @since Bitwig Studio 1.2
*/
addCanScrollDownObserver(callback : (canscroll: boolean) => void) : void,
/**
* Registers an observer that reports the underlying total count of columns
* (not the size of the window).
*
* @param {function} callback a callback function that receives a single integer parameter
* @since Bitwig Studio 1.2
*/
addEntryCountObserver(callback : (count: number) => void) : void
}
/**
* Instances of this interface represent entries in a browser filter column.
*
* @since Bitwig Studio 1.2
*/
interface BrowserFilterItem extends BrowserItem {
/**
* Registers an observer that reports the hit count of the filter item.
*
* @param {function} callback a callback function that receives a single integer parameter
* @since Bitwig Studio 1.2
*/
addHitCountObserver(callback : (count: number) => void) : void
}
/**
* Instances of this interface are used to navigate a filter column in the Bitwig Studio browser.
*
* @since Bitwig Studio 1.2
*/
interface BrowserFilterItemBank extends BrowserItemBank {
/**
* Returns the filter item for the given index.
*
* @param {int} index the item index, must be in the range `[0..getSize-1]`
* @return {BrowserFilterItem} the requested filter item object
* @since Bitwig Studio 1.2
*/
getItem(index : number) : BrowserFilterItem
}
/**
* Instances of this interface represent entries in a browser filter column.
*
* @since Bitwig Studio 1.2
*/
interface BrowserItem {
/**
* Registers an observer that reports if the item exists.
*
* @param {function} callback a callback function that receives a single boolean parameter
* @since Bitwig Studio 1.2
*/
addExistsObserver(callback : (exists: boolean ) => void) : void,
/**
* Registers an observer that reports the string value of the browser item.
*
* @param {int} maxCharacters
* @param {string} textWhenUnassigned
* @param {function} callback a callback function that receives a single string argument
* @since Bitwig Studio 1.2
*/
addValueObserver(maxCharacters : number, textWhenUnassigned : string, callback : (value: string) => void) : void,
/**
* Returns an object that provides access to the selected state of the browser item.
*
* @return {BooleanValue} an boolean value object