ableton-js
Advanced tools
Comparing version
@@ -7,4 +7,11 @@ ### Changelog | ||
#### [v3.3.5](https://github.com/leolabs/ableton.js/compare/v3.3.4...v3.3.5) | ||
- :sparkles: Properly create and return scenes and tracks [`dc550f1`](https://github.com/leolabs/ableton.js/commit/dc550f15a79360caf3b247f5373a1d255b2b3476) | ||
- :bug: Fix `createScene` not working when no index is provided [`e6bf99b`](https://github.com/leolabs/ableton.js/commit/e6bf99b7bcbcc053a2cddd12b5a77d91f36b0430) | ||
#### [v3.3.4](https://github.com/leolabs/ableton.js/compare/v3.3.3...v3.3.4) | ||
> 26 October 2023 | ||
- :sparkles: Add support for the Track View class [`3ff5980`](https://github.com/leolabs/ableton.js/commit/3ff5980e5e5f407bc6b767a5329b54774ca10534) | ||
@@ -11,0 +18,0 @@ - :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) |
import { Ableton } from ".."; | ||
import { Namespace } from "."; | ||
import { ClipSlot, RawClipSlot } from "./clip-slot"; | ||
import { Color } from "../util/color"; | ||
export interface GettableProperties { | ||
@@ -14,2 +15,3 @@ clip_slots: RawClipSlot[]; | ||
export interface TransformedProperties { | ||
color: Color; | ||
clip_slots: ClipSlot[]; | ||
@@ -16,0 +18,0 @@ } |
@@ -6,2 +6,3 @@ "use strict"; | ||
const clip_slot_1 = require("./clip-slot"); | ||
const color_1 = require("../util/color"); | ||
class Scene extends _1.Namespace { | ||
@@ -13,2 +14,3 @@ raw; | ||
this.transformers = { | ||
color: (c) => new color_1.Color(c), | ||
clip_slots: (clip_slots) => clip_slots.map((c) => new clip_slot_1.ClipSlot(this.ableton, c)), | ||
@@ -15,0 +17,0 @@ }; |
@@ -190,6 +190,6 @@ import { Ableton } from ".."; | ||
continuePlaying(): Promise<any>; | ||
createAudioTrack(index?: number): Promise<any>; | ||
createMidiTrack(index?: number): Promise<any>; | ||
createReturnTrack(): Promise<any>; | ||
createScene(index?: number): Promise<any>; | ||
createAudioTrack(index?: number): Promise<Track>; | ||
createMidiTrack(index?: number): Promise<Track>; | ||
createReturnTrack(): Promise<Track>; | ||
createScene(index?: number): Promise<Scene>; | ||
deleteReturnTrack(index: number): Promise<any>; | ||
@@ -196,0 +196,0 @@ deleteScene(index: number): Promise<any>; |
@@ -74,13 +74,17 @@ "use strict"; | ||
} | ||
async createAudioTrack(index) { | ||
return this.sendCommand("create_audio_track", { index }); | ||
async createAudioTrack(index = -1) { | ||
const result = await this.sendCommand("create_audio_track", { index }); | ||
return new track_1.Track(this.ableton, result); | ||
} | ||
async createMidiTrack(index) { | ||
return this.sendCommand("create_midi_track", { index }); | ||
async createMidiTrack(index = -1) { | ||
const result = await this.sendCommand("create_midi_track", { index }); | ||
return new track_1.Track(this.ableton, result); | ||
} | ||
async createReturnTrack() { | ||
return this.sendCommand("create_return_track"); | ||
const result = await this.sendCommand("create_return_track"); | ||
return new track_1.Track(this.ableton, result); | ||
} | ||
async createScene(index) { | ||
return this.sendCommand("create_scene", [index]); | ||
async createScene(index = -1) { | ||
const result = await this.sendCommand("create_scene", { index }); | ||
return new scene_1.Scene(this.ableton, result); | ||
} | ||
@@ -87,0 +91,0 @@ async deleteReturnTrack(index) { |
{ | ||
"name": "ableton-js", | ||
"version": "3.3.4", | ||
"version": "3.3.5", | ||
"description": "Control Ableton Live from Node", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
193548
0.5%3913
0.26%