ableton-js 2.3.1 → 2.3.4

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.4](https://github.com/leolabs/ableton.js/compare/v2.3.3...v2.3.4)
8
+
9
+ - :sparkles: Return the start and end time of clips in the raw clip [`1862efe`](https://github.com/leolabs/ableton.js/commit/1862efe6c6e8bc4d894cdce9b376e1fde93c8c7b)
10
+
11
+ #### [v2.3.3](https://github.com/leolabs/ableton.js/compare/v2.3.2...v2.3.3)
12
+
13
+ > 30 April 2022
14
+
15
+ - :sparkles: Add set_or_delete_cue, undo, and redo commands [`41d5ef7`](https://github.com/leolabs/ableton.js/commit/41d5ef7a2461fea95b125de13e18285beb47a2d6)
16
+
17
+ #### [v2.3.2](https://github.com/leolabs/ableton.js/compare/v2.3.1...v2.3.2)
18
+
19
+ > 30 March 2022
20
+
21
+ - :sparkles: Add a function to clear all event listeners [`809fe4e`](https://github.com/leolabs/ableton.js/commit/809fe4effb0893afb9aaac2cee8b13fb2e6fc5e5)
22
+
7
23
  #### [v2.3.1](https://github.com/leolabs/ableton.js/compare/v2.3.0...v2.3.1)
8
24
 
25
+ > 27 March 2022
26
+
9
27
  - :bug: Fix invalid import of the Timer object in Live 10 [`e003530`](https://github.com/leolabs/ableton.js/commit/e003530857191a0dc9aaacef954f7929813797a6)
10
28
 
11
29
  #### [v2.3.0](https://github.com/leolabs/ableton.js/compare/v2.2.1-0...v2.3.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
@@ -15,6 +15,8 @@ class Clip(Interface):
15
15
  "color": clip.color,
16
16
  "is_audio_clip": clip.is_audio_clip,
17
17
  "is_midi_clip": clip.is_midi_clip,
18
+ "start_time": clip.start_time,
19
+ "end_time": clip.end_time,
18
20
  }
19
21
 
20
22
  def __init__(self, c_instance, socket):
@@ -10,4 +10,4 @@ class Internal(Interface):
10
10
  return self
11
11
 
12
12
  def get_version(self, ns):
13
- return "2.3.1"
13
+ return "2.3.4"
package/ns/clip.d.ts CHANGED
@@ -132,6 +132,8 @@ export interface RawClip {
132
132
  color: number;
133
133
  is_audio_clip: boolean;
134
134
  is_midi_clip: boolean;
135
+ start_time: number;
136
+ end_time: number;
135
137
  }
136
138
  /**
137
139
  * This class represents an entry in Live's Session view matrix.
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ableton-js",
3
- "version": "2.3.1",
3
+ "version": "2.3.4",
4
4
  "description": "Control Ableton Live from Node",
5
5
  "main": "index.js",
6
6
  "author": "Leo Bernard <admin@leolabs.org>",