ableton-js 2.3.2 → 2.4.0
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 +19 -0
- package/index.js +7 -5
- package/midi-script/Clip.py +2 -0
- package/midi-script/Internal.py +1 -1
- package/midi-script/Socket.py +3 -2
- package/ns/clip.d.ts +2 -0
- 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,27 @@ 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.4.0](https://github.com/leolabs/ableton.js/compare/v2.3.4...v2.4.0)
|
|
8
|
+
|
|
9
|
+
- :wrench: Use ports 39031 and 39041 to avoid collisions with other applications [`e3bd84c`](https://github.com/leolabs/ableton.js/commit/e3bd84cadf92af5d648533fd656c90722f5d8ab2)
|
|
10
|
+
- :sparkles: Run the heartbeat check once after initializing the class [`8db0bd6`](https://github.com/leolabs/ableton.js/commit/8db0bd66f5dec534f38c1319cacd2cc91da89f6a)
|
|
11
|
+
|
|
12
|
+
#### [v2.3.4](https://github.com/leolabs/ableton.js/compare/v2.3.3...v2.3.4)
|
|
13
|
+
|
|
14
|
+
> 1 May 2022
|
|
15
|
+
|
|
16
|
+
- :sparkles: Return the start and end time of clips in the raw clip [`1862efe`](https://github.com/leolabs/ableton.js/commit/1862efe6c6e8bc4d894cdce9b376e1fde93c8c7b)
|
|
17
|
+
|
|
18
|
+
#### [v2.3.3](https://github.com/leolabs/ableton.js/compare/v2.3.2...v2.3.3)
|
|
19
|
+
|
|
20
|
+
> 30 April 2022
|
|
21
|
+
|
|
22
|
+
- :sparkles: Add set_or_delete_cue, undo, and redo commands [`41d5ef7`](https://github.com/leolabs/ableton.js/commit/41d5ef7a2461fea95b125de13e18285beb47a2d6)
|
|
23
|
+
|
|
7
24
|
#### [v2.3.2](https://github.com/leolabs/ableton.js/compare/v2.3.1...v2.3.2)
|
|
8
25
|
|
|
26
|
+
> 30 March 2022
|
|
27
|
+
|
|
9
28
|
- :sparkles: Add a function to clear all event listeners [`809fe4e`](https://github.com/leolabs/ableton.js/commit/809fe4effb0893afb9aaac2cee8b13fb2e6fc5e5)
|
|
10
29
|
|
|
11
30
|
#### [v2.3.1](https://github.com/leolabs/ableton.js/compare/v2.3.0...v2.3.1)
|
package/index.js
CHANGED
|
@@ -84,8 +84,8 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
84
84
|
__extends(Ableton, _super);
|
|
85
85
|
function Ableton(host, sendPort, listenPort, heartbeatInterval) {
|
|
86
86
|
if (host === void 0) { host = "127.0.0.1"; }
|
|
87
|
-
if (sendPort === void 0) { sendPort =
|
|
88
|
-
if (listenPort === void 0) { listenPort =
|
|
87
|
+
if (sendPort === void 0) { sendPort = 39041; }
|
|
88
|
+
if (listenPort === void 0) { listenPort = 39031; }
|
|
89
89
|
if (heartbeatInterval === void 0) { heartbeatInterval = 2000; }
|
|
90
90
|
var _this = _super.call(this) || this;
|
|
91
91
|
_this.host = host;
|
|
@@ -100,10 +100,10 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
100
100
|
_this.song = new song_1.Song(_this);
|
|
101
101
|
_this.application = new application_1.Application(_this);
|
|
102
102
|
_this.internal = new internal_1.Internal(_this);
|
|
103
|
-
_this.client = dgram_1.default.createSocket({ type: "udp4"
|
|
103
|
+
_this.client = dgram_1.default.createSocket({ type: "udp4" });
|
|
104
104
|
_this.client.bind(_this.listenPort, host);
|
|
105
105
|
_this.client.addListener("message", _this.handleIncoming.bind(_this));
|
|
106
|
-
|
|
106
|
+
var heartbeat = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
107
107
|
var e_1;
|
|
108
108
|
return __generator(this, function (_a) {
|
|
109
109
|
switch (_a.label) {
|
|
@@ -133,7 +133,9 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
133
133
|
case 4: return [2 /*return*/];
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
}); }
|
|
136
|
+
}); };
|
|
137
|
+
_this.heartbeatInterval = setInterval(heartbeat, heartbeatInterval);
|
|
138
|
+
heartbeat();
|
|
137
139
|
_this.internal
|
|
138
140
|
.get("version")
|
|
139
141
|
.then(function (v) {
|
package/midi-script/Clip.py
CHANGED
package/midi-script/Internal.py
CHANGED
package/midi-script/Socket.py
CHANGED
|
@@ -22,10 +22,11 @@ class Socket(object):
|
|
|
22
22
|
def set_message(func):
|
|
23
23
|
Socket.show_message = func
|
|
24
24
|
|
|
25
|
-
def __init__(self, handler, remotehost='127.0.0.1', remoteport=
|
|
25
|
+
def __init__(self, handler, remotehost='127.0.0.1', remoteport=39031, localhost='127.0.0.1', localport=39041):
|
|
26
26
|
self.input_handler = handler
|
|
27
27
|
|
|
28
|
-
self._socket = socket.socket(
|
|
28
|
+
self._socket = socket.socket(
|
|
29
|
+
socket.AF_INET, socket.SOCK_DGRAM)
|
|
29
30
|
self._socket.setblocking(0)
|
|
30
31
|
|
|
31
32
|
self._local_addr = (localhost, localport)
|
package/ns/clip.d.ts
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;
|