ableton-js 2.2.1-0 → 2.3.2

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,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.2](https://github.com/leolabs/ableton.js/compare/v2.3.1...v2.3.2)
8
+
9
+ - :sparkles: Add a function to clear all event listeners [`809fe4e`](https://github.com/leolabs/ableton.js/commit/809fe4effb0893afb9aaac2cee8b13fb2e6fc5e5)
10
+
11
+ #### [v2.3.1](https://github.com/leolabs/ableton.js/compare/v2.3.0...v2.3.1)
12
+
13
+ > 27 March 2022
14
+
15
+ - :bug: Fix invalid import of the Timer object in Live 10 [`e003530`](https://github.com/leolabs/ableton.js/commit/e003530857191a0dc9aaacef954f7929813797a6)
16
+
17
+ #### [v2.3.0](https://github.com/leolabs/ableton.js/compare/v2.2.1-0...v2.3.0)
18
+
19
+ > 27 March 2022
20
+
21
+ - :sparkles: Add the clip's name as an observable property [`78c9969`](https://github.com/leolabs/ableton.js/commit/78c99694e8e230ad4ecb022316ebed731994fc6f)
22
+
7
23
  #### [v2.2.1-0](https://github.com/leolabs/ableton.js/compare/v2.2.0...v2.2.1-0)
8
24
 
25
+ > 26 March 2022
26
+
9
27
  - :sparkles: Implement basic Application interface to fetch live version and dialog information [`5aba86f`](https://github.com/leolabs/ableton.js/commit/5aba86f811ff36d43a99a657a2789e3d9ac59cce)
10
28
  - :white_check_mark: Add tests for the application namespace [`9954cdf`](https://github.com/leolabs/ableton.js/commit/9954cdf724a41d8705a62fa50ac5cb06b162e1f1)
11
29
  - :sparkles: Add support for listing clips in arrangement view [`e7df690`](https://github.com/leolabs/ableton.js/commit/e7df69060ccc7e098b1b4f5d418a79a60d57c4ce)
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
@@ -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
- from Live.Base import Timer
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()
@@ -10,4 +10,4 @@ class Internal(Interface):
10
10
  return self
11
11
 
12
12
  def get_version(self, ns):
13
- return "2.2.1-0"
13
+ return "2.3.2"
package/ns/clip.d.ts CHANGED
@@ -115,6 +115,7 @@ export interface ObservableProperties {
115
115
  is_recording: boolean;
116
116
  loop_end: number;
117
117
  loop_start: number;
118
+ name: string;
118
119
  pitch_coarse: number;
119
120
  pitch_fine: number;
120
121
  playing_position: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ableton-js",
3
- "version": "2.2.1-0",
3
+ "version": "2.3.2",
4
4
  "description": "Control Ableton Live from Node",
5
5
  "main": "index.js",
6
6
  "author": "Leo Bernard <admin@leolabs.org>",