ableton-js 3.4.0 → 3.4.1
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/Song.py +7 -0
- package/midi-script/Track.py +16 -2
- package/midi-script/version.py +1 -1
- package/ns/song.d.ts +16 -1
- package/ns/song.js +17 -0
- 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
|
+
#### [v3.4.1](https://github.com/leolabs/ableton.js/compare/v3.4.0...v3.4.1)
|
|
8
|
+
|
|
9
|
+
- :sparkles: Add a `safeStartPlaying` method that only calls `start_playing` when Live is currently stopped [`46e1354`](https://github.com/leolabs/ableton.js/commit/46e13549f0c33ef6d82d20c42df30fb8c539af32)
|
|
10
|
+
- :bug: Fix master track erroring because it doesn't have solo/mute properties [`3b58e72`](https://github.com/leolabs/ableton.js/commit/3b58e7205a5e547b7e0f2e0784eb9be71548ce1c)
|
|
11
|
+
- :mute: Don't log results of getting track view properties [`3b4a5bd`](https://github.com/leolabs/ableton.js/commit/3b4a5bd07c3be7b7ec9f2cc21574b72d1fb375b4)
|
|
12
|
+
|
|
7
13
|
#### [v3.4.0](https://github.com/leolabs/ableton.js/compare/v3.3.5...v3.4.0)
|
|
8
14
|
|
|
15
|
+
> 11 November 2023
|
|
16
|
+
|
|
9
17
|
- :bug: Fix setting quantizations not working correctly [`cd7a6e5`](https://github.com/leolabs/ableton.js/commit/cd7a6e52e65ad8dea9082b8b24afed952f6b33ad)
|
|
10
18
|
- :sparkles: Return mute and solo properties for each track [`5585533`](https://github.com/leolabs/ableton.js/commit/558553386dc7a0927541c2b246cc27fd86677641)
|
|
11
19
|
|
package/midi-script/Song.py
CHANGED
|
@@ -103,6 +103,13 @@ class Song(Interface):
|
|
|
103
103
|
quantization = REC_QUANTIZATIONS.get(str(name), REC_QUANTIZATIONS['rec_q_no_q'])
|
|
104
104
|
ns.midi_recording_quantization = quantization
|
|
105
105
|
|
|
106
|
+
def safe_start_playing(self, ns):
|
|
107
|
+
if not self.song.is_playing:
|
|
108
|
+
self.song.start_playing()
|
|
109
|
+
return True
|
|
110
|
+
|
|
111
|
+
return False
|
|
112
|
+
|
|
106
113
|
def safe_stop_playing(self, ns):
|
|
107
114
|
if self.song.is_playing:
|
|
108
115
|
self.song.stop_playing()
|
package/midi-script/Track.py
CHANGED
|
@@ -14,11 +14,25 @@ class Track(Interface):
|
|
|
14
14
|
return None
|
|
15
15
|
|
|
16
16
|
track_id = Interface.save_obj(track)
|
|
17
|
+
|
|
18
|
+
solo = False
|
|
19
|
+
mute = False
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
solo = track.solo
|
|
23
|
+
except:
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
mute = track.mute
|
|
28
|
+
except:
|
|
29
|
+
pass
|
|
30
|
+
|
|
17
31
|
return {
|
|
18
32
|
"id": track_id,
|
|
19
33
|
"name": track.name,
|
|
20
|
-
"solo":
|
|
21
|
-
"mute":
|
|
34
|
+
"solo": solo,
|
|
35
|
+
"mute": mute,
|
|
22
36
|
"color": track.color,
|
|
23
37
|
"color_index": track.color_index,
|
|
24
38
|
"is_foldable": track.is_foldable,
|
package/midi-script/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "3.4.
|
|
1
|
+
version = "3.4.1"
|
package/ns/song.d.ts
CHANGED
|
@@ -211,7 +211,22 @@ export declare class Song extends Namespace<GettableProperties, TransformedPrope
|
|
|
211
211
|
startPlaying(): Promise<any>;
|
|
212
212
|
stopAllClips(): Promise<any>;
|
|
213
213
|
stopPlaying(): Promise<any>;
|
|
214
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Only starts playing when Live is currently not playing
|
|
216
|
+
* to prevent Live from jumping back to the start when it's
|
|
217
|
+
* already playing.
|
|
218
|
+
*
|
|
219
|
+
* @returns a boolean indicating whether the command was executed
|
|
220
|
+
*/
|
|
221
|
+
safeStartPlaying(): Promise<boolean>;
|
|
222
|
+
/**
|
|
223
|
+
* Only stops playback when Live is currently playing to prevent
|
|
224
|
+
* Live jumping back to the beginning of the arrangement when it's
|
|
225
|
+
* already stopped.
|
|
226
|
+
*
|
|
227
|
+
* @returns a boolean indicating whether the command was executed
|
|
228
|
+
*/
|
|
229
|
+
safeStopPlaying(): Promise<boolean>;
|
|
215
230
|
tapTempo(): Promise<any>;
|
|
216
231
|
undo(): Promise<any>;
|
|
217
232
|
}
|
package/ns/song.js
CHANGED
|
@@ -147,6 +147,23 @@ class Song extends _1.Namespace {
|
|
|
147
147
|
async stopPlaying() {
|
|
148
148
|
return this.sendCommand("stop_playing");
|
|
149
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Only starts playing when Live is currently not playing
|
|
152
|
+
* to prevent Live from jumping back to the start when it's
|
|
153
|
+
* already playing.
|
|
154
|
+
*
|
|
155
|
+
* @returns a boolean indicating whether the command was executed
|
|
156
|
+
*/
|
|
157
|
+
async safeStartPlaying() {
|
|
158
|
+
return this.sendCommand("safe_start_playing");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Only stops playback when Live is currently playing to prevent
|
|
162
|
+
* Live jumping back to the beginning of the arrangement when it's
|
|
163
|
+
* already stopped.
|
|
164
|
+
*
|
|
165
|
+
* @returns a boolean indicating whether the command was executed
|
|
166
|
+
*/
|
|
150
167
|
async safeStopPlaying() {
|
|
151
168
|
return this.sendCommand("safe_stop_playing");
|
|
152
169
|
}
|