@jeffy-g/live-midi-types 0.7.2 → 0.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/dist/ableton-colors.d.ts +2 -2
- package/dist/ableton-colors.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/project.d.ts +82 -1
- package/package.json +1 -1
package/dist/ableton-colors.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const abletonColorPalette: string[];
|
|
16
16
|
/**
|
|
17
|
-
* Get color code from Ableton color index.
|
|
18
|
-
* @param {number} colorIndex Index of Ableton color palette.
|
|
17
|
+
* Get color code from Ableton Live color index.
|
|
18
|
+
* @param {number} colorIndex Index of Ableton Live color palette.
|
|
19
19
|
* @returns {string} Hex color code.
|
|
20
20
|
*/
|
|
21
21
|
export declare function getColorFromIndex(colorIndex: number): string;
|
package/dist/ableton-colors.js
CHANGED
|
@@ -23,8 +23,8 @@ export const abletonColorPalette = "#ff94a6:#ffa529:#cc9927:#f7f47c:#bffb00:#1af
|
|
|
23
23
|
#af3333:#a95131:#724f41:#dbc300:#85961f:#539f31:#0a9c8e:\
|
|
24
24
|
#236384:#1a2f96:#2f52a2:#624bad:#a34bad:#cc2e6e:#3c3c3c".split(":");
|
|
25
25
|
/**
|
|
26
|
-
* Get color code from Ableton color index.
|
|
27
|
-
* @param {number} colorIndex Index of Ableton color palette.
|
|
26
|
+
* Get color code from Ableton Live color index.
|
|
27
|
+
* @param {number} colorIndex Index of Ableton Live color palette.
|
|
28
28
|
* @returns {string} Hex color code.
|
|
29
29
|
*/
|
|
30
30
|
export function getColorFromIndex(colorIndex) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/project.d.ts
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
import type { TempoEvent } from "./midi-event.ts";
|
|
12
12
|
export type TClipSummary<T extends Record<string, any>> = {
|
|
13
13
|
/**
|
|
14
|
+
* Original MidiClip Id
|
|
15
|
+
* + This is always a simple number.
|
|
16
|
+
*
|
|
14
17
|
* ```js
|
|
15
18
|
* // e.g
|
|
16
19
|
* "/Ableton/LiveSet/Tracks/MidiTrack[4]/DeviceChain/MainSequencer/ClipTimeable/ArrangerAutomation/Events/MidiClip[3]/@Id"
|
|
@@ -19,20 +22,54 @@ export type TClipSummary<T extends Record<string, any>> = {
|
|
|
19
22
|
*/
|
|
20
23
|
originId: string;
|
|
21
24
|
/**
|
|
22
|
-
* ID assigned for use in UI
|
|
25
|
+
* An ID to be assigned for use in UI and other applications.
|
|
23
26
|
*
|
|
24
27
|
* ```
|
|
28
|
+
* // e.g.
|
|
25
29
|
* "clip-" + crypto.randomUUID()
|
|
26
30
|
* ```
|
|
27
31
|
*/
|
|
28
32
|
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* Live color palette index
|
|
35
|
+
* + This value is always the index of the color palette.
|
|
36
|
+
* ```
|
|
37
|
+
* // e.g. xpath
|
|
38
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/DeviceChain/MainSequencer/ClipTimeable/ArrangerAutomation/Events/MidiClip/Color/@Value"
|
|
39
|
+
*
|
|
40
|
+
* // how to actual color
|
|
41
|
+
* // "0" or "12" to "#ff94a6" / "#e553a0"
|
|
42
|
+
* const hexColor = getColorFromIndex(+clip.color);
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @see {@link getColorFromIndex}
|
|
46
|
+
*/
|
|
29
47
|
color: string;
|
|
30
48
|
/**
|
|
31
49
|
* Disabled property for the clip.
|
|
32
50
|
*/
|
|
33
51
|
disabled: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Original MidiClip name
|
|
54
|
+
*
|
|
55
|
+
* ```js
|
|
56
|
+
* // e.g
|
|
57
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/DeviceChain/MainSequencer/ClipTimeable/ArrangerAutomation/Events/MidiClip/Name/@Value"
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
34
60
|
clipName: string;
|
|
61
|
+
/**
|
|
62
|
+
* Parent track name
|
|
63
|
+
*/
|
|
35
64
|
trackName: string;
|
|
65
|
+
/**
|
|
66
|
+
* Annotation of this MidiClip.
|
|
67
|
+
* + It seems that any value can be stored if it's a text value.
|
|
68
|
+
* ```js
|
|
69
|
+
* // e.g
|
|
70
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/DeviceChain/MainSequencer/ClipTimeable/ArrangerAutomation/Events/MidiClip/Annotation/@Value"
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
36
73
|
annotations?: string;
|
|
37
74
|
} & T;
|
|
38
75
|
export type TTrackInfo<T extends Record<string, any>> = {
|
|
@@ -44,9 +81,47 @@ export type TTrackInfo<T extends Record<string, any>> = {
|
|
|
44
81
|
* @date 2026/07/02
|
|
45
82
|
*/
|
|
46
83
|
originId: string;
|
|
84
|
+
/**
|
|
85
|
+
* An ID to be assigned for use in UI and other applications.
|
|
86
|
+
*
|
|
87
|
+
* ```
|
|
88
|
+
* // e.g.
|
|
89
|
+
* "clip-" + crypto.randomUUID()
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
47
92
|
id: string;
|
|
93
|
+
/**
|
|
94
|
+
* Original Track name
|
|
95
|
+
*
|
|
96
|
+
* ```js
|
|
97
|
+
* // e.g MidiTrack
|
|
98
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/Name/EffectiveName/@Value"
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
48
101
|
name: string;
|
|
102
|
+
/**
|
|
103
|
+
* Live color palette index
|
|
104
|
+
* + This value is always the index of the color palette.
|
|
105
|
+
* ```
|
|
106
|
+
* // e.g. xpath (MidiTrack)
|
|
107
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/Color/@Value"
|
|
108
|
+
*
|
|
109
|
+
* // how to actual color
|
|
110
|
+
* // "0" or "12" to "#ff94a6" / "#e553a0"
|
|
111
|
+
* const hexColor = getColorFromIndex(+clip.color);
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @see {@link getColorFromIndex}
|
|
115
|
+
*/
|
|
49
116
|
color: string;
|
|
117
|
+
/**
|
|
118
|
+
* Annotation of this MidiClip.
|
|
119
|
+
* + It seems that any value can be stored if it's a text value.
|
|
120
|
+
* ```js
|
|
121
|
+
* // e.g (MidiTrack)
|
|
122
|
+
* "/Ableton/LiveSet/Tracks/MidiTrack/Name/Annotation/@Value"
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
50
125
|
annotations?: string;
|
|
51
126
|
/**
|
|
52
127
|
* ```
|
|
@@ -63,6 +138,7 @@ export type TParsedAbletonLiveSet<T extends Record<string, any>> = {
|
|
|
63
138
|
alsName: string;
|
|
64
139
|
/**
|
|
65
140
|
* ppq (ticks per quarter note)
|
|
141
|
+
* + This value is not available in `ALS`, but it is set on the application side.
|
|
66
142
|
*/
|
|
67
143
|
ticksPerQuarter: number;
|
|
68
144
|
/**
|
|
@@ -72,6 +148,11 @@ export type TParsedAbletonLiveSet<T extends Record<string, any>> = {
|
|
|
72
148
|
tracks: TTrackInfo<T>[];
|
|
73
149
|
/**
|
|
74
150
|
* Tempo automation events.
|
|
151
|
+
* + Retrieving tempo event data is a bit complicated.
|
|
152
|
+
* ```
|
|
153
|
+
* // Specific XPath examples (live 12.x)
|
|
154
|
+
* "/Ableton/LiveSet/MasterTrack/AutomationEnvelopes/Envelopes/AutomationEnvelope[2]/Automation/Events"
|
|
155
|
+
* ```
|
|
75
156
|
*/
|
|
76
157
|
tempoAutomation: TempoEvent[];
|
|
77
158
|
};
|