ableton-js 2.3.4 → 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 CHANGED
@@ -4,8 +4,15 @@ 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
+
7
12
  #### [v2.3.4](https://github.com/leolabs/ableton.js/compare/v2.3.3...v2.3.4)
8
13
 
14
+ > 1 May 2022
15
+
9
16
  - :sparkles: Return the start and end time of clips in the raw clip [`1862efe`](https://github.com/leolabs/ableton.js/commit/1862efe6c6e8bc4d894cdce9b376e1fde93c8c7b)
10
17
 
11
18
  #### [v2.3.3](https://github.com/leolabs/ableton.js/compare/v2.3.2...v2.3.3)
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 = 9041; }
88
- if (listenPort === void 0) { listenPort = 9031; }
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", reuseAddr: true });
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
- _this.heartbeatInterval = setInterval(function () { return __awaiter(_this, void 0, void 0, function () {
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
- }); }, heartbeatInterval);
136
+ }); };
137
+ _this.heartbeatInterval = setInterval(heartbeat, heartbeatInterval);
138
+ heartbeat();
137
139
  _this.internal
138
140
  .get("version")
139
141
  .then(function (v) {
@@ -10,4 +10,4 @@ class Internal(Interface):
10
10
  return self
11
11
 
12
12
  def get_version(self, ns):
13
- return "2.3.4"
13
+ return "2.4.0"
@@ -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=9031, localhost='127.0.0.1', localport=9041):
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(socket.AF_INET, socket.SOCK_DGRAM)
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ableton-js",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
4
4
  "description": "Control Ableton Live from Node",
5
5
  "main": "index.js",
6
6
  "author": "Leo Bernard <admin@leolabs.org>",