-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApplication.py
More file actions
354 lines (282 loc) · 11 KB
/
Application.py
File metadata and controls
354 lines (282 loc) · 11 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
# All referenced (missing descriptions)
from typing import Optional, Callable, Any
from Live.Base import Vector
from Live.Browser import Browser
from Live.Song import Song
from ableton.v3.control_surface import ControlSurface
def combine_apcs() -> bool:
"""
:return: True if the two APCs are combined, False otherwise
"""
def encrypt_challenges(dongle1: int, dongle2: int, key_index: int = 0) -> tuple:
"""
:param dongle1: The first dongle
:param dongle2: The second dongle
:param key_index: The key index
:return: The encrypted challenges based on the TEA algorithm
"""
def encrypt_challenges2(arg1: int) -> int:
"""
:param arg1: The challenge
:return: UMAC hash for the given challenge
"""
def get_application() -> 'Application':
"""
:return: Returns the application object
"""
def get_random_int(arg1: int, arg2: int) -> int:
"""
:param arg1: Start of the range
:param arg2: End of the range
:return: A random integer
"""
class Application:
@property
def _live_ptr(self) -> int:
"""
:return: The pointer to the Live object.
"""
return 0
@property
def browser(self) -> Browser:
"""
:return: An interface to the browser.
"""
return Browser()
@property
def canonical_parent(self) -> Optional['Application']:
"""
:return: The canonical parent.
"""
return Application()
@property
def control_surfaces(self) -> list[Optional[ControlSurface]]:
"""
:return: List of control surfaces in preferences in the right order. None if no control surfaces active at that index.
"""
return []
@property
def current_dialog_button_count(self) -> int:
"""
:return: The number of buttons in the current dialog.
"""
return 0
@property
def open_dialog_count(self) -> int:
"""
:return: The number of open dialogs (0 for none).
"""
return 0
@property
def unavailable_features(self) -> 'UnavailableFeatureVector':
"""
:return: List of unavailable features due to current edition of Ableton Live.
"""
return UnavailableFeatureVector()
@property
def view(self) -> 'Application.View':
"""
:return: The current view.
"""
return Application.View()
def add_control_surface_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when a control surface is added or removed.
"""
def add_open_open_dialog_count_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when the open dialog count changes.
"""
def add_unavailable_features_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when the unavailable features change.
"""
def control_surfaces_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "control_surfaces", False otherwise.
"""
def get_bugfix_version(self) -> int:
"""
:return: The bugfix version of Ableton Live.
"""
def get_document(self) -> 'Song':
"""
:return: The current Live Set.
"""
def get_major_version(self) -> int:
"""
:return: The major version of Ableton Live.
"""
def get_minor_version(self) -> int:
"""
:return: The minor version of Ableton Live.
"""
def has_option(self, arg2: Any) -> bool:
"""
:param arg2: The option to check for.
:return: True if the option exists in Options.txt, False otherwise.
"""
def open_dialog_count_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "open_dialog_count", False otherwise.
"""
def press_current_dialog_button(self, arg2: int) -> None:
"""
Press a button with its index in the current message box.
:param arg2: The index of the button to press.
"""
def remove_control_surface_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "control_surfaces".
:param arg2: The listener to remove.
"""
def remove_open_dialog_count_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "open_dialog_count".
:param arg2: The listener to remove.
"""
def remove_unavailable_features_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "unavailable_features".
:param arg2: The listener to remove.
"""
def unavailable_features_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "unavailable_features", False otherwise.
"""
class View:
@property
def _live_ptr(self) -> int:
"""
:return: The pointer to the Live object.
"""
return 0
@property
def browse_mode(self) -> bool:
"""
:return: True if HotSwap mode is active for any target.
"""
return False
@property
def canonical_parent(self) -> Optional['Application.View']:
"""
:return: The canonical parent of the application view.
"""
return Application.View()
@property
def focused_document_view(self) -> str:
"""
:return: The name of the document view ('Session' or 'Arranger') shown in the currently selected window.
"""
return ''
def add_browse_mode_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when the property "browse_mode" has changed.
"""
def add_focused_document_view_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when the property "focused_document_view" has changed.
"""
def add_is_view_visible_listener(self, arg2: Callable, arg3: str) -> None:
"""
:param arg2: The listener that will be called when the property "is_view_visible" has changed.
:param arg3: The identifier string.
"""
def add_view_focus_changed_listener(self, arg2: Callable) -> None:
"""
:param arg2: The listener that will be called when the property "view_focus_changed" has changed.
"""
def available_main_views(self) -> list[str]:
"""
:return: A list of strings with the available subcomponent views.
"""
def browse_mode_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "browse_mode", False otherwise.
"""
def focus_view(self, arg2: str) -> None:
"""
:param arg2: The identifier string of the view to focus.
"""
def focused_document_view_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "focused_document_view", False otherwise.
"""
def hide_view(self, arg2: str) -> None:
"""
:param arg2: The identifier string of the view to hide.
"""
def is_view_visible(self, arg2: str, arg3: bool = True) -> bool:
"""
:param arg2: The identifier string of the view to check.
:param arg3: True if main window only, False otherwise.
:return: True if the view is visible, False otherwise.
"""
def is_view_visible_has_listener(self, arg2: str, arg3: Callable) -> bool:
"""
:param arg2: The identifier string of the view.
:param arg3: The function or method to check for.
:return: True if the listener is connected to the property "is_view_visible", False otherwise.
"""
def remove_browse_mode_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "browse_mode".
:param arg2: The listener to remove.
"""
def remove_focused_document_view_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "focused_document_view".
:param arg2: The listener to remove.
"""
def remove_is_view_visible_listener(self, arg2: str, arg3: Callable) -> None:
"""
:param arg2: The identifier string of the view.
:param arg3: The listener to remove.
"""
def remove_view_focus_changed_listener(self, arg2: Callable) -> None:
"""
Remove a previously set listener from property "view_focus_changed".
:param arg2: The listener to remove.
"""
def scroll_view(self, arg2: int, arg3: str, arg4: bool) -> None:
"""
:param arg2: The direction to scroll.
:param arg3: The identifier string of the view to scroll.
:param arg4: True if possible, False otherwise.
"""
def show_view(self, arg2: str) -> None:
"""
:param arg2: The identifier string of the view to show.
"""
def toggle_browse(self) -> None:
"""
:return: Reveals the device chain, the browser and starts hot swap for the selected device.
"""
def view_focus_changed_has_listener(self, arg2: Callable) -> bool:
"""
:param arg2: The function or method to check for.
:return: True if the listener is connected to the property "view_focus_changed", False otherwise.
"""
def zoom_view(self, arg2: int, arg3: str, arg4: bool) -> None:
"""
:param arg2: The direction to zoom.
:param arg3: The identifier string of the view to zoom.
:param arg4: True if possible, False otherwise.
"""
class NavDirection:
down = None
left = None
right = None
up = None
class UnavailableFeature:
note_velocity_ranges_and_probabilities = None
class UnavailableFeatureVector(Vector):
def append(self, arg2: UnavailableFeature) -> None:
pass
def extend(self, arg2: UnavailableFeature) -> None:
pass