ableton-js 2.5.4 → 2.6.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 +7 -0
- package/index.d.ts +6 -6
- package/midi-script/Interface.py +5 -1
- package/midi-script/Internal.py +1 -1
- package/midi-script/Song.py +11 -1
- package/midi-script/Track.py +0 -1
- package/ns/clip-slot.d.ts +1 -1
- package/ns/clip.d.ts +1 -1
- package/ns/cue-point.d.ts +1 -1
- package/ns/device-parameter.d.ts +1 -1
- package/ns/device.d.ts +1 -1
- package/ns/index.d.ts +2 -2
- package/ns/scene.d.ts +1 -1
- package/ns/track.d.ts +1 -1
- package/ns/track.js +1 -1
- package/package.json +1 -1
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.6.0](https://github.com/leolabs/ableton.js/compare/v2.5.4...v2.6.0)
|
|
8
|
+
|
|
9
|
+
- :sparkles: Make IDs stable over the lifespan of Live [`0bfcf90`](https://github.com/leolabs/ableton.js/commit/0bfcf904b54d42377877a2e9fab0796986f6aa1a)
|
|
10
|
+
- :sparkles: Add create_track methods [`a7dd6bc`](https://github.com/leolabs/ableton.js/commit/a7dd6bc53e2f49fb133b2eea2a1fe6eb1ff0aac6)
|
|
11
|
+
|
|
7
12
|
#### [v2.5.4](https://github.com/leolabs/ableton.js/compare/v2.5.3...v2.5.4)
|
|
8
13
|
|
|
14
|
+
> 19 October 2022
|
|
15
|
+
|
|
9
16
|
- :sparkles: Restart the socket when a message can't be sent due to a socket error [`91294c3`](https://github.com/leolabs/ableton.js/commit/91294c3cf195afacd22cbf1863e244bc231c9a33)
|
|
10
17
|
- :sparkles: Send the UUID back with the error if a requested namespace handler doesn't exist [`8a96a99`](https://github.com/leolabs/ableton.js/commit/8a96a996b8b65c8485d90ac98293ccd605497784)
|
|
11
18
|
- :memo: Add an example for setting a value [`f334983`](https://github.com/leolabs/ableton.js/commit/f334983a8755eab8415383aae7aff1ecff6e23e2)
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Midi } from "./ns/midi";
|
|
|
7
7
|
interface Command {
|
|
8
8
|
uuid: string;
|
|
9
9
|
ns: string;
|
|
10
|
-
nsid?:
|
|
10
|
+
nsid?: string;
|
|
11
11
|
name: string;
|
|
12
12
|
args?: {
|
|
13
13
|
[k: string]: any;
|
|
@@ -61,11 +61,11 @@ export declare class Ableton extends EventEmitter implements ConnectionEventEmit
|
|
|
61
61
|
* Sends a raw command to Ableton. Usually, you won't need this.
|
|
62
62
|
* A good starting point in general is the `song` prop.
|
|
63
63
|
*/
|
|
64
|
-
sendCommand(ns: string, nsid:
|
|
65
|
-
getProp(ns: string, nsid:
|
|
66
|
-
setProp(ns: string, nsid:
|
|
67
|
-
addPropListener(ns: string, nsid:
|
|
68
|
-
removePropListener(ns: string, nsid:
|
|
64
|
+
sendCommand(ns: string, nsid: string | undefined, name: string, args?: Record<string, any> | any[], timeout?: number): Promise<any>;
|
|
65
|
+
getProp(ns: string, nsid: string | undefined, prop: string): Promise<any>;
|
|
66
|
+
setProp(ns: string, nsid: string | undefined, prop: string, value: any): Promise<any>;
|
|
67
|
+
addPropListener(ns: string, nsid: string | undefined, prop: string, listener: (data: any) => any): Promise<() => Promise<boolean | undefined>>;
|
|
68
|
+
removePropListener(ns: string, nsid: string | undefined, prop: string, eventId: string, listener: (data: any) => any): Promise<boolean | undefined>;
|
|
69
69
|
/**
|
|
70
70
|
* Removes all event listeners that were attached to properties.
|
|
71
71
|
* This is useful for clearing all listeners when Live
|
package/midi-script/Interface.py
CHANGED
package/midi-script/Internal.py
CHANGED
package/midi-script/Song.py
CHANGED
|
@@ -8,9 +8,19 @@ from .Track import Track
|
|
|
8
8
|
class Song(Interface):
|
|
9
9
|
def __init__(self, c_instance, socket):
|
|
10
10
|
super(Song, self).__init__(c_instance, socket)
|
|
11
|
+
self.song = self.ableton.song()
|
|
11
12
|
|
|
12
13
|
def get_ns(self, nsid):
|
|
13
|
-
return self.
|
|
14
|
+
return self.song
|
|
15
|
+
|
|
16
|
+
def create_audio_track(self, ns, index):
|
|
17
|
+
return Track.serialize_track(ns.create_audio_track(index))
|
|
18
|
+
|
|
19
|
+
def create_midi_track(self, ns, index):
|
|
20
|
+
return Track.serialize_track(ns.create_midi_track(index))
|
|
21
|
+
|
|
22
|
+
def create_return_track(self, ns):
|
|
23
|
+
return Track.serialize_track(ns.create_return_track())
|
|
14
24
|
|
|
15
25
|
def get_clip_trigger_quantization(self, ns):
|
|
16
26
|
return str(ns.clip_trigger_quantization)
|
package/midi-script/Track.py
CHANGED
package/ns/clip-slot.d.ts
CHANGED
package/ns/clip.d.ts
CHANGED
package/ns/cue-point.d.ts
CHANGED
package/ns/device-parameter.d.ts
CHANGED
package/ns/device.d.ts
CHANGED
package/ns/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { Ableton } from "..";
|
|
|
2
2
|
export declare class Namespace<GP, TP, SP, OP> {
|
|
3
3
|
protected ableton: Ableton;
|
|
4
4
|
protected ns: string;
|
|
5
|
-
protected nsid?:
|
|
6
|
-
constructor(ableton: Ableton, ns: string, nsid?:
|
|
5
|
+
protected nsid?: string | undefined;
|
|
6
|
+
constructor(ableton: Ableton, ns: string, nsid?: string | undefined);
|
|
7
7
|
protected transformers: Partial<{
|
|
8
8
|
[T in Extract<keyof GP, keyof TP>]: (val: GP[T]) => TP[T];
|
|
9
9
|
}>;
|
package/ns/scene.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface ObservableProperties {
|
|
|
29
29
|
}
|
|
30
30
|
export interface RawScene {
|
|
31
31
|
color: number;
|
|
32
|
-
id:
|
|
32
|
+
id: string;
|
|
33
33
|
name: string;
|
|
34
34
|
}
|
|
35
35
|
export declare class Scene extends Namespace<GettableProperties, TransformedProperties, SettableProperties, ObservableProperties> {
|
package/ns/track.d.ts
CHANGED
package/ns/track.js
CHANGED
|
@@ -41,7 +41,7 @@ var Track = /** @class */ (function (_super) {
|
|
|
41
41
|
Track.prototype.duplicateClipToArrangement = function (clipID, time) {
|
|
42
42
|
return this.sendCommand("duplicate_clip_to_arrangement", {
|
|
43
43
|
clip_id: clipID,
|
|
44
|
-
time: time
|
|
44
|
+
time: time,
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
return Track;
|