ableton-js 3.3.4 → 3.3.5
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/midi-script/Song.py +3 -0
- package/midi-script/version.py +1 -1
- package/ns/scene.d.ts +2 -0
- package/ns/scene.js +2 -0
- package/ns/song.d.ts +4 -4
- package/ns/song.js +11 -7
- 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
|
+
#### [v3.3.5](https://github.com/leolabs/ableton.js/compare/v3.3.4...v3.3.5)
|
|
8
|
+
|
|
9
|
+
- :sparkles: Properly create and return scenes and tracks [`dc550f1`](https://github.com/leolabs/ableton.js/commit/dc550f15a79360caf3b247f5373a1d255b2b3476)
|
|
10
|
+
- :bug: Fix `createScene` not working when no index is provided [`e6bf99b`](https://github.com/leolabs/ableton.js/commit/e6bf99b7bcbcc053a2cddd12b5a77d91f36b0430)
|
|
11
|
+
|
|
7
12
|
#### [v3.3.4](https://github.com/leolabs/ableton.js/compare/v3.3.3...v3.3.4)
|
|
8
13
|
|
|
14
|
+
> 26 October 2023
|
|
15
|
+
|
|
9
16
|
- :sparkles: Add support for the Track View class [`3ff5980`](https://github.com/leolabs/ableton.js/commit/3ff5980e5e5f407bc6b767a5329b54774ca10534)
|
|
10
17
|
- :sparkles: Add a `safeStopPlaying` function that only stops playback when Live is currently playing to prevent accidental jumps to the beginning of the timeline [`a7b84e2`](https://github.com/leolabs/ableton.js/commit/a7b84e2146a69ab00cc75f83a4eedd5d91495eda)
|
|
11
18
|
- :art: Fix formatting [`f06d3d0`](https://github.com/leolabs/ableton.js/commit/f06d3d0cde4632612b1db8ea04e85f1276eb8bb6)
|
package/midi-script/Song.py
CHANGED
|
@@ -23,6 +23,9 @@ class Song(Interface):
|
|
|
23
23
|
def create_return_track(self, ns):
|
|
24
24
|
return Track.serialize_track(ns.create_return_track())
|
|
25
25
|
|
|
26
|
+
def create_scene(self, ns, index):
|
|
27
|
+
return Scene.serialize_scene(ns.create_scene(index))
|
|
28
|
+
|
|
26
29
|
def get_clip_trigger_quantization(self, ns):
|
|
27
30
|
return str(ns.clip_trigger_quantization)
|
|
28
31
|
|
package/midi-script/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "3.3.
|
|
1
|
+
version = "3.3.5"
|
package/ns/scene.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Ableton } from "..";
|
|
2
2
|
import { Namespace } from ".";
|
|
3
3
|
import { ClipSlot, RawClipSlot } from "./clip-slot";
|
|
4
|
+
import { Color } from "../util/color";
|
|
4
5
|
export interface GettableProperties {
|
|
5
6
|
clip_slots: RawClipSlot[];
|
|
6
7
|
color: number;
|
|
@@ -11,6 +12,7 @@ export interface GettableProperties {
|
|
|
11
12
|
tempo: number;
|
|
12
13
|
}
|
|
13
14
|
export interface TransformedProperties {
|
|
15
|
+
color: Color;
|
|
14
16
|
clip_slots: ClipSlot[];
|
|
15
17
|
}
|
|
16
18
|
export interface SettableProperties {
|
package/ns/scene.js
CHANGED
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Scene = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
const clip_slot_1 = require("./clip-slot");
|
|
6
|
+
const color_1 = require("../util/color");
|
|
6
7
|
class Scene extends _1.Namespace {
|
|
7
8
|
raw;
|
|
8
9
|
constructor(ableton, raw) {
|
|
9
10
|
super(ableton, "scene", raw.id);
|
|
10
11
|
this.raw = raw;
|
|
11
12
|
this.transformers = {
|
|
13
|
+
color: (c) => new color_1.Color(c),
|
|
12
14
|
clip_slots: (clip_slots) => clip_slots.map((c) => new clip_slot_1.ClipSlot(this.ableton, c)),
|
|
13
15
|
};
|
|
14
16
|
this.cachedProps = {
|
package/ns/song.d.ts
CHANGED
|
@@ -187,10 +187,10 @@ export declare class Song extends Namespace<GettableProperties, TransformedPrope
|
|
|
187
187
|
view: SongView;
|
|
188
188
|
beginUndoStep(): Promise<any>;
|
|
189
189
|
continuePlaying(): Promise<any>;
|
|
190
|
-
createAudioTrack(index?: number): Promise<
|
|
191
|
-
createMidiTrack(index?: number): Promise<
|
|
192
|
-
createReturnTrack(): Promise<
|
|
193
|
-
createScene(index?: number): Promise<
|
|
190
|
+
createAudioTrack(index?: number): Promise<Track>;
|
|
191
|
+
createMidiTrack(index?: number): Promise<Track>;
|
|
192
|
+
createReturnTrack(): Promise<Track>;
|
|
193
|
+
createScene(index?: number): Promise<Scene>;
|
|
194
194
|
deleteReturnTrack(index: number): Promise<any>;
|
|
195
195
|
deleteScene(index: number): Promise<any>;
|
|
196
196
|
deleteTrack(index: number): Promise<any>;
|
package/ns/song.js
CHANGED
|
@@ -71,17 +71,21 @@ class Song extends _1.Namespace {
|
|
|
71
71
|
async continuePlaying() {
|
|
72
72
|
return this.sendCommand("continue_playing");
|
|
73
73
|
}
|
|
74
|
-
async createAudioTrack(index) {
|
|
75
|
-
|
|
74
|
+
async createAudioTrack(index = -1) {
|
|
75
|
+
const result = await this.sendCommand("create_audio_track", { index });
|
|
76
|
+
return new track_1.Track(this.ableton, result);
|
|
76
77
|
}
|
|
77
|
-
async createMidiTrack(index) {
|
|
78
|
-
|
|
78
|
+
async createMidiTrack(index = -1) {
|
|
79
|
+
const result = await this.sendCommand("create_midi_track", { index });
|
|
80
|
+
return new track_1.Track(this.ableton, result);
|
|
79
81
|
}
|
|
80
82
|
async createReturnTrack() {
|
|
81
|
-
|
|
83
|
+
const result = await this.sendCommand("create_return_track");
|
|
84
|
+
return new track_1.Track(this.ableton, result);
|
|
82
85
|
}
|
|
83
|
-
async createScene(index) {
|
|
84
|
-
|
|
86
|
+
async createScene(index = -1) {
|
|
87
|
+
const result = await this.sendCommand("create_scene", { index });
|
|
88
|
+
return new scene_1.Scene(this.ableton, result);
|
|
85
89
|
}
|
|
86
90
|
async deleteReturnTrack(index) {
|
|
87
91
|
return this.sendCommand("delete_return_track", [index]);
|