/
bitwig.d.ts
6283 lines (4612 loc) · 240 KB
/
bitwig.d.ts
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
/** Something that can be bound to an {@link AbsoluteHardwareControl} and can respond to the user input (such
as user moving a slider up or down) in a meaningful way. */
declare interface AbsoluteHardwareControlBindable extends HardwareBindable {
/** Binds this target to the supplied hardware control so that when the user moves the hardware control this
target will respond in a meaningful way.
When the binding is no longer needed the {@link HardwareBinding#removeBinding()} method can be called on
it. */
addBinding(hardwareControl: AbsoluteHardwareControl): AbsoluteHardwareControlBinding
/** Binds this target to the supplied hardware control so that when the user moves the hardware control this
target will respond in a meaningful way. This target will be adjusted within the supplied normalized
range.
When the binding is no longer needed the {@link HardwareBinding#removeBinding()} method can be called on
it. */
addBindingWithRange(hardwareControl: AbsoluteHardwareControl, minNormalizedValue: number, maxNormalizedValue: number): AbsoluteHardwareControlBinding
}
/** Represents a hardware control that can input and absolute value (for example, a slider, knob or foot
pedal). */
declare interface AbsoluteHardwareControl extends ContinuousHardwareControl<AbsoluteHardwareControlBinding> {
/** Sets the {@link AbsoluteHardwareValueMatcher} that can be used to detect when the user adjusts the
hardware control's value. */
setAdjustValueMatcher(matcher: AbsoluteHardwareValueMatcher): void
/** The current value of this hardware control (0..1) */
value(): DoubleValue
/** The value of the target that this hardware control has been bound to (0..1). */
targetValue(): DoubleValue
/** Can be called from the {@link #targetValue()} changed callback to check if this control is responsible
for changing the target value or not. */
isUpdatingTargetValue(): BooleanValue
/** Value that indicates if this hardware control has a target value that it changes or not. */
hasTargetValue(): BooleanValue
/** Determines if this hardware control should immediately take over the parameter it is bound to rather
than respecting the user's current take over mode.
This is useful for motorized sliders for example, where the slider is already at the value of the bound
parameter. */
disableTakeOver(): void
/** Adds a new binding from this hardware control to the supplied target. */
addBindingWithRange(target: AbsoluteHardwareControlBindable, minNormalizedValue: number, maxNormalizedValue: number): AbsoluteHardwareControlBinding
/** Convenience methods that ensures there is only a single binding to the supplied target. This is
equivalent to calling {@link #clearBindings()} and then
{@link #addBindingWithRange(AbsoluteHardwareControlBindable, double, double)} */
setBindingWithRange(target: AbsoluteHardwareControlBindable, minNormalizedValue: number, maxNormalizedValue: number): AbsoluteHardwareControlBinding
}
/** Represents a binding from an {@link AbsoluteHardwareControl} to some target. */
declare interface AbsoluteHardwareControlBinding extends HardwareBindingWithRange {
}
/** Represents a physical hardware knob that inputs an absolute value. */
declare interface AbsoluteHardwareKnob extends AbsoluteHardwareControl {
}
/** Defines a means of recognizing when an absolute value is input by the user (for example, when moving a
slider or turning a knob based on some MIDI message). This matcher can then be set on an
{@link AbsoluteHardwareControl} using
{@link AbsoluteHardwareControl#setAdjustValueMatcher(AbsoluteHardwareValueMatcher)}. */
declare interface AbsoluteHardwareValueMatcher extends ContinuousHardwareValueMatcher {
}
/** 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)}. */
declare interface Action extends HardwareActionBindable {
/** Returns a string the identifies this action uniquely. */
getId(): string
/** Returns the name of this action. */
getName(): string
/** Returns the category of this action. */
getCategory(): ActionCategory
/** Returns the text that is displayed in menu items associated with this action. */
getMenuItemText(): string
/** Invokes the action. */
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)}. */
declare interface ActionCategory {
/** Returns a string the identifies this action category uniquely. */
getId(): string
/** Returns the name of this action category. */
getName(): string
/** Lists all actions in this category. */
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 ControllerHost#createApplication()}. */
declare interface Application {
/** Creates a new audio track at the given position. */
createAudioTrack(
/** 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.*/
position: number): void
/** Creates a new instrument track at the given position. */
createInstrumentTrack(
/** 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.*/
position: number): void
/** Creates a new effect track at the given position. */
createEffectTrack(
/** 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.*/
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. */
getActions(): Action[]
/** Returns the action for the given action identifier. For a list of available actions, see
{@link #getActions()}. */
getAction(
/** the action identifier string, must not be `null`*/
id: string): Action
/** Returns a list of action categories that is used by Bitwig Studio to group actions into categories. */
getActionCategories(): ActionCategory[]
/** Returns the action category associated with the given identifier. For a list of available action
categories, see {@link #getActionCategories()}. */
getActionCategory(
/** the category identifier string, must not be `null`*/
id: string): ActionCategory
/** Activates the audio engine in Bitwig Studio. */
activateEngine(): void
/** Deactivates the audio engine in Bitwig Studio. */
deactivateEngine(): void
/** Value that reports whether an audio engine is active or not. */
hasActiveEngine(): BooleanValue
/** Value that reports the name of the current project. */
projectName(): StringValue
/** Switches to the next project tab in Bitwig Studio. */
nextProject(): void
/** Switches to the previous project tab in Bitwig Studio. */
previousProject(): void
/** Set BitwigStudio to navigate into the group. */
navigateIntoTrackGroup(track: Track): void
/** Set BitwigStudio to navigate into the parent group. */
navigateToParentTrackGroup(): void
/** Sends an undo command to Bitwig Studio. */
undo(): void
undoAction(): HardwareActionBindable
/** Sends a redo command to Bitwig Studio. */
redo(): void
redoAction(): HardwareActionBindable
/** 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. */
setPanelLayout(
/** the name of the new panel layout*/
panelLayout: string): void
/** Switches to the next panel layout of the active display profile in Bitwig Studio. */
nextPanelLayout(): void
/** Switches to the previous panel layout of the active display profile in Bitwig Studio. */
previousPanelLayout(): void
/** Value that reports the name of the active panel layout. */
panelLayout(): StringValue
/** Value that reports the name of the active display profile. */
displayProfile(): StringValue
/** Toggles the visibility of the inspector panel. */
toggleInspector(): void
/** Toggles the visibility of the device chain panel. */
toggleDevices(): void
/** Toggles the visibility of the mixer panel. */
toggleMixer(): void
/** Toggles the visibility of the note editor panel. */
toggleNoteEditor(): void
/** Toggles the visibility of the automation editor panel. */
toggleAutomationEditor(): void
/** Toggles the visibility of the browser panel. */
toggleBrowserVisibility(): void
/** Shows the previous detail panel (note editor, device, automation). */
previousSubPanel(): void
/** Shows the next detail panel (note editor, device, automation). */
nextSubPanel(): void
/** Equivalent to an Arrow-Left key stroke on the computer keyboard. The concrete functionality depends on
the current keyboard focus in Bitwig Studio. */
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. */
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. */
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. */
arrowKeyDown(): void
/** Equivalent to an Enter key stroke on the computer keyboard. The concrete functionality depends on the
current keyboard focus in Bitwig Studio. */
enter(): void
/** Equivalent to an Escape key stroke on the computer keyboard. The concrete functionality depends on the
current keyboard focus in Bitwig Studio. */
escape(): void
/** Selects all items according the current selection focus in Bitwig Studio. */
selectAll(): void
selectAllAction(): HardwareActionBindable
/** Deselects any items according the current selection focus in Bitwig Studio. */
selectNone(): void
selectNoneAction(): HardwareActionBindable
/** Selects the previous item in the current selection. */
selectPrevious(): void
selectPreviousAction(): HardwareActionBindable
/** Selects the next item in the current selection. */
selectNext(): void
selectNextAction(): HardwareActionBindable
/** Selects the first item in the current selection. */
selectFirst(): void
selectFirstAction(): HardwareActionBindable
/** Selects the last item in the current selection. */
selectLast(): void
selectLastAction(): HardwareActionBindable
/** Cuts the selected items in Bitwig Studio if applicable. */
cut(): void
cutAction(): HardwareActionBindable
/** Copies the selected items in Bitwig Studio to the clipboard if applicable. */
copy(): void
copyAction(): HardwareActionBindable
/** Pastes the clipboard contents into the current selection focus in Bitwig Studio if applicable. */
paste(): void
pasteAction(): HardwareActionBindable
/** Duplicates the active selection in Bitwig Studio if applicable. */
duplicate(): void
duplicateAction(): HardwareActionBindable
/** 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. */
remove(): void
removeAction(): HardwareActionBindable
/** Opens a text input field in Bitwig Studio for renaming the selected item. */
rename(): void
/** Zooms in one step into the currently focused editor of the Bitwig Studio user interface. */
zoomIn(): void
zoomInAction(): HardwareActionBindable
/** Zooms out one step in the currently focused editor of the Bitwig Studio user interface. */
zoomOut(): void
zoomOutAction(): HardwareActionBindable
/** Adjusts the zoom level of the currently focused editor so that it matches the active selection. */
zoomToSelection(): void
zoomToSelectionAction(): HardwareActionBindable
/** Toggles between zoomToSelection and zoomToFit. */
zoomToSelectionOrAll(): void
zoomToSelectionOrAllAction(): HardwareActionBindable
/** Toggles between zoomToSelection and the last śet zoom level. */
zoomToSelectionOrPrevious(): void
zoomToSelectionOrPreviousAction(): HardwareActionBindable
/** Adjusts the zoom level of the currently focused editor so that all content becomes visible. */
zoomToFit(): void
zoomToFitAction(): HardwareActionBindable
/** Moves the panel focus to the panel on the left of the currently focused panel. */
focusPanelToLeft(): void
/** Moves the panel focus to the panel right to the currently focused panel. */
focusPanelToRight(): void
/** Moves the panel focus to the panel above the currently focused panel. */
focusPanelAbove(): void
/** Moves the panel focus to the panel below the currently focused panel. */
focusPanelBelow(): void
/** Toggles between full screen and windowed user interface. */
toggleFullScreen(): void
/** Returns the record quantization grid setting from the preferences.
Possible values are "OFF", "1/32", "1/16", "1/8", "1/4". */
recordQuantizationGrid(): SettableEnumValue
/** Returns a settable value to choose if the record quantization should quantize note length. */
recordQuantizeNoteLength(): SettableBooleanValue
}
/** Proxy to an arpeggiator component. */
declare interface Arpeggiator extends ObjectProxy {
/** Returns an object to configure the arpeggiator mode.
Possible values:
- all
- up
- up-down
- up-then-down
- down
- down-up
- down-then-up
- flow
- random
- converge-up
- converge-down
- diverge-up
- diverge-down
- thumb-up
- thumb-down
- pinky-up
- pinky-down */
mode(): SettableEnumValue
/** Returns an object to configure the range in octaves.
The range is between 0 and 8. */
octaves(): SettableIntegerValue
/** Returns an object to enable or disable the note repeat component. */
isEnabled(): SettableBooleanValue
/** If true the arpeggiator will not try to sync to the transport. */
isFreeRunning(): SettableBooleanValue
/** Return an object to configure the note repeat to use shuffle or not. */
shuffle(): SettableBooleanValue
/** Returns an object to configure the note repeat rate in beats. */
rate(): SettableDoubleValue
/** Returns an object to configure the note length, expressed as a ratio of the period.
Must be between 1/32 and 1. */
gateLength(): SettableDoubleValue
/** Will use the note pressure to determine the velocity of arpeggiated notes. */
usePressureToVelocity(): SettableBooleanValue
/** Release all notes being played. */
releaseNotes(): 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 ControllerHost#createArranger}. */
declare 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. */
isPlaybackFollowEnabled(): SettableBooleanValue
/** 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. */
hasDoubleRowTrackHeight(): SettableBooleanValue
/** 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. */
areCueMarkersVisible(): SettableBooleanValue
/** 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. */
isClipLauncherVisible(): SettableBooleanValue
/** 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. */
isTimelineVisible(): SettableBooleanValue
/** 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. */
isIoSectionVisible(): SettableBooleanValue
/** 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. */
areEffectTracksVisible(): SettableBooleanValue
/** Returns an object that provides access to a bank of successive cue markers using a window configured with
the given size, that can be scrolled over the list of markers. */
createCueMarkerBank(
/** the number of simultaneously accessible items*/
size: number): CueMarkerBank
}
/** Callback that is notified when an asynchronous transfer has completed. */
declare interface AsyncTransferCompledCallback {
/** Called upon completion of an asynchronous read. */
asyncTransferCompleted(amountTransferred: number): void
}
declare interface AutoDetectionMidiPortNames {
getInputNames(): String[]
getOutputNames(): String[]
}
declare interface AutoDetectionMidiPortNamesList {
add(inputNames: String[], outputNames: String[]): void
getPortNames(): AutoDetectionMidiPortNames[]
getCount(): number
getPortNamesAt(index: number): AutoDetectionMidiPortNames
}
/** A bank provides access to a range of items in Bitwig Studio. Instances of a bank are configured with a
fixed number of items and represent an excerpt of a larger list of items. Various methods are provided for
scrolling to different sections of the item list. It basically acts like a window moving over the list of
underlying items. */
declare interface Bank<ItemType> extends ObjectProxy, Scrollable {
/** The fixed size of this bank.
This will be initially equal to the capacity of the Bank. */
getSizeOfBank(): number
/** The maximum number of items in the bank which is defined when the bank is initially created. */
getCapacityOfBank(): number
/** Sets the size of this bank */
setSizeOfBank(
/** number of items in the bank that has to be greater than 0 and less or equal to the capacity of the bank.*/
size: number): void
/** Gets the item in the bank at the supplied index. The index must be >= 0 and < {@link #getSizeOfBank()}. */
getItemAt(index: number): ItemType
/** Value that reports the underlying total item count (not the number of items available in the bank
window). */
itemCount(): IntegerValue
/** An integer value that defines the location of the cursor that this bank is following. If there is no
cursor or the cursor is not within the bank then the value is -1. */
cursorIndex(): SettableIntegerValue
}
/** Defines a formatter for a beat time that can convert a beat time to a string for display to the user. */
declare interface BeatTimeFormatter {
/** Formats the supplied beat time as a string in the supplied time signature. */
formatBeatTime(beatTime: number, isAbsolute: boolean, timeSignatureNumerator: number, timeSignatureDenominator: number, timeSignatureTicks: number): string
}
/** Instances of this interface represent beat time values.
Beat time values are double-precision number representing the number of quarter notes, regardless of time-signature. */
declare interface BeatTimeValue extends DoubleValue {
/** Gets the current beat time formatted according to the default beat time formatter. */
getFormatted(): string
}
/** Represents a bitmap image which can be painted via {@link #render(Renderer)}. */
declare interface Bitmap extends Image {
getWidth(): number
getHeight(): number
getFormat(): any
getMemoryBlock(): MemoryBlock
/** Call this method to start painting the bitmap.
This method will take care of disposing allocated patterns during the rendering. */
render(renderer: Renderer): void
/** Call this method to show a window which displays the bitmap.
You should see this as a debug utility rather than a Control Surface API feature. */
showDisplayWindow(): void
/** Updates the display window title. */
setDisplayWindowTitle(title: string): void
/** Saves the image as a PPM file. */
saveToDiskAsPPM(
/** the location of the target file.*/
path: string): void
}
/** Represents an output value shown on some hardware (for example, if an LED is on or off). */
declare interface BooleanHardwareProperty extends HardwareProperty {
/** Gets the current value. This is the value that should be sent to the hardware to be displayed. */
currentValue(): boolean
/** The value that was last sent to the hardware. */
lastSentValue(): boolean
/** Specifies a callback that should be called with the value that needs to be sent to the hardware. This
callback is called as a result of calling the {@link HardwareSurface#updateHardware()} method (typically
from the flush method). */
onUpdateHardware(sendValueConsumer: (bool: boolean) => any): void
/** Sets the current value. */
setValue(value: boolean): void
/** Sets the current value from a {@link BooleanSupplier} that supplies the latest value. */
setValueSupplier(supplier: (...args: any[]) => boolean): void
}
declare interface BooleanValue extends Value<BooleanValueChangedCallback> {
/** Gets the current value. */
get(): boolean
getAsBoolean(): boolean
}
/** Instances of this interface are used to navigate a column in the Bitwig Studio browser. */
declare interface BrowserColumn {
/** Value that reports the underlying total count of column entries (not the size of the column window). */
entryCount(): IntegerValue
/** Returns the cursor item, which can be used to navigate over the list of entries. */
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. */
createItemBank(
/** the number of simultaneously accessible items*/
size: number): BrowserItemBank
}
/** Instances of this interface are used to navigate a filter column in the Bitwig Studio browser. */
declare interface BrowserFilterColumn {
/** Returns the filter item that represents the top-level all/any/everything wildcard item. */
getWildcardItem(): BrowserFilterItem
/** Returns the cursor filter item, which can be used to navigate over the list of entries. */
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. */
createItemBank(
/** the number of simultaneously accessible items*/
size: number): BrowserFilterItemBank
/** Value that reports the name of the filter column. */
name(): StringValue
}
/** Instances of this interface represent entries in a browser filter column. */
declare interface BrowserFilterItem {
/** Value that reports the hit count of the filter item. */
hitCount(): IntegerValue
}
/** Instances of this interface are used to navigate a filter column in the Bitwig Studio browser. */
declare interface BrowserFilterItemBank {
}
/** Instances of this interface represent entries in a browser filter column. */
declare interface BrowserItem {
/** Value that reports the name of the browser item. */
name(): StringValue
/** Returns an object that provides access to the selected state of the browser item. */
isSelected(): SettableBooleanValue
}
/** Instances of this interface are used to navigate a column in the Bitwig Studio browser. */
declare interface BrowserItemBank {
}
/** Instances of this interface are used to navigate a results column in the Bitwig Studio browser. */
declare interface BrowserResultsColumn {
/** Returns the cursor result item, which can be used to navigate over the list of entries. */
createCursorItem(): BrowserResultsItem
/** 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. */
createItemBank(
/** the number of simultaneously accessible items*/
size: number): BrowserResultsItemBank
}
/** Instances of this interface represent entries in a browser results column. */
declare interface BrowserResultsItem {
}
/** Instances of this interface are used to navigate the results column in the Bitwig Studio browser. */
declare interface BrowserResultsItemBank {
}
/** This interface represents a chain selector device which can be:
- instrument selector
- effect selector */
declare interface ChainSelector extends ObjectProxy, Cursor {
/** The index of the active chain in the chain selector.
In case the chain selector has no chains or the value is not connected to the chain selector,
then the value will be 0. */
activeChainIndex(): SettableIntegerValue
/** The number of chains in the chain selector. */
chainCount(): IntegerValue
/** The active device layer. */
activeChain(): DeviceLayer
/** Cycle to the next chain.
If the current active chain is the last one, then moves to the first one. */
cycleNext(): void
/** Cycle to the previous chain.
If the current active chain the first one, then moves to the last one. */
cyclePrevious(): void
}
declare interface SendBank extends Bank<Send> {}
/** This interface defines access to the common attributes and operations of channels, such as tracks or nested
device channels. */
declare interface Channel extends DeviceChain, DeleteableObject {
/** Returns an object that represents the activated state of the channel. */
isActivated(): SettableBooleanValue
/** Gets a representation of the channels volume control. */
volume(): Parameter
/** Gets a representation of the channels pan control. */
pan(): Parameter
/** Gets a representation of the channels mute control. */
mute(): SettableBooleanValue
/** Gets a representation of the channels solo control. */
solo(): SoloValue
/** True if the current channel is being muted by an other channel with solo on. */
isMutedBySolo(): BooleanValue
/** Registers an observer for the VU-meter of this track. */
addVuMeterObserver(
/** the number of steps to which the reported values should be scaled. For example a range of 128
would cause the callback to be called with values between 0 and 127.*/
range: number,
/** 0 for left channel, 1 for right channel, -1 for the sum of both*/
channel: number,
/** when `true` the peak value is reported, otherwise the RMS value*/
peak: boolean,
/** a callback function that takes a single numeric argument. The value is in the range
[0..range-1].*/
callback: (value: number) => void): void
/** Returns an array of the playing notes. */
playingNotes(): PlayingNoteArrayValue
/** Get the color of the channel. */
color(): SettableColorValue
/** Gets a {@link SendBank} that can be used to navigate the sends of this channel. */
sendBank(): SendBank
/** Duplicates the track. */
duplicate(): void
/** Selects the device chain in the Bitwig Studio mixer, in case it is a selectable object. */
selectInMixer(): void
/** Registers an observer that reports if the device chain is selected in Bitwig Studio mixer. */
addIsSelectedInMixerObserver(
/** a callback function that takes a single boolean parameter.*/
callback: (isSelectedInMixer: boolean) => void): void
/** Tries to scroll the contents of the arrangement editor so that the channel becomes visible. */
makeVisibleInArranger(): void
/** Tries to scroll the contents of the mixer panel so that the channel becomes visible. */
makeVisibleInMixer(): void
}
/** A channel bank provides access to a range of channels in Bitwig Studio, such as tracks or device layers.
Instances of channel bank are typically configured with support for a fixed number of channels and
represent an excerpt of a larger list of channels. Various methods are provided for scrolling to different
sections of the channel list. It basically acts like a window moving over the list of channels. */
declare interface ChannelBank<ChannelType extends Channel> extends ObjectProxy, Bank<ChannelType> {
/** Sets the step size used for scrolling the channel bank. */
setChannelScrollStepSize(
/** the step size used for scrolling. Default is `1`.*/
stepSize: number): void
/** Value that reports if the channel bank can be scrolled further down. */
canScrollChannelsUp(): BooleanValue
/** Value that reports if the channel bank can be scrolled further down. */
canScrollChannelsDown(): BooleanValue
/** Value that reports the underlying total channel count (not the number of channels available in the bank
window). */
channelCount(): IntegerValue
}
/** An interface that provides access to the contents of a clip in Bitwig Studio.
The note content of the clip is exposed in terms of steps and keys, mainly targeted to x-y-grid
applications such as step sequencers. */
declare interface Clip extends ObjectProxy {
/** Scroll the note grid so that the given key becomes the key with y position of 0.
Note: This can cause some parts of the grid to represent invalid keys as there is no clipping */
scrollToKey(
/** the key that should be the new key with a y position of 0. This must be a value in the range
0...127.*/
key: number): void
/** Scrolls the note grid keys one page up. For example if the note grid is configured to show 12 keys and
is currently showing keys [36..47], calling this method would scroll the note grid to key range
[48..59]. */
scrollKeysPageUp(): void
/** Scrolls the note grid keys one page down. For example if the note grid is configured to show 12 keys and
is currently showing keys [36..47], calling this method would scroll the note grid to key range
[48..59]. */
scrollKeysPageDown(): void
/** Scrolls the note grid keys one key up. For example if the note grid is configured to show 12 keys and is
currently showing keys [36..47], calling this method would scroll the note grid to key range [37..48]. */
scrollKeysStepUp(): void
/** Scrolls the note grid keys one key down. For example if the note grid is configured to show 12 keys and
is currently showing keys [36..47], calling this method would scroll the note grid to key range
[35..46]. */
scrollKeysStepDown(): void
/** Scroll the note grid so that the given step becomes visible. */
scrollToStep(
/** the step that should become visible*/
step: number): void
/** Scrolls the note grid steps one page forward. For example if the note grid is configured to show 16
steps and is currently showing keys [0..15], calling this method would scroll the note grid to key range
[16..31]. */
scrollStepsPageForward(): void
/** Scrolls the note grid steps one page backwards. For example if the note grid is configured to show 16
steps and is currently showing keys [16..31], calling this method would scroll the note grid to key
range [0..16]. */
scrollStepsPageBackwards(): void
/** Scrolls the note grid steps one step forward. For example if the note grid is configured to show 16
steps and is currently showing keys [0..15], calling this method would scroll the note grid to key range
[1..16]. */
scrollStepsStepForward(): void
/** Scrolls the note grid steps one step backwards. For example if the note grid is configured to show 16
steps and is currently showing keys [1..16], calling this method would scroll the note grid to key range
[0..15]. */
scrollStepsStepBackwards(): void
/** Value that reports if the note grid keys can be scrolled further up. */
canScrollKeysUp(): BooleanValue
/** Value that reports if the note grid keys can be scrolled further down. */
canScrollKeysDown(): BooleanValue
/** Value that reports if the note grid if the note grid steps can be scrolled backwards. */
canScrollStepsBackwards(): BooleanValue
/** Value that reports if the note grid if the note grid steps can be scrolled forwards. */
canScrollStepsForwards(): BooleanValue
/** Toggles the existence of a note in the note grid cell specified by the given x and y arguments. */
toggleStep(
/** the MIDI channel, between 0 and 15.*/
channel: number,
/** the x position within the note grid, defining the step/time of the target note*/
x: number,
/** the y position within the note grid, defining the key of the target note*/
y: number,
/** the velocity of the target note in case a new note gets inserted*/
insertVelocity: number): void
/** Creates a note in the grid cell specified by the given x and y arguments. Existing notes are
overwritten. */
setStep(channel: number, x: number, y: number, insertVelocity: number, insertDuration: number): void
/** Removes the note in the grid cell specified by the given x and y arguments. Calling this method does
nothing in case no note exists at the given x-y-coordinates. */
clearStep(
/** MIDI channel, from 0 to 15.*/
channel: number,
/** the x position within the note grid, defining the step/time of the target note*/
x: number,
/** the y position within the note grid, defining the key of the target note*/
y: number): void
/** Removes all notes in the grid started on the step x. */
clearStepsAtX(channel: number, x: number): void
/** Removes all notes in the grid row specified by the given y argument. */
clearStepsAtY(
/** MIDI channel, from 0 to 15.*/
channel: number,
/** the y position within the note grid, defining the key of the target note*/
y: number): void
/** Removes all notes in the grid. */
clearSteps(): void
/** Selects the note in the grid cell specified by the given x and y arguments, in case there actually is a
note at the given x-y-coordinates. */
selectStepContents(
/** MIDI channel, from 0 to 15.*/
channel: number,
/** the x position within the note grid, defining the step/time of the target note*/
x: number,
/** the y position within the note grid, defining the key of the target note*/
y: number,
/** `true` if the existing selection should be cleared, {@false} if the note should be added to
the current selection.*/
clearCurrentSelection: boolean): void
/** Sets the beat time duration that is represented by one note grid step. */
setStepSize(
/** the length of one note grid step in beat time.*/
lengthInBeatTime: number): void
/** Registers an observer that reports which note grid steps/keys contain notes. */
addStepDataObserver(
/** A callback function that receives three parameters: 1. the x (step) coordinate within the note
grid (integer), 2. the y (key) coordinate within the note grid (integer), and 3. an integer
value that indicates if the step is empty (`0`) or if a note continues playing (`1`) or starts
playing (`2`).*/
callback: (x: number, y: number, state: number) => void
): void
/** Registers an observer that reports which note grid steps/keys contain notes. */
addNoteStepObserver(
/** A callback function that receives the StepInfo.*/
callback: NoteStepChangedCallback
): void
/** Value that reports note grid cells as they get played by the sequencer. */
playingStep(): IntegerValue
/** Updates the name of the clip. */
setName(
/** the new clip name*/
name: string): void
/** Returns shuffle settings of the clip. */
getShuffle(): SettableBooleanValue
/** Returns accent setting of the clip. */
getAccent(): SettableRangedValue
/** Returns the start of the clip in beat time. */
getPlayStart(): SettableBeatTimeValue
/** Returns the length of the clip in beat time. */
getPlayStop(): SettableBeatTimeValue
/** Returns an object that provides access to the loop enabled state of the clip. */
isLoopEnabled(): SettableBooleanValue
/** Returns the loop start time of the clip in beat time. */
getLoopStart(): SettableBeatTimeValue
/** Returns the loop length of the clip in beat time. */
getLoopLength(): SettableBeatTimeValue
/** Get the color of the clip. */
color(): SettableColorValue
/** Duplicates the clip. */
duplicate(): void
/** Duplicates the content of the clip. */
duplicateContent(): void
/** Transposes all notes in the clip by the given number of semitones. */
transpose(
/** the amount of semitones to transpose, can be a positive or negative integer value.*/
semitones: number): void
/** Quantize the start time of all notes in the clip according to the given amount. The note lengths remain
the same as before. */
quantize(
/** a factor between `0` and `1` that allows to morph between the original note start and the
quantized note start.*/
amount: number): void
/** Gets the track that contains the clip. */
getTrack(): Track
/** Setting for the default launch quantization.