ableton-js 2.3.0 → 2.3.3
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.
- package/CHANGELOG.md +18 -0
- package/index.d.ts +6 -0
- package/index.js +8 -0
- package/midi-script/AbletonJS.py +2 -2
- package/midi-script/Internal.py +1 -1
- package/ns/song.d.ts +3 -0
- package/ns/song.js +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,26 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.3.3](https://github.com/leolabs/ableton.js/compare/v2.3.2...v2.3.3)
|
|
8
|
+
|
|
9
|
+
- :sparkles: Add set_or_delete_cue, undo, and redo commands [`41d5ef7`](https://github.com/leolabs/ableton.js/commit/41d5ef7a2461fea95b125de13e18285beb47a2d6)
|
|
10
|
+
|
|
11
|
+
#### [v2.3.2](https://github.com/leolabs/ableton.js/compare/v2.3.1...v2.3.2)
|
|
12
|
+
|
|
13
|
+
> 30 March 2022
|
|
14
|
+
|
|
15
|
+
- :sparkles: Add a function to clear all event listeners [`809fe4e`](https://github.com/leolabs/ableton.js/commit/809fe4effb0893afb9aaac2cee8b13fb2e6fc5e5)
|
|
16
|
+
|
|
17
|
+
#### [v2.3.1](https://github.com/leolabs/ableton.js/compare/v2.3.0...v2.3.1)
|
|
18
|
+
|
|
19
|
+
> 27 March 2022
|
|
20
|
+
|
|
21
|
+
- :bug: Fix invalid import of the Timer object in Live 10 [`e003530`](https://github.com/leolabs/ableton.js/commit/e003530857191a0dc9aaacef954f7929813797a6)
|
|
22
|
+
|
|
7
23
|
#### [v2.3.0](https://github.com/leolabs/ableton.js/compare/v2.2.1-0...v2.3.0)
|
|
8
24
|
|
|
25
|
+
> 27 March 2022
|
|
26
|
+
|
|
9
27
|
- :sparkles: Add the clip's name as an observable property [`78c9969`](https://github.com/leolabs/ableton.js/commit/78c99694e8e230ad4ecb022316ebed731994fc6f)
|
|
10
28
|
|
|
11
29
|
#### [v2.2.1-0](https://github.com/leolabs/ableton.js/compare/v2.2.0...v2.2.1-0)
|
package/index.d.ts
CHANGED
|
@@ -64,6 +64,12 @@ export declare class Ableton extends EventEmitter implements ConnectionEventEmit
|
|
|
64
64
|
setProp(ns: string, nsid: number | undefined, prop: string, value: any): Promise<any>;
|
|
65
65
|
addPropListener(ns: string, nsid: number | undefined, prop: string, listener: (data: any) => any): Promise<() => Promise<boolean | undefined>>;
|
|
66
66
|
removePropListener(ns: string, nsid: number | undefined, prop: string, eventId: string, listener: (data: any) => any): Promise<boolean | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Removes all event listeners that were attached to properties.
|
|
69
|
+
* This is useful for clearing all listeners when Live
|
|
70
|
+
* disconnects, for example.
|
|
71
|
+
*/
|
|
72
|
+
removeAllPropListeners(): void;
|
|
67
73
|
sendRaw(msg: string): void;
|
|
68
74
|
isConnected(): boolean;
|
|
69
75
|
}
|
package/index.js
CHANGED
|
@@ -328,6 +328,14 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
328
328
|
});
|
|
329
329
|
});
|
|
330
330
|
};
|
|
331
|
+
/**
|
|
332
|
+
* Removes all event listeners that were attached to properties.
|
|
333
|
+
* This is useful for clearing all listeners when Live
|
|
334
|
+
* disconnects, for example.
|
|
335
|
+
*/
|
|
336
|
+
Ableton.prototype.removeAllPropListeners = function () {
|
|
337
|
+
this.eventListeners.clear();
|
|
338
|
+
};
|
|
331
339
|
Ableton.prototype.sendRaw = function (msg) {
|
|
332
340
|
var buffer = zlib_1.deflateSync(Buffer.from(msg));
|
|
333
341
|
// Based on this thread, 7500 bytes seems like a safe value
|
package/midi-script/AbletonJS.py
CHANGED
|
@@ -15,7 +15,7 @@ from .Internal import Internal
|
|
|
15
15
|
from .ClipSlot import ClipSlot
|
|
16
16
|
from .Clip import Clip
|
|
17
17
|
from _Framework.ControlSurface import ControlSurface
|
|
18
|
-
|
|
18
|
+
import Live
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class AbletonJS(ControlSurface):
|
|
@@ -40,7 +40,7 @@ class AbletonJS(ControlSurface):
|
|
|
40
40
|
"clip": Clip(c_instance, self.socket)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
self.recv_loop = Timer(
|
|
43
|
+
self.recv_loop = Live.Base.Timer(
|
|
44
44
|
callback=self.socket.process, interval=10, repeat=True)
|
|
45
45
|
|
|
46
46
|
self.recv_loop.start()
|
package/midi-script/Internal.py
CHANGED
package/ns/song.d.ts
CHANGED
|
@@ -200,10 +200,13 @@ export declare class Song extends Namespace<GettableProperties, TransformedPrope
|
|
|
200
200
|
jumpToNextCue(): Promise<any>;
|
|
201
201
|
jumpToPrevCue(): Promise<any>;
|
|
202
202
|
playSelection(): Promise<any>;
|
|
203
|
+
redo(): Promise<any>;
|
|
203
204
|
scrubBy(amount: number): Promise<any>;
|
|
204
205
|
setData(key: string, value: any): Promise<any>;
|
|
206
|
+
setOrDeleteCue(): Promise<any>;
|
|
205
207
|
startPlaying(): Promise<any>;
|
|
206
208
|
stopAllClips(): Promise<any>;
|
|
207
209
|
stopPlaying(): Promise<any>;
|
|
208
210
|
tapTempo(): Promise<any>;
|
|
211
|
+
undo(): Promise<any>;
|
|
209
212
|
}
|
package/ns/song.js
CHANGED
|
@@ -243,6 +243,13 @@ var Song = /** @class */ (function (_super) {
|
|
|
243
243
|
});
|
|
244
244
|
});
|
|
245
245
|
};
|
|
246
|
+
Song.prototype.redo = function () {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
248
|
+
return __generator(this, function (_a) {
|
|
249
|
+
return [2 /*return*/, this.sendCommand("redo")];
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
};
|
|
246
253
|
Song.prototype.scrubBy = function (amount) {
|
|
247
254
|
return __awaiter(this, void 0, void 0, function () {
|
|
248
255
|
return __generator(this, function (_a) {
|
|
@@ -257,6 +264,13 @@ var Song = /** @class */ (function (_super) {
|
|
|
257
264
|
});
|
|
258
265
|
});
|
|
259
266
|
};
|
|
267
|
+
Song.prototype.setOrDeleteCue = function () {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
269
|
+
return __generator(this, function (_a) {
|
|
270
|
+
return [2 /*return*/, this.sendCommand("set_or_delete_cue")];
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
};
|
|
260
274
|
Song.prototype.startPlaying = function () {
|
|
261
275
|
return __awaiter(this, void 0, void 0, function () {
|
|
262
276
|
return __generator(this, function (_a) {
|
|
@@ -285,6 +299,13 @@ var Song = /** @class */ (function (_super) {
|
|
|
285
299
|
});
|
|
286
300
|
});
|
|
287
301
|
};
|
|
302
|
+
Song.prototype.undo = function () {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
304
|
+
return __generator(this, function (_a) {
|
|
305
|
+
return [2 /*return*/, this.sendCommand("undo")];
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
};
|
|
288
309
|
return Song;
|
|
289
310
|
}(_1.Namespace));
|
|
290
311
|
exports.Song = Song;
|