ableton-js 2.7.2 → 2.7.3
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 +8 -0
- package/midi-script/Clip.py +9 -0
- package/midi-script/Internal.py +1 -1
- package/ns/clip.d.ts +6 -0
- package/ns/song.d.ts +1 -1
- package/ns/song.js +4 -4
- package/ns/track.d.ts +5 -1
- package/ns/track.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,16 @@ 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.7.3](https://github.com/leolabs/ableton.js/compare/v2.7.2...v2.7.3)
|
|
8
|
+
|
|
9
|
+
- Add functionality for getting warp markers [`#61`](https://github.com/leolabs/ableton.js/pull/61)
|
|
10
|
+
- :sparkles: Support passing a clip object to duplicateClipToArrangement [`ab9656a`](https://github.com/leolabs/ableton.js/commit/ab9656ac9f45a12afb41327793b0b287c8d798e6)
|
|
11
|
+
- :bug: Fix `create_*_track` functions not working properly [`937edca`](https://github.com/leolabs/ableton.js/commit/937edca2c3bc5ad65d1bccc7f07c9642a25093ab)
|
|
12
|
+
|
|
7
13
|
#### [v2.7.2](https://github.com/leolabs/ableton.js/compare/v2.7.1...v2.7.2)
|
|
8
14
|
|
|
15
|
+
> 10 November 2022
|
|
16
|
+
|
|
9
17
|
- :bug: Fix runtime error caused by accessing a missing variable [`83427ac`](https://github.com/leolabs/ableton.js/commit/83427acafffb276fda2573555332372be608c4bf)
|
|
10
18
|
|
|
11
19
|
#### [v2.7.1](https://github.com/leolabs/ableton.js/compare/v2.7.0...v2.7.1)
|
package/midi-script/Clip.py
CHANGED
|
@@ -29,6 +29,15 @@ class Clip(Interface):
|
|
|
29
29
|
def get_notes(self, ns, from_time=0, from_pitch=0, time_span=99999999999999, pitch_span=128):
|
|
30
30
|
return ns.get_notes(from_time, from_pitch, time_span, pitch_span)
|
|
31
31
|
|
|
32
|
+
def get_warp_markers(self, ns):
|
|
33
|
+
dict_markers = []
|
|
34
|
+
for warp_marker in ns.warp_markers:
|
|
35
|
+
dict_markers.append({
|
|
36
|
+
"beat_time": warp_marker.beat_time,
|
|
37
|
+
"sample_time": warp_marker.sample_time,
|
|
38
|
+
})
|
|
39
|
+
return dict_markers
|
|
40
|
+
|
|
32
41
|
def set_notes(self, ns, notes):
|
|
33
42
|
return ns.set_notes(tuple(notes))
|
|
34
43
|
|
package/midi-script/Internal.py
CHANGED
package/ns/clip.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ export declare enum LaunchQuantization {
|
|
|
34
34
|
QSixteenthTriplet = 13,
|
|
35
35
|
QThirtySecond = 14
|
|
36
36
|
}
|
|
37
|
+
interface WarpMarker {
|
|
38
|
+
beat_time: number;
|
|
39
|
+
sample_time: number;
|
|
40
|
+
}
|
|
37
41
|
export interface GettableProperties {
|
|
38
42
|
available_warp_modes: WarpMode[];
|
|
39
43
|
color: number;
|
|
@@ -72,6 +76,7 @@ export interface GettableProperties {
|
|
|
72
76
|
start_time: number;
|
|
73
77
|
velocity_amount: number;
|
|
74
78
|
warp_mode: WarpMode;
|
|
79
|
+
warp_markers: WarpMarker[];
|
|
75
80
|
warping: boolean;
|
|
76
81
|
will_record_on_start: boolean;
|
|
77
82
|
}
|
|
@@ -259,3 +264,4 @@ export declare class Clip extends Namespace<GettableProperties, TransformedPrope
|
|
|
259
264
|
*/
|
|
260
265
|
stopScrub(): Promise<void>;
|
|
261
266
|
}
|
|
267
|
+
export {};
|
package/ns/song.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ export declare class Song extends Namespace<GettableProperties, TransformedPrope
|
|
|
185
185
|
continuePlaying(): Promise<any>;
|
|
186
186
|
createAudioTrack(index?: number): Promise<any>;
|
|
187
187
|
createMidiTrack(index?: number): Promise<any>;
|
|
188
|
-
createReturnTrack(
|
|
188
|
+
createReturnTrack(): Promise<any>;
|
|
189
189
|
createScene(index?: number): Promise<any>;
|
|
190
190
|
deleteReturnTrack(index: number): Promise<any>;
|
|
191
191
|
deleteScene(index: number): Promise<any>;
|
package/ns/song.js
CHANGED
|
@@ -135,21 +135,21 @@ var Song = /** @class */ (function (_super) {
|
|
|
135
135
|
Song.prototype.createAudioTrack = function (index) {
|
|
136
136
|
return __awaiter(this, void 0, void 0, function () {
|
|
137
137
|
return __generator(this, function (_a) {
|
|
138
|
-
return [2 /*return*/, this.sendCommand("create_audio_track",
|
|
138
|
+
return [2 /*return*/, this.sendCommand("create_audio_track", { index: index })];
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
Song.prototype.createMidiTrack = function (index) {
|
|
143
143
|
return __awaiter(this, void 0, void 0, function () {
|
|
144
144
|
return __generator(this, function (_a) {
|
|
145
|
-
return [2 /*return*/, this.sendCommand("create_midi_track",
|
|
145
|
+
return [2 /*return*/, this.sendCommand("create_midi_track", { index: index })];
|
|
146
146
|
});
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
|
-
Song.prototype.createReturnTrack = function (
|
|
149
|
+
Song.prototype.createReturnTrack = function () {
|
|
150
150
|
return __awaiter(this, void 0, void 0, function () {
|
|
151
151
|
return __generator(this, function (_a) {
|
|
152
|
-
return [2 /*return*/, this.sendCommand("create_return_track"
|
|
152
|
+
return [2 /*return*/, this.sendCommand("create_return_track")];
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
155
|
};
|
package/ns/track.d.ts
CHANGED
|
@@ -120,5 +120,9 @@ export interface RawTrack {
|
|
|
120
120
|
export declare class Track extends Namespace<GettableProperties, TransformedProperties, SettableProperties, ObservableProperties> {
|
|
121
121
|
raw: RawTrack;
|
|
122
122
|
constructor(ableton: Ableton, raw: RawTrack);
|
|
123
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Duplicates the given clip into the arrangement of this track at the provided destination time and returns it.
|
|
125
|
+
* When the type of the clip and the type of the track are incompatible, a runtime error is raised.
|
|
126
|
+
*/
|
|
127
|
+
duplicateClipToArrangement(clipOrId: Clip | number, time: number): Promise<any>;
|
|
124
128
|
}
|
package/ns/track.js
CHANGED
|
@@ -43,9 +43,13 @@ var Track = /** @class */ (function (_super) {
|
|
|
43
43
|
};
|
|
44
44
|
return _this;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Duplicates the given clip into the arrangement of this track at the provided destination time and returns it.
|
|
48
|
+
* When the type of the clip and the type of the track are incompatible, a runtime error is raised.
|
|
49
|
+
*/
|
|
50
|
+
Track.prototype.duplicateClipToArrangement = function (clipOrId, time) {
|
|
47
51
|
return this.sendCommand("duplicate_clip_to_arrangement", {
|
|
48
|
-
clip_id:
|
|
52
|
+
clip_id: typeof clipOrId === "number" ? clipOrId : clipOrId.raw.id,
|
|
49
53
|
time: time,
|
|
50
54
|
});
|
|
51
55
|
};
|