ableton-js 2.1.8 → 2.2.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 +9 -0
- package/README.md +3 -4
- package/index.js +8 -3
- package/midi-script/Internal.py +1 -1
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,17 @@ 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.2.0](https://github.com/leolabs/ableton.js/compare/v2.1.8...v2.2.0)
|
|
8
|
+
|
|
9
|
+
- :memo: Fix details in readme [`#36`](https://github.com/leolabs/ableton.js/pull/36)
|
|
10
|
+
- :bug: Fix errors on quick disconnect/connect [`#42`](https://github.com/leolabs/ableton.js/pull/42)
|
|
11
|
+
- :bug: Fix connected status on load of Ableton class [`#40`](https://github.com/leolabs/ableton.js/pull/40)
|
|
12
|
+
- :wrench: Add GitHub repo to NPM page [`#39`](https://github.com/leolabs/ableton.js/pull/39)
|
|
13
|
+
|
|
7
14
|
#### [v2.1.8](https://github.com/leolabs/ableton.js/compare/v2.1.7...v2.1.8)
|
|
8
15
|
|
|
16
|
+
> 18 February 2022
|
|
17
|
+
|
|
9
18
|
- :sparkles: Add observable props for quantization [`ffd192d`](https://github.com/leolabs/ableton.js/commit/ffd192d1590f33cdd18c2e01dbf66a0bc67878e4)
|
|
10
19
|
|
|
11
20
|
#### [v2.1.7](https://github.com/leolabs/ableton.js/compare/v2.1.6...v2.1.7)
|
package/README.md
CHANGED
|
@@ -22,8 +22,7 @@ get an overview of the current of your set.
|
|
|
22
22
|
|
|
23
23
|
To use this library, you'll need to install and activate the MIDI Remote Script
|
|
24
24
|
in Ableton.js. To do that, copy the `midi-script` folder of this repo to
|
|
25
|
-
Ableton's Remote Scripts folder
|
|
26
|
-
like `AbletonJS` for better identification. The MIDI Remote Scripts folder is
|
|
25
|
+
Ableton's Remote Scripts folder and rename it to `AbletonJS`. The MIDI Remote Scripts folder is
|
|
27
26
|
usually located at:
|
|
28
27
|
|
|
29
28
|
- **Windows:** {path to Ableton}\Resources\MIDI\Remote Scripts
|
|
@@ -55,8 +54,8 @@ const test = async () => {
|
|
|
55
54
|
ableton.song.addListener("is_playing", (p) => console.log("Playing:", p));
|
|
56
55
|
ableton.song.addListener("tempo", (t) => console.log("Tempo:", t));
|
|
57
56
|
|
|
58
|
-
const
|
|
59
|
-
console.log(
|
|
57
|
+
const tempo = await ableton.song.get("tempo");
|
|
58
|
+
console.log(tempo);
|
|
60
59
|
};
|
|
61
60
|
|
|
62
61
|
test();
|
package/index.js
CHANGED
|
@@ -92,7 +92,7 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
92
92
|
_this.listenPort = listenPort;
|
|
93
93
|
_this.msgMap = new Map();
|
|
94
94
|
_this.eventListeners = new Map();
|
|
95
|
-
_this._isConnected =
|
|
95
|
+
_this._isConnected = false;
|
|
96
96
|
_this.cancelConnectionEvent = false;
|
|
97
97
|
_this.buffer = [];
|
|
98
98
|
_this.latency = 0;
|
|
@@ -123,6 +123,7 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
123
123
|
if (this._isConnected && !this.cancelConnectionEvent) {
|
|
124
124
|
this._isConnected = false;
|
|
125
125
|
this.eventListeners.clear();
|
|
126
|
+
this.msgMap.forEach(function (msg) { return msg.clearTimeout(); });
|
|
126
127
|
this.msgMap.clear();
|
|
127
128
|
this.emit("disconnect", "heartbeat");
|
|
128
129
|
}
|
|
@@ -188,8 +189,9 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
188
189
|
return functionCallback.rej(new Error(data.data));
|
|
189
190
|
}
|
|
190
191
|
if (data.event === "disconnect") {
|
|
191
|
-
this.msgMap.clear();
|
|
192
192
|
this.eventListeners.clear();
|
|
193
|
+
this.msgMap.forEach(function (msg) { return msg.clearTimeout(); });
|
|
194
|
+
this.msgMap.clear();
|
|
193
195
|
if (this._isConnected === true) {
|
|
194
196
|
this._isConnected = false;
|
|
195
197
|
this.cancelConnectionEvent = true;
|
|
@@ -236,7 +238,7 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
236
238
|
rej(new TimeoutError([
|
|
237
239
|
"The command " + cls + "." + name + "(" + arg + ") timed out after " + timeout + " ms.",
|
|
238
240
|
"Please make sure that Ableton is running and that you have the latest",
|
|
239
|
-
"version of AbletonJS' midi script installed, listening on port",
|
|
241
|
+
"version of AbletonJS' midi script installed and renamed to \"AbletonJS\", listening on port",
|
|
240
242
|
_this.sendPort + " and sending on port " + _this.listenPort + ".",
|
|
241
243
|
].join(" "), payload));
|
|
242
244
|
}, timeout);
|
|
@@ -248,6 +250,9 @@ var Ableton = /** @class */ (function (_super) {
|
|
|
248
250
|
res(data);
|
|
249
251
|
},
|
|
250
252
|
rej: rej,
|
|
253
|
+
clearTimeout: function () {
|
|
254
|
+
clearTimeout(timeoutId);
|
|
255
|
+
},
|
|
251
256
|
});
|
|
252
257
|
_this.sendRaw(msg);
|
|
253
258
|
})];
|
package/midi-script/Internal.py
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ableton-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Control Ableton Live from Node",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Leo Bernard <admin@leolabs.org>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/leolabs/ableton-js.git"
|
|
11
|
+
},
|
|
8
12
|
"files": [
|
|
9
13
|
"**/*.js",
|
|
10
14
|
"**/*.d.ts",
|