audio-mixer-ui 0.1.3 → 0.2.0
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/README.md +85 -65
- package/dist/audio-mixer-ui.js +641 -588
- package/dist/audio-mixer-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -3
package/dist/audio-mixer-ui.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { ref as E, watch as D, unref as O, onScopeDispose as Ue, readonly as Se, mergeModels as fe, useCssVars as G, computed as M, useTemplateRef as Z, useModel as j, createElementBlock as S, openBlock as y, normalizeClass as R, createElementVNode as c, createCommentVNode as se, Fragment as le, renderList as ge, normalizeStyle as qe, renderSlot as re, toDisplayString as F, onUnmounted as he, watchEffect as ke, onMounted as be, createVNode as V, withCtx as H, createTextVNode as ye, withDirectives as Re, withKeys as He, vModelText as Le, withModifiers as Te, createBlock as Me } from "vue";
|
|
2
|
+
import { defineStore as _e } from "pinia";
|
|
3
3
|
var Oe = function() {
|
|
4
4
|
if (typeof Map < "u")
|
|
5
5
|
return Map;
|
|
6
6
|
function e(t, a) {
|
|
7
7
|
var n = -1;
|
|
8
|
-
return t.some(function(s,
|
|
9
|
-
return s[0] === a ? (n =
|
|
8
|
+
return t.some(function(s, l) {
|
|
9
|
+
return s[0] === a ? (n = l, !0) : !1;
|
|
10
10
|
}), n;
|
|
11
11
|
}
|
|
12
12
|
return (
|
|
@@ -39,43 +39,43 @@ var Oe = function() {
|
|
|
39
39
|
this.__entries__.splice(0);
|
|
40
40
|
}, t.prototype.forEach = function(a, n) {
|
|
41
41
|
n === void 0 && (n = null);
|
|
42
|
-
for (var s = 0,
|
|
43
|
-
var
|
|
44
|
-
a.call(n,
|
|
42
|
+
for (var s = 0, l = this.__entries__; s < l.length; s++) {
|
|
43
|
+
var r = l[s];
|
|
44
|
+
a.call(n, r[1], r[0]);
|
|
45
45
|
}
|
|
46
46
|
}, t;
|
|
47
47
|
}()
|
|
48
48
|
);
|
|
49
|
-
}(),
|
|
49
|
+
}(), pe = typeof window < "u" && typeof document < "u" && window.document === document, ue = function() {
|
|
50
50
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
51
51
|
}(), We = function() {
|
|
52
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
52
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(ue) : function(e) {
|
|
53
53
|
return setTimeout(function() {
|
|
54
54
|
return e(Date.now());
|
|
55
55
|
}, 1e3 / 60);
|
|
56
56
|
};
|
|
57
|
-
}(),
|
|
57
|
+
}(), Ze = 2;
|
|
58
58
|
function je(e, t) {
|
|
59
59
|
var a = !1, n = !1, s = 0;
|
|
60
|
-
function
|
|
61
|
-
a && (a = !1, e()), n &&
|
|
60
|
+
function l() {
|
|
61
|
+
a && (a = !1, e()), n && m();
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
We(
|
|
63
|
+
function r() {
|
|
64
|
+
We(l);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var
|
|
66
|
+
function m() {
|
|
67
|
+
var u = Date.now();
|
|
68
68
|
if (a) {
|
|
69
|
-
if (
|
|
69
|
+
if (u - s < Ze)
|
|
70
70
|
return;
|
|
71
71
|
n = !0;
|
|
72
72
|
} else
|
|
73
|
-
a = !0, n = !1, setTimeout(
|
|
74
|
-
s =
|
|
73
|
+
a = !0, n = !1, setTimeout(r, t);
|
|
74
|
+
s = u;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return m;
|
|
77
77
|
}
|
|
78
|
-
var Ge = 20,
|
|
78
|
+
var Ge = 20, Ke = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Ye = typeof MutationObserver < "u", Qe = (
|
|
79
79
|
/** @class */
|
|
80
80
|
function() {
|
|
81
81
|
function e() {
|
|
@@ -97,17 +97,17 @@ var Ge = 20, Ze = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
97
97
|
return a.broadcastActive();
|
|
98
98
|
}), t.length > 0;
|
|
99
99
|
}, e.prototype.connect_ = function() {
|
|
100
|
-
!
|
|
100
|
+
!pe || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Ye ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
101
101
|
attributes: !0,
|
|
102
102
|
childList: !0,
|
|
103
103
|
characterData: !0,
|
|
104
104
|
subtree: !0
|
|
105
105
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
106
106
|
}, e.prototype.disconnect_ = function() {
|
|
107
|
-
!
|
|
107
|
+
!pe || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
108
108
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
109
|
-
var a = t.propertyName, n = a === void 0 ? "" : a, s =
|
|
110
|
-
return !!~n.indexOf(
|
|
109
|
+
var a = t.propertyName, n = a === void 0 ? "" : a, s = Ke.some(function(l) {
|
|
110
|
+
return !!~n.indexOf(l);
|
|
111
111
|
});
|
|
112
112
|
s && this.refresh();
|
|
113
113
|
}, e.getInstance = function() {
|
|
@@ -125,59 +125,59 @@ var Ge = 20, Ze = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
return e;
|
|
128
|
-
},
|
|
128
|
+
}, J = function(e) {
|
|
129
129
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
130
|
-
return t ||
|
|
131
|
-
},
|
|
132
|
-
function
|
|
130
|
+
return t || ue;
|
|
131
|
+
}, Ae = me(0, 0, 0, 0);
|
|
132
|
+
function ce(e) {
|
|
133
133
|
return parseFloat(e) || 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ce(e) {
|
|
136
136
|
for (var t = [], a = 1; a < arguments.length; a++)
|
|
137
137
|
t[a - 1] = arguments[a];
|
|
138
138
|
return t.reduce(function(n, s) {
|
|
139
|
-
var
|
|
140
|
-
return n +
|
|
139
|
+
var l = e["border-" + s + "-width"];
|
|
140
|
+
return n + ce(l);
|
|
141
141
|
}, 0);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Xe(e) {
|
|
144
144
|
for (var t = ["top", "right", "bottom", "left"], a = {}, n = 0, s = t; n < s.length; n++) {
|
|
145
|
-
var
|
|
146
|
-
a[
|
|
145
|
+
var l = s[n], r = e["padding-" + l];
|
|
146
|
+
a[l] = ce(r);
|
|
147
147
|
}
|
|
148
148
|
return a;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Je(e) {
|
|
151
151
|
var t = e.getBBox();
|
|
152
|
-
return
|
|
152
|
+
return me(0, 0, t.width, t.height);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function et(e) {
|
|
155
155
|
var t = e.clientWidth, a = e.clientHeight;
|
|
156
156
|
if (!t && !a)
|
|
157
|
-
return
|
|
158
|
-
var n =
|
|
159
|
-
if (n.boxSizing === "border-box" && (Math.round(
|
|
160
|
-
var
|
|
161
|
-
Math.abs(
|
|
157
|
+
return Ae;
|
|
158
|
+
var n = J(e).getComputedStyle(e), s = Xe(n), l = s.left + s.right, r = s.top + s.bottom, m = ce(n.width), u = ce(n.height);
|
|
159
|
+
if (n.boxSizing === "border-box" && (Math.round(m + l) !== t && (m -= Ce(n, "left", "right") + l), Math.round(u + r) !== a && (u -= Ce(n, "top", "bottom") + r)), !at(e)) {
|
|
160
|
+
var i = Math.round(m + l) - t, d = Math.round(u + r) - a;
|
|
161
|
+
Math.abs(i) !== 1 && (m -= i), Math.abs(d) !== 1 && (u -= d);
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return me(s.left, s.top, m, u);
|
|
164
164
|
}
|
|
165
|
-
var
|
|
165
|
+
var tt = /* @__PURE__ */ function() {
|
|
166
166
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
167
|
-
return e instanceof
|
|
167
|
+
return e instanceof J(e).SVGGraphicsElement;
|
|
168
168
|
} : function(e) {
|
|
169
|
-
return e instanceof
|
|
169
|
+
return e instanceof J(e).SVGElement && typeof e.getBBox == "function";
|
|
170
170
|
};
|
|
171
171
|
}();
|
|
172
|
-
function tt(e) {
|
|
173
|
-
return e === Q(e).document.documentElement;
|
|
174
|
-
}
|
|
175
172
|
function at(e) {
|
|
176
|
-
return
|
|
173
|
+
return e === J(e).document.documentElement;
|
|
177
174
|
}
|
|
178
175
|
function nt(e) {
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
return pe ? tt(e) ? Je(e) : et(e) : Ae;
|
|
177
|
+
}
|
|
178
|
+
function st(e) {
|
|
179
|
+
var t = e.x, a = e.y, n = e.width, s = e.height, l = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, r = Object.create(l.prototype);
|
|
180
|
+
return Ie(r, {
|
|
181
181
|
x: t,
|
|
182
182
|
y: a,
|
|
183
183
|
width: n,
|
|
@@ -186,35 +186,35 @@ function nt(e) {
|
|
|
186
186
|
right: t + n,
|
|
187
187
|
bottom: s + a,
|
|
188
188
|
left: t
|
|
189
|
-
}),
|
|
189
|
+
}), r;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function me(e, t, a, n) {
|
|
192
192
|
return { x: e, y: t, width: a, height: n };
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var rt = (
|
|
195
195
|
/** @class */
|
|
196
196
|
function() {
|
|
197
197
|
function e(t) {
|
|
198
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
198
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = me(0, 0, 0, 0), this.target = t;
|
|
199
199
|
}
|
|
200
200
|
return e.prototype.isActive = function() {
|
|
201
|
-
var t =
|
|
201
|
+
var t = nt(this.target);
|
|
202
202
|
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
|
|
203
203
|
}, e.prototype.broadcastRect = function() {
|
|
204
204
|
var t = this.contentRect_;
|
|
205
205
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
206
206
|
}, e;
|
|
207
207
|
}()
|
|
208
|
-
),
|
|
208
|
+
), it = (
|
|
209
209
|
/** @class */
|
|
210
210
|
/* @__PURE__ */ function() {
|
|
211
211
|
function e(t, a) {
|
|
212
|
-
var n =
|
|
212
|
+
var n = st(a);
|
|
213
213
|
Ie(this, { target: t, contentRect: n });
|
|
214
214
|
}
|
|
215
215
|
return e;
|
|
216
216
|
}()
|
|
217
|
-
),
|
|
217
|
+
), ot = (
|
|
218
218
|
/** @class */
|
|
219
219
|
function() {
|
|
220
220
|
function e(t, a, n) {
|
|
@@ -226,16 +226,16 @@ var st = (
|
|
|
226
226
|
if (!arguments.length)
|
|
227
227
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
228
228
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
229
|
-
if (!(t instanceof
|
|
229
|
+
if (!(t instanceof J(t).Element))
|
|
230
230
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
231
231
|
var a = this.observations_;
|
|
232
|
-
a.has(t) || (a.set(t, new
|
|
232
|
+
a.has(t) || (a.set(t, new rt(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
233
233
|
}
|
|
234
234
|
}, e.prototype.unobserve = function(t) {
|
|
235
235
|
if (!arguments.length)
|
|
236
236
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
237
237
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
238
|
-
if (!(t instanceof
|
|
238
|
+
if (!(t instanceof J(t).Element))
|
|
239
239
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
240
240
|
var a = this.observations_;
|
|
241
241
|
a.has(t) && (a.delete(t), a.size || this.controller_.removeObserver(this));
|
|
@@ -250,7 +250,7 @@ var st = (
|
|
|
250
250
|
}, e.prototype.broadcastActive = function() {
|
|
251
251
|
if (this.hasActive()) {
|
|
252
252
|
var t = this.callbackCtx_, a = this.activeObservations_.map(function(n) {
|
|
253
|
-
return new
|
|
253
|
+
return new it(n.target, n.broadcastRect());
|
|
254
254
|
});
|
|
255
255
|
this.callback_.call(t, a, t), this.clearActive();
|
|
256
256
|
}
|
|
@@ -260,7 +260,7 @@ var st = (
|
|
|
260
260
|
return this.activeObservations_.length > 0;
|
|
261
261
|
}, e;
|
|
262
262
|
}()
|
|
263
|
-
),
|
|
263
|
+
), Ne = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Oe(), $e = (
|
|
264
264
|
/** @class */
|
|
265
265
|
/* @__PURE__ */ function() {
|
|
266
266
|
function e(t) {
|
|
@@ -268,8 +268,8 @@ var st = (
|
|
|
268
268
|
throw new TypeError("Cannot call a class as a function.");
|
|
269
269
|
if (!arguments.length)
|
|
270
270
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
271
|
-
var a =
|
|
272
|
-
|
|
271
|
+
var a = Qe.getInstance(), n = new ot(t, a, this);
|
|
272
|
+
Ne.set(this, n);
|
|
273
273
|
}
|
|
274
274
|
return e;
|
|
275
275
|
}()
|
|
@@ -279,46 +279,46 @@ var st = (
|
|
|
279
279
|
"unobserve",
|
|
280
280
|
"disconnect"
|
|
281
281
|
].forEach(function(e) {
|
|
282
|
-
|
|
282
|
+
$e.prototype[e] = function() {
|
|
283
283
|
var t;
|
|
284
|
-
return (t =
|
|
284
|
+
return (t = Ne.get(this))[e].apply(t, arguments);
|
|
285
285
|
};
|
|
286
286
|
});
|
|
287
|
-
var
|
|
288
|
-
return typeof
|
|
287
|
+
var lt = function() {
|
|
288
|
+
return typeof ue.ResizeObserver < "u" ? ue.ResizeObserver : $e;
|
|
289
289
|
}();
|
|
290
|
-
function
|
|
291
|
-
const t =
|
|
290
|
+
function K(e) {
|
|
291
|
+
const t = E(0), a = E(0);
|
|
292
292
|
let n = null;
|
|
293
293
|
const s = () => {
|
|
294
294
|
n && (n.disconnect(), n = null);
|
|
295
295
|
};
|
|
296
|
-
return
|
|
296
|
+
return D(() => O(e), () => {
|
|
297
297
|
s();
|
|
298
|
-
const
|
|
299
|
-
if (!
|
|
300
|
-
n = new
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
}), n.observe(
|
|
304
|
-
const
|
|
305
|
-
t.value =
|
|
306
|
-
}, { immediate: !0 }),
|
|
307
|
-
width:
|
|
308
|
-
height:
|
|
298
|
+
const r = O(e);
|
|
299
|
+
if (!r) return;
|
|
300
|
+
n = new lt((u) => {
|
|
301
|
+
const i = u[0];
|
|
302
|
+
i && (t.value = i.contentRect.width, a.value = i.contentRect.height);
|
|
303
|
+
}), n.observe(r);
|
|
304
|
+
const m = r.getBoundingClientRect();
|
|
305
|
+
t.value = m.width, a.value = m.height;
|
|
306
|
+
}, { immediate: !0 }), Ue(s), {
|
|
307
|
+
width: Se(t),
|
|
308
|
+
height: Se(a)
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const U = (e, t) => {
|
|
312
312
|
const a = e.__vccOpts || e;
|
|
313
313
|
for (const [n, s] of t)
|
|
314
314
|
a[n] = s;
|
|
315
315
|
return a;
|
|
316
|
-
},
|
|
316
|
+
}, ut = {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "level"
|
|
319
|
-
},
|
|
319
|
+
}, ct = {
|
|
320
320
|
__name: "AudioSlider",
|
|
321
|
-
props: /* @__PURE__ */
|
|
321
|
+
props: /* @__PURE__ */ fe({
|
|
322
322
|
min: { type: Number, default: 0 },
|
|
323
323
|
max: { type: Number, default: 1 },
|
|
324
324
|
step: { type: Number, default: 0.01 },
|
|
@@ -333,71 +333,71 @@ const A = (e, t) => {
|
|
|
333
333
|
}),
|
|
334
334
|
emits: ["update:value"],
|
|
335
335
|
setup(e) {
|
|
336
|
-
|
|
337
|
-
"3d436468":
|
|
338
|
-
"345b6e65":
|
|
339
|
-
"3327b972":
|
|
340
|
-
"5ae48cf2":
|
|
341
|
-
"01a7bd27":
|
|
336
|
+
G((f) => ({
|
|
337
|
+
"3d436468": _.value,
|
|
338
|
+
"345b6e65": C.value,
|
|
339
|
+
"3327b972": N.value,
|
|
340
|
+
"5ae48cf2": B.value,
|
|
341
|
+
"01a7bd27": L.value
|
|
342
342
|
}));
|
|
343
|
-
const t = e, a =
|
|
344
|
-
if (!a.value) return
|
|
345
|
-
const
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
348
|
-
const
|
|
349
|
-
|
|
343
|
+
const t = e, a = Z("root"), { width: n, height: s } = K(a), l = M(() => Math.min(n.value, s.value)), r = M(() => Math.max(n.value, s.value)), m = M(() => n.value > s.value), u = M(() => m.value ? "h-slide" : "v-slide"), i = j(e, "value"), d = M(() => l.value * 0.8), v = M(() => l.value * t.thumbLength * 0.8), C = M(() => (m.value ? v : d).value + "px"), _ = M(() => (m.value ? d : v).value + "px"), B = M(() => l.value * 0.1 + "px"), L = M(() => (r.value - v.value) * (i.value - t.min) / (t.max - t.min) + "px"), N = M(() => m.value ? "90deg" : "0deg"), x = E(!1), g = E(0), w = (f) => {
|
|
344
|
+
if (!a.value) return i.value;
|
|
345
|
+
const A = a.value.getBoundingClientRect(), p = f.touches ? f.touches[0].clientX : f.clientX, b = f.touches ? f.touches[0].clientY : f.clientY;
|
|
346
|
+
let T;
|
|
347
|
+
if (m.value) {
|
|
348
|
+
const q = p - A.left - d.value / 2, W = A.width - d.value;
|
|
349
|
+
T = Math.max(0, Math.min(1, q / W));
|
|
350
350
|
} else {
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const q = A.bottom - b - d.value / 2, W = A.height - d.value;
|
|
352
|
+
T = Math.max(0, Math.min(1, q / W));
|
|
353
353
|
}
|
|
354
|
-
const
|
|
355
|
-
return t.step > 0 ? Math.round(
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
if (
|
|
362
|
-
if (
|
|
354
|
+
const $ = t.min + T * (t.max - t.min);
|
|
355
|
+
return t.step > 0 ? Math.round($ / t.step) * t.step : $;
|
|
356
|
+
}, k = (f) => {
|
|
357
|
+
f.preventDefault(), x.value = !0, g.value = i.value, i.value = w(f), a.value && a.value.setPointerCapture && a.value.setPointerCapture(f.pointerId), document.addEventListener("mousemove", I), document.addEventListener("mouseup", Y);
|
|
358
|
+
}, I = (f) => {
|
|
359
|
+
x.value && (f.preventDefault(), i.value = w(f));
|
|
360
|
+
}, Y = (f) => {
|
|
361
|
+
if (x.value) {
|
|
362
|
+
if (f.preventDefault(), x.value = !1, a.value && a.value.releasePointerCapture)
|
|
363
363
|
try {
|
|
364
|
-
a.value.releasePointerCapture(
|
|
364
|
+
a.value.releasePointerCapture(f.pointerId);
|
|
365
365
|
} catch {
|
|
366
366
|
}
|
|
367
|
-
document.removeEventListener("mousemove",
|
|
367
|
+
document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", Y);
|
|
368
368
|
}
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
},
|
|
376
|
-
return (
|
|
377
|
-
class:
|
|
369
|
+
}, te = (f) => {
|
|
370
|
+
f.preventDefault(), f.touches.length === 1 && (x.value = !0, g.value = i.value, i.value = w(f), document.addEventListener("touchmove", Q, { passive: !1 }), document.addEventListener("touchend", z), document.addEventListener("touchcancel", z));
|
|
371
|
+
}, Q = (f) => {
|
|
372
|
+
x.value && (f.preventDefault(), f.touches.length === 1 && (i.value = w(f)));
|
|
373
|
+
}, z = (f) => {
|
|
374
|
+
x.value && (f.preventDefault(), x.value = !1, document.removeEventListener("touchmove", Q), document.removeEventListener("touchend", z), document.removeEventListener("touchcancel", z));
|
|
375
|
+
}, ae = (f) => Math.min(1, Math.max(0, t.level * 10 - f + 1));
|
|
376
|
+
return (f, A) => (y(), S("div", {
|
|
377
|
+
class: R(u.value),
|
|
378
378
|
ref_key: "root",
|
|
379
379
|
ref: a,
|
|
380
|
-
onMousedown:
|
|
381
|
-
onTouchstart:
|
|
380
|
+
onMousedown: k,
|
|
381
|
+
onTouchstart: te,
|
|
382
382
|
style: { userSelect: "none", touchAction: "none" }
|
|
383
383
|
}, [
|
|
384
|
-
|
|
385
|
-
e.showLevel ? (
|
|
386
|
-
(
|
|
387
|
-
class:
|
|
384
|
+
A[0] || (A[0] = c("div", { class: "track" }, null, -1)),
|
|
385
|
+
e.showLevel ? (y(), S("div", ut, [
|
|
386
|
+
(y(), S(le, null, ge(10, (p) => c("div", {
|
|
387
|
+
class: R(["led", "led" + p])
|
|
388
388
|
}, [
|
|
389
|
-
|
|
389
|
+
c("div", {
|
|
390
390
|
class: "on",
|
|
391
|
-
style:
|
|
391
|
+
style: qe({ opacity: ae(p) })
|
|
392
392
|
}, null, 4)
|
|
393
393
|
], 2)), 64))
|
|
394
|
-
])) :
|
|
395
|
-
|
|
396
|
-
class:
|
|
394
|
+
])) : se("", !0),
|
|
395
|
+
c("div", {
|
|
396
|
+
class: R(["thumb", { dragging: x.value, [e.colour]: !0, [e.style]: !0 }])
|
|
397
397
|
}, null, 2)
|
|
398
398
|
], 34));
|
|
399
399
|
}
|
|
400
|
-
},
|
|
400
|
+
}, de = /* @__PURE__ */ U(ct, [["__scopeId", "data-v-1580ed15"]]), dt = {
|
|
401
401
|
__name: "TitleText",
|
|
402
402
|
props: {
|
|
403
403
|
align: {
|
|
@@ -406,23 +406,23 @@ const A = (e, t) => {
|
|
|
406
406
|
}
|
|
407
407
|
},
|
|
408
408
|
setup(e) {
|
|
409
|
-
|
|
410
|
-
"5fddb56d":
|
|
409
|
+
G((m) => ({
|
|
410
|
+
"5fddb56d": r.value
|
|
411
411
|
}));
|
|
412
|
-
const t =
|
|
413
|
-
return (
|
|
412
|
+
const t = Z("el"), { width: a, height: n } = K(t), s = M(() => Math.min(a.value, n.value)), l = M(() => a.value > n.value ? "h-text" : "v-text"), r = M(() => s.value * 3 / 4 + "px");
|
|
413
|
+
return (m, u) => (y(), S("div", {
|
|
414
414
|
ref_key: "el",
|
|
415
415
|
ref: t,
|
|
416
416
|
class: "outer"
|
|
417
417
|
}, [
|
|
418
|
-
|
|
419
|
-
class:
|
|
418
|
+
c("div", {
|
|
419
|
+
class: R({ [l.value]: !0, [e.align]: !0 })
|
|
420
420
|
}, [
|
|
421
|
-
|
|
421
|
+
re(m.$slots, "default", {}, void 0, !0)
|
|
422
422
|
], 2)
|
|
423
423
|
], 512));
|
|
424
424
|
}
|
|
425
|
-
},
|
|
425
|
+
}, De = /* @__PURE__ */ U(dt, [["__scopeId", "data-v-3ce29e77"]]), ht = {
|
|
426
426
|
__name: "TriState",
|
|
427
427
|
props: {
|
|
428
428
|
mute: { default: !1 },
|
|
@@ -432,37 +432,37 @@ const A = (e, t) => {
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["update:mute", "update:solo"],
|
|
434
434
|
setup(e) {
|
|
435
|
-
const t =
|
|
436
|
-
function
|
|
435
|
+
const t = j(e, "mute"), a = j(e, "solo"), n = Z("outer"), { width: s, height: l } = K(n), r = M(() => s.value > l.value * 1.9);
|
|
436
|
+
function m() {
|
|
437
437
|
t.value = !t.value, a.value = !1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function u() {
|
|
440
440
|
a.value = !a.value, t.value = !1;
|
|
441
441
|
}
|
|
442
|
-
return (
|
|
442
|
+
return (i, d) => (y(), S("div", {
|
|
443
443
|
class: "outer",
|
|
444
444
|
ref_key: "outer",
|
|
445
445
|
ref: n
|
|
446
446
|
}, [
|
|
447
|
-
|
|
448
|
-
class:
|
|
449
|
-
onClick:
|
|
447
|
+
c("div", {
|
|
448
|
+
class: R(["solo", { on: a.value }]),
|
|
449
|
+
onClick: u
|
|
450
450
|
}, null, 2),
|
|
451
|
-
|
|
451
|
+
c("div", {
|
|
452
452
|
class: "s-label",
|
|
453
|
-
onClick:
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
class:
|
|
457
|
-
onClick:
|
|
453
|
+
onClick: u
|
|
454
|
+
}, F(r.value ? "SOLO" : "S"), 1),
|
|
455
|
+
c("div", {
|
|
456
|
+
class: R(["mute", { on: t.value }]),
|
|
457
|
+
onClick: m
|
|
458
458
|
}, null, 2),
|
|
459
|
-
|
|
459
|
+
c("div", {
|
|
460
460
|
class: "m-label",
|
|
461
|
-
onClick:
|
|
462
|
-
},
|
|
461
|
+
onClick: m
|
|
462
|
+
}, F(r.value ? "MUTE" : "M"), 1)
|
|
463
463
|
], 512));
|
|
464
464
|
}
|
|
465
|
-
},
|
|
465
|
+
}, mt = /* @__PURE__ */ U(ht, [["__scopeId", "data-v-143eade0"]]), ve = {
|
|
466
466
|
// Enable development UI features (animations, random data, etc.)
|
|
467
467
|
enabled: !1,
|
|
468
468
|
// Specific feature flags
|
|
@@ -474,7 +474,7 @@ const A = (e, t) => {
|
|
|
474
474
|
// Enable other debug/dev features as needed
|
|
475
475
|
debugMode: !1
|
|
476
476
|
}
|
|
477
|
-
},
|
|
477
|
+
}, aa = () => ve.enabled, ze = (e) => ve.enabled && ve.features[e], ee = _e("audioState", {
|
|
478
478
|
state: () => ({
|
|
479
479
|
// Playback state
|
|
480
480
|
isPlaying: !1,
|
|
@@ -548,7 +548,7 @@ const A = (e, t) => {
|
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
}),
|
|
551
|
+
}), ie = _e("musicData", {
|
|
552
552
|
state: () => ({
|
|
553
553
|
// Musical structure
|
|
554
554
|
beats: [],
|
|
@@ -639,7 +639,7 @@ const A = (e, t) => {
|
|
|
639
639
|
return this.beats.some((a) => a.bar === e && a.repeat === t);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
}),
|
|
642
|
+
}), pt = _e("playbackState", {
|
|
643
643
|
state: () => ({
|
|
644
644
|
// Transport state
|
|
645
645
|
transportState: "stopped",
|
|
@@ -749,7 +749,7 @@ const A = (e, t) => {
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
});
|
|
752
|
-
function
|
|
752
|
+
function vt(e) {
|
|
753
753
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
|
|
754
754
|
var n = e.get(t);
|
|
755
755
|
n ? n.push(a) : e.set(t, [a]);
|
|
@@ -767,7 +767,7 @@ function pt(e) {
|
|
|
767
767
|
}
|
|
768
768
|
class ft {
|
|
769
769
|
constructor() {
|
|
770
|
-
this.eventBus =
|
|
770
|
+
this.eventBus = vt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0;
|
|
771
771
|
}
|
|
772
772
|
// Initialize with musical data
|
|
773
773
|
initialize(t) {
|
|
@@ -911,124 +911,124 @@ class ft {
|
|
|
911
911
|
this.stop(), this.eventBus.all.clear(), this.parts.clear();
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
const
|
|
915
|
-
function
|
|
916
|
-
const e =
|
|
917
|
-
e.setCurrentTime(
|
|
918
|
-
}, s = ({ isPlaying:
|
|
919
|
-
e.setPlaybackState(
|
|
920
|
-
},
|
|
921
|
-
|
|
922
|
-
},
|
|
923
|
-
e.setPlaybackSpeed(
|
|
924
|
-
},
|
|
925
|
-
e.setMasterVolume(
|
|
926
|
-
},
|
|
927
|
-
e.setPartVolume(
|
|
928
|
-
},
|
|
929
|
-
e.setPartMuted(
|
|
930
|
-
},
|
|
931
|
-
e.setLeadInActive(!0,
|
|
932
|
-
},
|
|
914
|
+
const h = new ft();
|
|
915
|
+
function oe() {
|
|
916
|
+
const e = ee(), t = ie(), a = pt(), n = ({ currentTime: o }) => {
|
|
917
|
+
e.setCurrentTime(o);
|
|
918
|
+
}, s = ({ isPlaying: o }) => {
|
|
919
|
+
e.setPlaybackState(o), a.setTransportState(o ? "playing" : "stopped");
|
|
920
|
+
}, l = (o) => {
|
|
921
|
+
o && (e.setCurrentBar(o.bar, o.beat, o.repeat), a.updateLastBarPosition(o.bar));
|
|
922
|
+
}, r = ({ speed: o }) => {
|
|
923
|
+
e.setPlaybackSpeed(o);
|
|
924
|
+
}, m = ({ volume: o }) => {
|
|
925
|
+
e.setMasterVolume(o);
|
|
926
|
+
}, u = ({ partName: o, volume: P }) => {
|
|
927
|
+
e.setPartVolume(o, P);
|
|
928
|
+
}, i = ({ partName: o, muted: P }) => {
|
|
929
|
+
e.setPartMuted(o, P);
|
|
930
|
+
}, d = ({ bars: o }) => {
|
|
931
|
+
e.setLeadInActive(!0, o);
|
|
932
|
+
}, v = () => {
|
|
933
933
|
e.setLeadInActive(!1);
|
|
934
|
-
},
|
|
934
|
+
}, C = () => {
|
|
935
935
|
e.setStartingNotesActive(!0);
|
|
936
|
-
},
|
|
936
|
+
}, _ = () => {
|
|
937
937
|
e.setStartingNotesActive(!1);
|
|
938
|
-
},
|
|
939
|
-
a.updateLastPracticeMarkUsed(
|
|
940
|
-
},
|
|
941
|
-
e.initializeParts(
|
|
942
|
-
},
|
|
943
|
-
e.setPlaybackState(!1), a.setTransportState("stopped"), console.log(`Song ended at time: ${
|
|
944
|
-
},
|
|
945
|
-
|
|
946
|
-
},
|
|
947
|
-
|
|
948
|
-
},
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
}),
|
|
953
|
-
const
|
|
954
|
-
|
|
938
|
+
}, B = ({ mark: o }) => {
|
|
939
|
+
a.updateLastPracticeMarkUsed(o);
|
|
940
|
+
}, L = ({ parts: o }) => {
|
|
941
|
+
e.initializeParts(o);
|
|
942
|
+
}, N = ({ finalTime: o }) => {
|
|
943
|
+
e.setPlaybackState(!1), a.setTransportState("stopped"), console.log(`Song ended at time: ${o}`);
|
|
944
|
+
}, x = () => {
|
|
945
|
+
h.on("timeChanged", n), h.on("playbackStateChanged", s), h.on("barChanged", l), h.on("speedChanged", r), h.on("masterVolumeChanged", m), h.on("partVolumeChanged", u), h.on("partMutedChanged", i), h.on("leadInStarted", d), h.on("leadInCompleted", v), h.on("startingNotesStarted", C), h.on("startingNotesCompleted", _), h.on("practiceMarkChanged", B), h.on("initialized", L), h.on("songEnded", N);
|
|
946
|
+
}, g = () => {
|
|
947
|
+
h.off("timeChanged", n), h.off("playbackStateChanged", s), h.off("barChanged", l), h.off("speedChanged", r), h.off("masterVolumeChanged", m), h.off("partVolumeChanged", u), h.off("partMutedChanged", i), h.off("leadInStarted", d), h.off("leadInCompleted", v), h.off("startingNotesStarted", C), h.off("startingNotesCompleted", _), h.off("practiceMarkChanged", B), h.off("initialized", L), h.off("songEnded", N);
|
|
948
|
+
}, w = () => {
|
|
949
|
+
ke(() => {
|
|
950
|
+
const o = e.masterVolume;
|
|
951
|
+
h.getMasterVolume() !== o && h.setMasterVolume(o);
|
|
952
|
+
}), ke(() => {
|
|
953
|
+
const o = e.playbackSpeed;
|
|
954
|
+
h.getPlaybackSpeed() !== o && h.setPlaybackSpeed(o);
|
|
955
955
|
});
|
|
956
|
-
},
|
|
957
|
-
if (t.loadMusicData(
|
|
958
|
-
beats:
|
|
959
|
-
practiceMarks:
|
|
960
|
-
parts:
|
|
961
|
-
}),
|
|
962
|
-
const
|
|
963
|
-
e.setCurrentBar(
|
|
956
|
+
}, k = (o) => {
|
|
957
|
+
if (t.loadMusicData(o), h.initialize({
|
|
958
|
+
beats: o.beats,
|
|
959
|
+
practiceMarks: o.marks || o.practiceMarks,
|
|
960
|
+
parts: o.parts
|
|
961
|
+
}), o.beats && o.beats.length > 0) {
|
|
962
|
+
const P = o.beats[0];
|
|
963
|
+
e.setCurrentBar(P.bar, P.beat, P.repeat), h.setTime(P.time);
|
|
964
964
|
}
|
|
965
|
-
|
|
966
|
-
},
|
|
967
|
-
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
},
|
|
971
|
-
|
|
972
|
-
},
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
},
|
|
981
|
-
|
|
982
|
-
},
|
|
983
|
-
|
|
984
|
-
},
|
|
985
|
-
|
|
986
|
-
},
|
|
987
|
-
|
|
988
|
-
},
|
|
989
|
-
|
|
990
|
-
},
|
|
991
|
-
|
|
992
|
-
},
|
|
993
|
-
const ne = t.getBarForMark(
|
|
994
|
-
ne &&
|
|
965
|
+
x(), w();
|
|
966
|
+
}, I = () => {
|
|
967
|
+
h.play();
|
|
968
|
+
}, Y = () => {
|
|
969
|
+
h.stop();
|
|
970
|
+
}, te = () => {
|
|
971
|
+
h.pause();
|
|
972
|
+
}, Q = (o) => {
|
|
973
|
+
h.setTime(o);
|
|
974
|
+
}, z = (o, P = 0) => {
|
|
975
|
+
h.setBar(o, P);
|
|
976
|
+
}, ae = (o) => {
|
|
977
|
+
h.goToPracticeMark(o);
|
|
978
|
+
}, f = (o) => {
|
|
979
|
+
h.setPlaybackSpeed(o);
|
|
980
|
+
}, A = (o) => {
|
|
981
|
+
h.setMasterVolume(o);
|
|
982
|
+
}, p = (o, P) => {
|
|
983
|
+
h.setPartVolume(o, P);
|
|
984
|
+
}, b = (o, P) => {
|
|
985
|
+
h.setPartMuted(o, P);
|
|
986
|
+
}, T = (o = 1) => {
|
|
987
|
+
h.playLeadIn(o);
|
|
988
|
+
}, $ = () => {
|
|
989
|
+
h.playStartingNotes();
|
|
990
|
+
}, q = (o, P = !0, ne = 0) => {
|
|
991
|
+
P && a.leadInEnabled ? (z(o, ne), T(a.leadInBars)) : (z(o, ne), I());
|
|
992
|
+
}, W = (o, P = !0) => {
|
|
993
|
+
const ne = t.getBarForMark(o);
|
|
994
|
+
ne && q(ne, P);
|
|
995
995
|
};
|
|
996
|
-
return
|
|
997
|
-
|
|
996
|
+
return he(() => {
|
|
997
|
+
g();
|
|
998
998
|
}), {
|
|
999
999
|
// Initialization
|
|
1000
|
-
initialize:
|
|
1000
|
+
initialize: k,
|
|
1001
1001
|
// Transport controls
|
|
1002
|
-
play:
|
|
1003
|
-
stop:
|
|
1004
|
-
pause:
|
|
1002
|
+
play: I,
|
|
1003
|
+
stop: Y,
|
|
1004
|
+
pause: te,
|
|
1005
1005
|
// Time controls
|
|
1006
|
-
setTime:
|
|
1007
|
-
setBar:
|
|
1006
|
+
setTime: Q,
|
|
1007
|
+
setBar: z,
|
|
1008
1008
|
// Navigation
|
|
1009
|
-
goToPracticeMark:
|
|
1010
|
-
setPlaybackSpeed:
|
|
1009
|
+
goToPracticeMark: ae,
|
|
1010
|
+
setPlaybackSpeed: f,
|
|
1011
1011
|
// Volume controls
|
|
1012
|
-
setMasterVolume:
|
|
1013
|
-
setPartVolume:
|
|
1014
|
-
setPartMuted:
|
|
1012
|
+
setMasterVolume: A,
|
|
1013
|
+
setPartVolume: p,
|
|
1014
|
+
setPartMuted: b,
|
|
1015
1015
|
// Special features
|
|
1016
|
-
playLeadIn:
|
|
1017
|
-
playStartingNotes:
|
|
1016
|
+
playLeadIn: T,
|
|
1017
|
+
playStartingNotes: $,
|
|
1018
1018
|
// Complex operations
|
|
1019
|
-
playFromBar:
|
|
1020
|
-
playFromMark:
|
|
1019
|
+
playFromBar: q,
|
|
1020
|
+
playFromMark: W,
|
|
1021
1021
|
// Access to stores for components
|
|
1022
1022
|
audioState: e,
|
|
1023
1023
|
musicData: t,
|
|
1024
1024
|
playbackState: a,
|
|
1025
1025
|
// Direct access to engine for advanced use
|
|
1026
|
-
audioEngine:
|
|
1026
|
+
audioEngine: h
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1029
|
+
const gt = {
|
|
1030
1030
|
__name: "PartControl",
|
|
1031
|
-
props: /* @__PURE__ */
|
|
1031
|
+
props: /* @__PURE__ */ fe({
|
|
1032
1032
|
name: {
|
|
1033
1033
|
type: String,
|
|
1034
1034
|
required: !0
|
|
@@ -1048,188 +1048,200 @@ const vt = {
|
|
|
1048
1048
|
}),
|
|
1049
1049
|
emits: ["update:volume", "update:mute", "update:solo"],
|
|
1050
1050
|
setup(e) {
|
|
1051
|
-
|
|
1052
|
-
"34cdae44":
|
|
1051
|
+
G((_) => ({
|
|
1052
|
+
"34cdae44": i.value
|
|
1053
1053
|
}));
|
|
1054
1054
|
const t = e;
|
|
1055
|
-
|
|
1056
|
-
const a =
|
|
1057
|
-
|
|
1058
|
-
a.setPartVolume(t.name,
|
|
1059
|
-
}),
|
|
1060
|
-
a.setPartMuted(t.name,
|
|
1055
|
+
ee();
|
|
1056
|
+
const a = oe(), n = j(e, "volume"), s = j(e, "mute"), l = j(e, "solo");
|
|
1057
|
+
D(n, (_) => {
|
|
1058
|
+
a.setPartVolume(t.name, _);
|
|
1059
|
+
}), D(s, (_) => {
|
|
1060
|
+
a.setPartMuted(t.name, _);
|
|
1061
1061
|
});
|
|
1062
|
-
const
|
|
1063
|
-
() =>
|
|
1062
|
+
const r = Z("el"), { width: m, height: u } = K(r), i = M(() => Math.min(m.value, u.value) + "px"), d = M(
|
|
1063
|
+
() => m.value > u.value ? "mobile" : m.value < 60 ? "tablet" : "desktop"
|
|
1064
1064
|
);
|
|
1065
|
-
let
|
|
1066
|
-
const
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1069
|
-
|
|
1065
|
+
let v = null;
|
|
1066
|
+
const C = E(0);
|
|
1067
|
+
return be(() => {
|
|
1068
|
+
ze("randomLevelIndicators") && (v = setInterval(() => {
|
|
1069
|
+
C.value = s.value ? 0 : Math.random() * n.value;
|
|
1070
1070
|
}, 100));
|
|
1071
|
-
}),
|
|
1072
|
-
|
|
1073
|
-
}), (
|
|
1071
|
+
}), he(() => {
|
|
1072
|
+
v && (clearInterval(v), v = null);
|
|
1073
|
+
}), (_, B) => (y(), S("div", {
|
|
1074
1074
|
ref_key: "el",
|
|
1075
|
-
ref:
|
|
1076
|
-
class:
|
|
1075
|
+
ref: r,
|
|
1076
|
+
class: R([d.value, "part"])
|
|
1077
1077
|
}, [
|
|
1078
|
-
|
|
1078
|
+
V(mt, {
|
|
1079
1079
|
class: "tri",
|
|
1080
1080
|
mute: s.value,
|
|
1081
|
-
"onUpdate:mute":
|
|
1082
|
-
solo:
|
|
1083
|
-
"onUpdate:solo":
|
|
1081
|
+
"onUpdate:mute": B[0] || (B[0] = (L) => s.value = L),
|
|
1082
|
+
solo: l.value,
|
|
1083
|
+
"onUpdate:solo": B[1] || (B[1] = (L) => l.value = L)
|
|
1084
1084
|
}, null, 8, ["mute", "solo"]),
|
|
1085
|
-
|
|
1085
|
+
V(De, {
|
|
1086
1086
|
align: "left",
|
|
1087
1087
|
class: "name"
|
|
1088
1088
|
}, {
|
|
1089
|
-
default:
|
|
1090
|
-
|
|
1089
|
+
default: H(() => [
|
|
1090
|
+
ye(F(e.name), 1)
|
|
1091
1091
|
]),
|
|
1092
1092
|
_: 1
|
|
1093
1093
|
}),
|
|
1094
|
-
|
|
1095
|
-
level:
|
|
1094
|
+
V(de, {
|
|
1095
|
+
level: C.value,
|
|
1096
1096
|
"show-level": !0,
|
|
1097
1097
|
class: "vol",
|
|
1098
1098
|
value: n.value,
|
|
1099
|
-
"onUpdate:value":
|
|
1099
|
+
"onUpdate:value": B[2] || (B[2] = (L) => n.value = L)
|
|
1100
1100
|
}, null, 8, ["level", "value"])
|
|
1101
1101
|
], 2));
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, bt = /* @__PURE__ */ U(gt, [["__scopeId", "data-v-510493b1"]]), yt = { class: "mark" }, Mt = { class: "rpt" }, _t = { class: "beat-ind" }, St = { class: "beat" }, kt = {
|
|
1104
1104
|
key: 1,
|
|
1105
1105
|
class: "mark-grid-container"
|
|
1106
|
-
},
|
|
1106
|
+
}, Tt = { class: "mark-grid" }, Ct = ["onClick"], xt = {
|
|
1107
1107
|
__name: "BarInput",
|
|
1108
1108
|
setup(e) {
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1109
|
+
G((p) => ({
|
|
1110
|
+
a84e79a6: x.value,
|
|
1111
|
+
"4f93d11c": g.value
|
|
1112
1112
|
}));
|
|
1113
|
-
const t =
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1113
|
+
const t = Z("el"), a = Z("rpt"), { width: n, height: s } = K(t), l = ie(), r = ee(), m = oe(), u = E("1"), i = E("A"), d = E(0), v = E(2), C = E(!1), _ = E(!1), B = E(!1), L = E(!0);
|
|
1114
|
+
let N = null;
|
|
1115
|
+
D(() => {
|
|
1116
|
+
var p;
|
|
1117
|
+
return ((p = l.beats) == null ? void 0 : p.length) > 0;
|
|
1118
|
+
}, (p) => {
|
|
1119
|
+
console.log(p), p && !C.value && (u.value = r.currentBar.toString(), d.value = r.currentRepeat, v.value = l.getRepeatCountForBar(r.currentBar), k(r.currentBar), C.value = !0);
|
|
1120
|
+
}), D(() => r.currentBar, (p) => {
|
|
1121
|
+
v.value = l.getRepeatCountForBar(p);
|
|
1122
|
+
}), D(u, () => {
|
|
1123
|
+
u.value = u.value.replace(/\D/g, ""), u.value.length > 3 && (u.value = u.value.slice(0, 3));
|
|
1124
|
+
}), D(() => r.currentBar, (p) => {
|
|
1125
|
+
u.value = p.toString(), k(p);
|
|
1126
|
+
}), D(() => r.currentBeat, () => {
|
|
1127
|
+
L.value = !0, setTimeout(() => {
|
|
1128
|
+
L.value = !1;
|
|
1117
1129
|
}, 50);
|
|
1130
|
+
}), D(_, () => {
|
|
1131
|
+
_.value && A();
|
|
1118
1132
|
});
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
return ((i = s.beats) == null ? void 0 : i.length) > 0;
|
|
1124
|
-
}, (i) => {
|
|
1125
|
-
console.log(i), i && !g.value && (r.value = o.currentBar.toString(), b.value = o.currentRepeat, M.value = s.getRepeatCountForBar(o.currentBar), V(o.currentBar), g.value = !0);
|
|
1126
|
-
}), L(() => o.currentBar, (i) => {
|
|
1127
|
-
M.value = s.getRepeatCountForBar(i);
|
|
1128
|
-
}), L(r, () => {
|
|
1129
|
-
r.value = r.value.replace(/\D/g, ""), r.value.length > 3 && (r.value = r.value.slice(0, 3));
|
|
1130
|
-
}), L(() => o.currentBar, (i) => {
|
|
1131
|
-
r.value = i.toString(), V(i);
|
|
1132
|
-
});
|
|
1133
|
-
function V(i) {
|
|
1134
|
-
const v = Object.keys(s.practiceMarks).filter((T) => s.practiceMarks[T] <= i).sort((T, I) => s.practiceMarks[I] - s.practiceMarks[T]);
|
|
1135
|
-
v.length > 0 && (c.value = v[0]);
|
|
1133
|
+
const x = M(() => Math.min(s.value / 2.25, n.value / 4.5) + "px"), g = M(() => Math.min(n.value / 15, s.value / 6.4) + "px"), w = M(() => Object.keys(l.practiceMarks).sort());
|
|
1134
|
+
function k(p) {
|
|
1135
|
+
const b = Object.keys(l.practiceMarks).filter((T) => l.practiceMarks[T] <= p).sort((T, $) => l.practiceMarks[$] - l.practiceMarks[T]);
|
|
1136
|
+
b.length > 0 && (i.value = b[0]);
|
|
1136
1137
|
}
|
|
1137
|
-
function
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1138
|
+
function I() {
|
|
1139
|
+
const p = parseInt(u.value);
|
|
1140
|
+
p && p > 0 && Y(p);
|
|
1140
1141
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
i.stopPropagation(), h.value = !h.value;
|
|
1142
|
+
function Y(p) {
|
|
1143
|
+
m.setBar(p, 0);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1147
|
-
(v = t.value) != null && v.contains(i.target) || (h.value = !1, y.value = !1);
|
|
1145
|
+
function te(p, b) {
|
|
1146
|
+
b && b.stopPropagation(), i.value = p, _.value = !1, m.goToPracticeMark(p);
|
|
1148
1147
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
const i = o.currentBeat % s.timeSignature + 1;
|
|
1152
|
-
o.setCurrentBar(o.currentBar, i, o.currentRepeat);
|
|
1153
|
-
}, 800));
|
|
1154
|
-
}), ge(() => {
|
|
1155
|
-
document.removeEventListener("click", D), d && (clearInterval(d), d = null);
|
|
1156
|
-
});
|
|
1157
|
-
function Z(i) {
|
|
1158
|
-
i.stopPropagation(), y.value = M.value > 0 && !y.value;
|
|
1148
|
+
function Q() {
|
|
1149
|
+
v.value > 1 && (B.value = !0), r.currentRepeat < v.value && m.setBar(r.currentBar, r.currentRepeat + 1);
|
|
1159
1150
|
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
u.setBar(i, 0);
|
|
1151
|
+
function z() {
|
|
1152
|
+
v.value > 1 && (B.value = !0), r.currentRepeat > 1 && m.setBar(r.currentBar, r.currentRepeat - 1);
|
|
1163
1153
|
}
|
|
1164
|
-
function
|
|
1165
|
-
|
|
1154
|
+
function ae(p) {
|
|
1155
|
+
p.stopPropagation(), B.value = !1, _.value = !_.value;
|
|
1166
1156
|
}
|
|
1167
|
-
function
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1157
|
+
function f(p) {
|
|
1158
|
+
var b, T;
|
|
1159
|
+
(b = t.value) != null && b.contains(p.target) || (_.value = !1), (T = a.value) != null && T.contains(p.target) || (B.value = !1);
|
|
1160
|
+
}
|
|
1161
|
+
function A() {
|
|
1162
|
+
_.value && setTimeout(() => {
|
|
1163
|
+
var T, $;
|
|
1164
|
+
const p = (T = t.value) == null ? void 0 : T.querySelector(".mark-grid"), b = ($ = t.value) == null ? void 0 : $.querySelector(".mark-option.selected");
|
|
1165
|
+
if (b && p) {
|
|
1166
|
+
const q = p.getBoundingClientRect(), W = b.getBoundingClientRect(), o = W.left - q.left - q.width / 2 + W.width / 2;
|
|
1167
|
+
p.scrollLeft = Math.max(0, p.scrollLeft + o);
|
|
1174
1168
|
}
|
|
1175
1169
|
}, 50);
|
|
1176
1170
|
}
|
|
1177
|
-
return
|
|
1178
|
-
|
|
1179
|
-
|
|
1171
|
+
return be(() => {
|
|
1172
|
+
document.addEventListener("click", f), ze("beatAnimation") && (N = setInterval(() => {
|
|
1173
|
+
const p = r.currentBeat % l.timeSignature + 1;
|
|
1174
|
+
r.setCurrentBar(r.currentBar, p, r.currentRepeat);
|
|
1175
|
+
}, 800));
|
|
1176
|
+
}), he(() => {
|
|
1177
|
+
document.removeEventListener("click", f), N && (clearInterval(N), N = null);
|
|
1178
|
+
}), (p, b) => (y(), S("div", {
|
|
1180
1179
|
ref_key: "el",
|
|
1181
1180
|
ref: t,
|
|
1182
|
-
class:
|
|
1181
|
+
class: R(["outer", { pulse: L.value, "mark-selecting": _.value }])
|
|
1183
1182
|
}, [
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
class:
|
|
1187
|
-
onClick:
|
|
1183
|
+
b[6] || (b[6] = c("div", { class: "frame" }, null, -1)),
|
|
1184
|
+
c("div", {
|
|
1185
|
+
class: R(["mark-input", { empty: !i.value, edit: _.value }]),
|
|
1186
|
+
onClick: ae
|
|
1188
1187
|
}, [
|
|
1189
|
-
|
|
1188
|
+
c("div", yt, F(i.value), 1)
|
|
1190
1189
|
], 2),
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1190
|
+
b[7] || (b[7] = c("div", { class: "mark-title" }, "Mark", -1)),
|
|
1191
|
+
_.value ? se("", !0) : (y(), S(le, { key: 0 }, [
|
|
1192
|
+
Re(c("input", {
|
|
1194
1193
|
type: "text",
|
|
1195
1194
|
class: "bar-input",
|
|
1196
|
-
"onUpdate:modelValue":
|
|
1195
|
+
"onUpdate:modelValue": b[0] || (b[0] = (T) => u.value = T),
|
|
1197
1196
|
inputmode: "decimal",
|
|
1198
1197
|
pattern: "\\d*",
|
|
1199
|
-
onChange:
|
|
1200
|
-
onKeyup:
|
|
1198
|
+
onChange: I,
|
|
1199
|
+
onKeyup: He(I, ["enter"])
|
|
1201
1200
|
}, null, 544), [
|
|
1202
|
-
[Le,
|
|
1201
|
+
[Le, u.value]
|
|
1203
1202
|
]),
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1203
|
+
b[3] || (b[3] = c("div", { class: "bar-title" }, "Bar", -1)),
|
|
1204
|
+
c("div", {
|
|
1205
|
+
ref_key: "rpt",
|
|
1206
|
+
ref: a,
|
|
1207
|
+
class: R(["rpt-input", { edit: B.value, available: v.value > 1 }])
|
|
1208
1208
|
}, [
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1209
|
+
c("div", Mt, F(O(r).currentRepeat || "-"), 1),
|
|
1210
|
+
(y(), S("svg", {
|
|
1211
|
+
class: R(["inc", { disabled: O(r).currentRepeat >= v.value }]),
|
|
1212
|
+
viewBox: "0 -100 100 100",
|
|
1213
|
+
onClick: Te(Q, ["prevent"])
|
|
1214
|
+
}, b[1] || (b[1] = [
|
|
1215
|
+
c("path", { d: "m10-20 40-60 40 60H10Z" }, null, -1)
|
|
1216
|
+
]), 2)),
|
|
1217
|
+
(y(), S("svg", {
|
|
1218
|
+
class: R(["dec", { disabled: O(r).currentRepeat <= 1 }]),
|
|
1219
|
+
viewBox: "0 -100 100 100",
|
|
1220
|
+
onClick: Te(z, ["prevent"])
|
|
1221
|
+
}, b[2] || (b[2] = [
|
|
1222
|
+
c("path", { d: "m10-80 40 60 40-60H10Z" }, null, -1)
|
|
1223
|
+
]), 2))
|
|
1212
1224
|
], 2),
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1225
|
+
b[4] || (b[4] = c("div", { class: "rpt-title" }, "Rpt", -1)),
|
|
1226
|
+
c("div", _t, [
|
|
1227
|
+
c("div", St, F(O(r).currentBeat), 1)
|
|
1216
1228
|
]),
|
|
1217
|
-
|
|
1229
|
+
b[5] || (b[5] = c("div", { class: "beat-title" }, "Beat", -1))
|
|
1218
1230
|
], 64)),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
(
|
|
1231
|
+
_.value ? (y(), S("div", kt, [
|
|
1232
|
+
c("div", Tt, [
|
|
1233
|
+
(y(!0), S(le, null, ge(w.value, (T) => (y(), S("div", {
|
|
1222
1234
|
key: T,
|
|
1223
|
-
class:
|
|
1224
|
-
onClick: (
|
|
1225
|
-
},
|
|
1235
|
+
class: R(["mark-option", { selected: T === i.value }]),
|
|
1236
|
+
onClick: ($) => te(T, $)
|
|
1237
|
+
}, F(T), 11, Ct))), 128))
|
|
1226
1238
|
])
|
|
1227
|
-
])) :
|
|
1239
|
+
])) : se("", !0)
|
|
1228
1240
|
], 2));
|
|
1229
1241
|
}
|
|
1230
|
-
},
|
|
1242
|
+
}, Bt = /* @__PURE__ */ U(xt, [["__scopeId", "data-v-0256e5c0"]]), wt = { class: "title" }, Et = {
|
|
1231
1243
|
__name: "BaseNumericInput",
|
|
1232
|
-
props: /* @__PURE__ */
|
|
1244
|
+
props: /* @__PURE__ */ fe({
|
|
1233
1245
|
title: {
|
|
1234
1246
|
type: String,
|
|
1235
1247
|
required: !0
|
|
@@ -1292,346 +1304,387 @@ const vt = {
|
|
|
1292
1304
|
}),
|
|
1293
1305
|
emits: ["update:value"],
|
|
1294
1306
|
setup(e) {
|
|
1295
|
-
|
|
1307
|
+
G((d) => ({
|
|
1296
1308
|
"0d0963e0": e.textColor,
|
|
1297
1309
|
"4ad34b2f": e.backgroundColor,
|
|
1298
1310
|
"02156786": e.color,
|
|
1299
|
-
"715a9528":
|
|
1300
|
-
"30d64f7d":
|
|
1311
|
+
"715a9528": u.value,
|
|
1312
|
+
"30d64f7d": m.value,
|
|
1301
1313
|
b8fbe65e: e.focusColor
|
|
1302
1314
|
}));
|
|
1303
|
-
const t = e, a =
|
|
1304
|
-
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
}),
|
|
1308
|
-
|
|
1315
|
+
const t = e, a = Z("el"), { width: n, height: s } = K(a), l = j(e, "value"), r = E(t.formatValue(t.transformSliderToDisplay(l.value)));
|
|
1316
|
+
D(l, () => {
|
|
1317
|
+
const d = t.transformSliderToDisplay(l.value);
|
|
1318
|
+
r.value = t.formatValue(d);
|
|
1319
|
+
}), D(r, () => {
|
|
1320
|
+
r.value = t.validateInput(r.value), t.maxChars && r.value.length > t.maxChars && (r.value = r.value.slice(0, t.maxChars));
|
|
1309
1321
|
});
|
|
1310
|
-
const
|
|
1311
|
-
function
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1322
|
+
const m = M(() => Math.min(s.value / 2.25, n.value / 2.2) + "px"), u = M(() => Math.min(n.value / 3, s.value / 6.4) + "px");
|
|
1323
|
+
function i() {
|
|
1324
|
+
const d = t.parseValue(r.value), v = t.transformDisplayToSlider(d);
|
|
1325
|
+
l.value = Math.min(Math.max(v, t.sliderMin), t.sliderMax);
|
|
1314
1326
|
}
|
|
1315
|
-
return (
|
|
1327
|
+
return (d, v) => (y(), S("div", {
|
|
1316
1328
|
class: "outer",
|
|
1317
1329
|
ref_key: "el",
|
|
1318
1330
|
ref: a
|
|
1319
1331
|
}, [
|
|
1320
|
-
|
|
1321
|
-
|
|
1332
|
+
v[2] || (v[2] = c("div", { class: "frame" }, null, -1)),
|
|
1333
|
+
Re(c("input", {
|
|
1322
1334
|
type: "text",
|
|
1323
1335
|
class: "input",
|
|
1324
|
-
"onUpdate:modelValue":
|
|
1336
|
+
"onUpdate:modelValue": v[0] || (v[0] = (C) => r.value = C),
|
|
1325
1337
|
inputmode: "decimal",
|
|
1326
1338
|
pattern: "\\d*",
|
|
1327
|
-
onChange:
|
|
1339
|
+
onChange: i
|
|
1328
1340
|
}, null, 544), [
|
|
1329
|
-
[Le,
|
|
1341
|
+
[Le, r.value]
|
|
1330
1342
|
]),
|
|
1331
|
-
|
|
1332
|
-
|
|
1343
|
+
c("div", wt, F(e.title), 1),
|
|
1344
|
+
V(de, {
|
|
1333
1345
|
class: "slider",
|
|
1334
|
-
value:
|
|
1335
|
-
"onUpdate:value":
|
|
1346
|
+
value: l.value,
|
|
1347
|
+
"onUpdate:value": v[1] || (v[1] = (C) => l.value = C),
|
|
1336
1348
|
"thumb-length": e.thumbLength,
|
|
1337
1349
|
max: e.sliderMax,
|
|
1338
1350
|
min: e.sliderMin
|
|
1339
1351
|
}, null, 8, ["value", "thumb-length", "max", "min"])
|
|
1340
1352
|
], 512));
|
|
1341
1353
|
}
|
|
1342
|
-
},
|
|
1354
|
+
}, Fe = /* @__PURE__ */ U(Et, [["__scopeId", "data-v-79c7a539"]]), Pt = {
|
|
1343
1355
|
__name: "SpeedInput",
|
|
1344
1356
|
setup(e) {
|
|
1345
|
-
const t =
|
|
1357
|
+
const t = ee(), a = oe(), n = M({
|
|
1346
1358
|
get: () => Math.log2(t.playbackSpeed) * 0.5 + 0.5,
|
|
1347
|
-
set: (
|
|
1348
|
-
const
|
|
1349
|
-
a.setPlaybackSpeed(
|
|
1359
|
+
set: (i) => {
|
|
1360
|
+
const d = Math.pow(2, i * 2 - 1);
|
|
1361
|
+
a.setPlaybackSpeed(d);
|
|
1350
1362
|
}
|
|
1351
|
-
}), s = (
|
|
1352
|
-
const
|
|
1353
|
-
return Math.min(Math.max(
|
|
1363
|
+
}), s = (i) => Math.floor(Math.pow(2, i * 2 - 1) * 100 + 0.5) + "", l = (i) => parseFloat(i), r = (i) => i.replace(/\D/g, ""), m = (i) => i, u = (i) => {
|
|
1364
|
+
const d = Math.log2(i / 100) * 0.5 + 0.5;
|
|
1365
|
+
return Math.min(Math.max(d, 0), 1);
|
|
1354
1366
|
};
|
|
1355
|
-
return (
|
|
1367
|
+
return (i, d) => (y(), Me(Fe, {
|
|
1356
1368
|
value: n.value,
|
|
1357
|
-
"onUpdate:value":
|
|
1369
|
+
"onUpdate:value": d[0] || (d[0] = (v) => n.value = v),
|
|
1358
1370
|
title: "Speed",
|
|
1359
1371
|
color: "#336",
|
|
1360
1372
|
"text-color": "#aad",
|
|
1361
1373
|
"format-value": s,
|
|
1362
|
-
"parse-value":
|
|
1363
|
-
"validate-input":
|
|
1364
|
-
"transform-slider-to-display":
|
|
1365
|
-
"transform-display-to-slider":
|
|
1374
|
+
"parse-value": l,
|
|
1375
|
+
"validate-input": r,
|
|
1376
|
+
"transform-slider-to-display": m,
|
|
1377
|
+
"transform-display-to-slider": u,
|
|
1366
1378
|
"thumb-length": 2,
|
|
1367
1379
|
"max-chars": 3
|
|
1368
1380
|
}, null, 8, ["value"]));
|
|
1369
1381
|
}
|
|
1370
|
-
},
|
|
1382
|
+
}, Vt = {
|
|
1371
1383
|
__name: "TimeInput",
|
|
1372
1384
|
setup(e) {
|
|
1373
|
-
const t =
|
|
1374
|
-
return (
|
|
1375
|
-
value:
|
|
1385
|
+
const t = ee(), a = ie(), n = oe(), s = (i) => i.toFixed(1), l = (i) => parseFloat(i), r = (i) => i.replace(/[^0-9.]/g, ""), m = (i) => i, u = (i) => i;
|
|
1386
|
+
return (i, d) => (y(), Me(Fe, {
|
|
1387
|
+
value: O(t).currentTime,
|
|
1376
1388
|
"onUpdate:value": [
|
|
1377
|
-
|
|
1378
|
-
|
|
1389
|
+
d[0] || (d[0] = (v) => O(t).currentTime = v),
|
|
1390
|
+
O(n).setTime
|
|
1379
1391
|
],
|
|
1380
1392
|
title: "Time",
|
|
1381
1393
|
color: "#344",
|
|
1382
1394
|
"focus-color": "#556868",
|
|
1383
1395
|
"text-color": "#acc",
|
|
1384
1396
|
"background-color": "#111117",
|
|
1385
|
-
"slider-max":
|
|
1397
|
+
"slider-max": O(a).totalDuration,
|
|
1386
1398
|
"slider-min": 0,
|
|
1387
1399
|
"format-value": s,
|
|
1388
|
-
"parse-value":
|
|
1389
|
-
"validate-input":
|
|
1390
|
-
"transform-slider-to-display":
|
|
1391
|
-
"transform-display-to-slider":
|
|
1400
|
+
"parse-value": l,
|
|
1401
|
+
"validate-input": r,
|
|
1402
|
+
"transform-slider-to-display": m,
|
|
1403
|
+
"transform-display-to-slider": u,
|
|
1392
1404
|
"thumb-length": 2
|
|
1393
1405
|
}, null, 8, ["value", "onUpdate:value", "slider-max"]));
|
|
1394
1406
|
}
|
|
1395
|
-
},
|
|
1407
|
+
}, Rt = { class: "inner" }, Lt = {
|
|
1396
1408
|
__name: "AudioButton",
|
|
1397
1409
|
setup(e) {
|
|
1398
|
-
const t =
|
|
1399
|
-
return (s,
|
|
1400
|
-
class:
|
|
1410
|
+
const t = E(!1), a = () => t.value = !0, n = () => t.value = !1;
|
|
1411
|
+
return (s, l) => (y(), S("div", {
|
|
1412
|
+
class: R(["button-outer", { down: t.value }]),
|
|
1401
1413
|
onPointerdown: a,
|
|
1402
1414
|
onPointerup: n,
|
|
1403
1415
|
onPointerleave: n
|
|
1404
1416
|
}, [
|
|
1405
|
-
|
|
1406
|
-
|
|
1417
|
+
c("div", Rt, [
|
|
1418
|
+
re(s.$slots, "default", {}, void 0, !0)
|
|
1407
1419
|
])
|
|
1408
1420
|
], 34));
|
|
1409
1421
|
}
|
|
1410
|
-
},
|
|
1422
|
+
}, X = /* @__PURE__ */ U(Lt, [["__scopeId", "data-v-0d7af06e"]]), Ot = { class: "outer" }, It = { class: "title" }, At = { class: "buttons" }, Nt = {
|
|
1411
1423
|
class: "icon",
|
|
1412
1424
|
viewBox: "0 0 48 48"
|
|
1413
|
-
},
|
|
1425
|
+
}, $t = ["d"], Dt = {
|
|
1414
1426
|
__name: "MixerControls",
|
|
1415
1427
|
setup(e) {
|
|
1416
|
-
const t =
|
|
1428
|
+
const t = ie(), a = ee(), n = oe();
|
|
1417
1429
|
function s() {
|
|
1418
1430
|
a.isPlaying ? n.stop() : n.play();
|
|
1419
1431
|
}
|
|
1420
|
-
function
|
|
1421
|
-
const
|
|
1422
|
-
let
|
|
1423
|
-
for (let
|
|
1424
|
-
if (
|
|
1425
|
-
|
|
1432
|
+
function l() {
|
|
1433
|
+
const x = a.currentTime, g = t.beats.filter((k) => k.beat === 1).sort((k, I) => k.time - I.time);
|
|
1434
|
+
let w = null;
|
|
1435
|
+
for (let k = g.length - 1; k >= 0; k--)
|
|
1436
|
+
if (g[k].time < x) {
|
|
1437
|
+
w = g[k];
|
|
1426
1438
|
break;
|
|
1427
1439
|
}
|
|
1428
|
-
|
|
1440
|
+
w && n.setBar(w.bar, w.repeat);
|
|
1429
1441
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const
|
|
1432
|
-
let
|
|
1433
|
-
for (let
|
|
1434
|
-
if (
|
|
1435
|
-
|
|
1442
|
+
function r() {
|
|
1443
|
+
const x = a.currentTime, g = t.beats.filter((k) => k.beat === 1).sort((k, I) => k.time - I.time);
|
|
1444
|
+
let w = null;
|
|
1445
|
+
for (let k = 0; k < g.length; k++)
|
|
1446
|
+
if (g[k].time > x) {
|
|
1447
|
+
w = g[k];
|
|
1436
1448
|
break;
|
|
1437
1449
|
}
|
|
1438
|
-
|
|
1450
|
+
w && n.setBar(w.bar, w.repeat);
|
|
1439
1451
|
}
|
|
1440
|
-
function
|
|
1452
|
+
function m() {
|
|
1441
1453
|
n.playStartingNotes();
|
|
1442
1454
|
}
|
|
1443
|
-
const
|
|
1444
|
-
function
|
|
1455
|
+
const u = E(!1), i = E(!0), d = E(!1), v = E(null);
|
|
1456
|
+
function C() {
|
|
1445
1457
|
d.value = !d.value;
|
|
1446
1458
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1459
|
+
function _() {
|
|
1460
|
+
d.value = !1;
|
|
1449
1461
|
}
|
|
1450
|
-
|
|
1451
|
-
x(
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1462
|
+
function B(x) {
|
|
1463
|
+
v.value && !v.value.contains(x.target) && _();
|
|
1464
|
+
}
|
|
1465
|
+
be(() => {
|
|
1466
|
+
document.addEventListener("click", B);
|
|
1467
|
+
}), he(() => {
|
|
1468
|
+
document.removeEventListener("click", B);
|
|
1469
|
+
});
|
|
1470
|
+
function L() {
|
|
1471
|
+
u.value = !u.value;
|
|
1472
|
+
}
|
|
1473
|
+
function N() {
|
|
1474
|
+
i.value = !i.value;
|
|
1475
|
+
}
|
|
1476
|
+
return (x, g) => (y(), S("div", Ot, [
|
|
1477
|
+
c("div", It, [
|
|
1478
|
+
V(De, {
|
|
1479
|
+
class: "text",
|
|
1480
|
+
align: "centre"
|
|
1481
|
+
}, {
|
|
1482
|
+
default: H(() => [
|
|
1483
|
+
ye(F(O(t).title), 1)
|
|
1484
|
+
]),
|
|
1485
|
+
_: 1
|
|
1486
|
+
}),
|
|
1487
|
+
c("div", {
|
|
1488
|
+
class: "menu-container",
|
|
1489
|
+
ref_key: "menuRef",
|
|
1490
|
+
ref: v
|
|
1491
|
+
}, [
|
|
1492
|
+
(y(), S("svg", {
|
|
1493
|
+
class: "menu",
|
|
1494
|
+
viewBox: "0 -960 960 960",
|
|
1495
|
+
onClick: C
|
|
1496
|
+
}, g[1] || (g[1] = [
|
|
1497
|
+
c("path", { d: "M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" }, null, -1)
|
|
1498
|
+
]))),
|
|
1499
|
+
d.value && x.$slots.menu ? (y(), S("div", {
|
|
1500
|
+
key: 0,
|
|
1501
|
+
class: "dropdown-menu",
|
|
1502
|
+
onClick: _
|
|
1503
|
+
}, [
|
|
1504
|
+
re(x.$slots, "menu", {}, void 0, !0)
|
|
1505
|
+
])) : se("", !0)
|
|
1506
|
+
], 512)
|
|
1507
|
+
]),
|
|
1508
|
+
V(de, {
|
|
1461
1509
|
class: "main",
|
|
1462
1510
|
colour: "red",
|
|
1463
|
-
modelValue:
|
|
1464
|
-
"onUpdate:modelValue":
|
|
1511
|
+
modelValue: O(a).masterVolume,
|
|
1512
|
+
"onUpdate:modelValue": g[0] || (g[0] = (w) => O(a).masterVolume = w)
|
|
1465
1513
|
}, null, 8, ["modelValue"]),
|
|
1466
|
-
|
|
1514
|
+
V(de, {
|
|
1467
1515
|
class: "tick",
|
|
1468
1516
|
colour: "blue"
|
|
1469
1517
|
}),
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1518
|
+
g[7] || (g[7] = c("div", { class: "main-t" }, "Main", -1)),
|
|
1519
|
+
g[8] || (g[8] = c("div", { class: "tick-t" }, "Tick", -1)),
|
|
1520
|
+
V(Bt, { class: "bar" }),
|
|
1521
|
+
V(Vt, { class: "time" }),
|
|
1522
|
+
V(Pt, { class: "speed" }),
|
|
1523
|
+
c("div", At, [
|
|
1524
|
+
V(X, {
|
|
1477
1525
|
class: "button",
|
|
1478
|
-
onClick:
|
|
1526
|
+
onClick: l
|
|
1479
1527
|
}, {
|
|
1480
|
-
default:
|
|
1481
|
-
|
|
1528
|
+
default: H(() => g[2] || (g[2] = [
|
|
1529
|
+
c("svg", {
|
|
1482
1530
|
class: "icon",
|
|
1483
1531
|
viewBox: "0 0 48 48"
|
|
1484
1532
|
}, [
|
|
1485
|
-
|
|
1533
|
+
c("path", { d: "M11 36V12h3v24Zm26 0L19.7 24 37 12Z" })
|
|
1486
1534
|
], -1)
|
|
1487
1535
|
])),
|
|
1488
1536
|
_: 1,
|
|
1489
|
-
__: [
|
|
1537
|
+
__: [2]
|
|
1490
1538
|
}),
|
|
1491
|
-
|
|
1539
|
+
V(X, {
|
|
1492
1540
|
class: "button",
|
|
1493
1541
|
onClick: s
|
|
1494
1542
|
}, {
|
|
1495
|
-
default:
|
|
1496
|
-
(
|
|
1497
|
-
|
|
1498
|
-
d:
|
|
1499
|
-
}, null, 8,
|
|
1543
|
+
default: H(() => [
|
|
1544
|
+
(y(), S("svg", Nt, [
|
|
1545
|
+
c("path", {
|
|
1546
|
+
d: O(a).isPlaying ? "M27.4 35.4V12.6h8v22.8Zm-14.8 0V12.6h8.05v22.8Z" : "M16 37.85v-28l22 14Z"
|
|
1547
|
+
}, null, 8, $t)
|
|
1500
1548
|
]))
|
|
1501
1549
|
]),
|
|
1502
1550
|
_: 1
|
|
1503
1551
|
}),
|
|
1504
|
-
|
|
1552
|
+
V(X, {
|
|
1505
1553
|
class: "button",
|
|
1506
|
-
onClick:
|
|
1554
|
+
onClick: r
|
|
1507
1555
|
}, {
|
|
1508
|
-
default:
|
|
1509
|
-
|
|
1556
|
+
default: H(() => g[3] || (g[3] = [
|
|
1557
|
+
c("svg", {
|
|
1510
1558
|
class: "icon",
|
|
1511
1559
|
viewBox: "0 0 48 48"
|
|
1512
1560
|
}, [
|
|
1513
|
-
|
|
1561
|
+
c("path", { d: "M34 36V12h3v24Zm-23 0V12l17.3 12Z" })
|
|
1514
1562
|
], -1)
|
|
1515
1563
|
])),
|
|
1516
1564
|
_: 1,
|
|
1517
|
-
__: [
|
|
1565
|
+
__: [3]
|
|
1518
1566
|
}),
|
|
1519
|
-
|
|
1567
|
+
V(X, {
|
|
1520
1568
|
class: "button",
|
|
1521
|
-
onClick:
|
|
1569
|
+
onClick: L
|
|
1522
1570
|
}, {
|
|
1523
|
-
default:
|
|
1524
|
-
(
|
|
1525
|
-
class:
|
|
1571
|
+
default: H(() => [
|
|
1572
|
+
(y(), S("svg", {
|
|
1573
|
+
class: R(["icon", u.value ? "on" : "off"]),
|
|
1526
1574
|
viewBox: "-128 -128 768 768"
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1575
|
+
}, g[4] || (g[4] = [
|
|
1576
|
+
c("path", { d: "m 463.84136,154.89339 c -6.42,-6.42 -16.83,-6.42 -23.251,0 -71.31197,70.35135 -136.61146,132.25426 -208.741,199.7 h -105.82 c 23.35495,-140.1063 67.13099,-217.59716 120.727,-318.357996 0.86,-0.803 2.209,-0.801 3.067,-10e-4 20.50653,37.383983 48.51152,88.812606 72.26194,147.190756 1.186,9.002 12.2214,17.4338 23.3242,11.71391 9.002,-1.186 11.1594,-12.2324 9.9724,-21.2344 -21.69905,-53.89113 -30.43965,-85.078342 -83.11454,-161.702266 -13.446,-12.55299965 -34.508,-12.55699965 -47.954,10e-4 C 126.80877,149.30021 96.099465,324.74626 77.091365,474.25139 c -2.829,21.473 13.907,40.535 35.543995,40.535 h 271.311 c 21.661,0 38.373,-19.087 35.544,-40.535 -8.26237,-52.34207 -14.88466,-100.7074 -24.7871,-157.02622 -6.40949,-11.78839 -8.3911,-14.9907 -17.4031,-13.8037 -9.002,1.186 -13.59751,8.0528 -12.41051,17.0548 l 5.66371,34.11712 h -83.159 c 64.35441,-63.86663 129.29308,-130.29894 176.448,-176.449 6.42,-6.42 6.42,-16.83 -10e-4,-23.251 z m -88.956,232.582 12.004,91.074 c 0.112,0.846 -0.148,1.701 -0.708,2.341 -0.566,0.645 -1.38,1.014 -2.235,1.014 h -271.311 c -0.855,0 -1.668,-0.369 -2.231,-1.011 -0.564,-0.643 -0.824,-1.499 -0.712,-2.347 l 12.003,-91.072 h 253.19 z" }, null, -1)
|
|
1529
1577
|
]), 2))
|
|
1530
1578
|
]),
|
|
1531
1579
|
_: 1
|
|
1532
1580
|
}),
|
|
1533
|
-
|
|
1581
|
+
V(X, {
|
|
1534
1582
|
class: "button",
|
|
1535
|
-
onClick:
|
|
1583
|
+
onClick: N
|
|
1536
1584
|
}, {
|
|
1537
|
-
default:
|
|
1538
|
-
(
|
|
1539
|
-
class:
|
|
1585
|
+
default: H(() => [
|
|
1586
|
+
(y(), S("svg", {
|
|
1587
|
+
class: R(["icon", i.value ? "on" : "off"]),
|
|
1540
1588
|
viewBox: "-2 -2 28 28"
|
|
1541
|
-
},
|
|
1542
|
-
|
|
1589
|
+
}, g[5] || (g[5] = [
|
|
1590
|
+
c("path", { d: "m 8.9838564,1.5166215 v 2 h 5.9999996 v -2 z m 2.9999996,3 c -4.9699996,0 -8.9999996,4.0299999 -8.9999996,8.9999995 0,4.97 4.02,9 8.9999996,9 4.98,0 9,-4.03 9,-9 0,-2.12 -0.740703,-4.0693745 -1.970703,-5.6093745 l 1.419922,-1.421875 c -0.43,-0.51 -0.900156,-0.9882031 -1.410156,-1.4082031 l -1.419922,1.4199219 c -1.55,-1.24 -3.499141,-1.9804688 -5.619141,-1.9804688 z m -1.789062,4.7480469 6,4.4999996 -6,4.5 z" }, null, -1)
|
|
1543
1591
|
]), 2))
|
|
1544
1592
|
]),
|
|
1545
1593
|
_: 1
|
|
1546
1594
|
}),
|
|
1547
|
-
|
|
1595
|
+
V(X, {
|
|
1548
1596
|
class: "button",
|
|
1549
|
-
onClick:
|
|
1597
|
+
onClick: m
|
|
1550
1598
|
}, {
|
|
1551
|
-
default:
|
|
1552
|
-
|
|
1599
|
+
default: H(() => g[6] || (g[6] = [
|
|
1600
|
+
c("svg", {
|
|
1553
1601
|
class: "icon",
|
|
1554
1602
|
viewBox: "0 -960 960 960"
|
|
1555
1603
|
}, [
|
|
1556
|
-
|
|
1557
|
-
|
|
1604
|
+
c("path", { d: "m 306.66667,-360 q -44,0 -75.33334,-31.33333 Q 200,-422.66667 200,-466.66667 q 0,-44 31.33333,-75.33333 31.33334,-31.33333 75.33334,-31.33333 15.33333,0 28.33333,3.66666 13,3.66667 25,11 V -840 h 160 v 106.66667 H 413.33333 v 266.66666 q 0,44 -31.33333,75.33334 Q 350.66667,-360 306.66667,-360 Z" }),
|
|
1605
|
+
c("path", { d: "m 546.66667,-120 q -44,0 -75.33334,-31.33333 Q 440,-182.66667 440,-226.66667 q 0,-44 31.33333,-75.33333 31.33334,-31.33333 75.33334,-31.33333 15.33333,0 28.33333,3.66666 13,3.66667 25,11 V -600 h 160 v 106.66667 H 653.33333 v 266.66666 q 0,44 -31.33333,75.33334 Q 590.66667,-120 546.66667,-120 Z" })
|
|
1558
1606
|
], -1)
|
|
1559
1607
|
])),
|
|
1560
1608
|
_: 1,
|
|
1561
|
-
__: [
|
|
1609
|
+
__: [6]
|
|
1562
1610
|
})
|
|
1563
1611
|
])
|
|
1564
1612
|
]));
|
|
1565
1613
|
}
|
|
1566
|
-
},
|
|
1614
|
+
}, zt = /* @__PURE__ */ U(Dt, [["__scopeId", "data-v-a93a2793"]]), Ft = { class: "container" }, Ut = { class: "panel" }, xe = 40, Be = 40, we = 100, qt = 50, Ee = 400, Pe = 570, Ve = 570, Ht = 350, Wt = 330, Zt = 360, jt = 360, Gt = {
|
|
1567
1615
|
__name: "MixerLayout",
|
|
1568
1616
|
setup(e) {
|
|
1569
|
-
|
|
1570
|
-
"
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1617
|
+
G((u) => ({
|
|
1618
|
+
"6bce51ec": l.value,
|
|
1619
|
+
"6bdbf7b8": r.value,
|
|
1620
|
+
78139275: m.value
|
|
1573
1621
|
}));
|
|
1574
|
-
const t =
|
|
1575
|
-
const
|
|
1576
|
-
return
|
|
1577
|
-
}),
|
|
1622
|
+
const t = ie(), a = Z("container"), { width: n } = K(a), s = M(() => {
|
|
1623
|
+
const u = n.value, i = t.parts.length;
|
|
1624
|
+
return u < 640 || u < xe * i + Ee ? 0 : u < Be * i + Pe ? 1 : u < we * i + Ve ? 2 : 3;
|
|
1625
|
+
}), l = M(() => {
|
|
1578
1626
|
switch (s.value) {
|
|
1579
1627
|
case 0:
|
|
1580
|
-
return `${
|
|
1628
|
+
return `${Ht}px ` + `${qt}px `.repeat(t.parts.length);
|
|
1581
1629
|
case 1:
|
|
1582
|
-
return `${qt}px`;
|
|
1583
|
-
case 2:
|
|
1584
1630
|
return `${Wt}px`;
|
|
1631
|
+
case 2:
|
|
1632
|
+
return `${Zt}px`;
|
|
1585
1633
|
default:
|
|
1586
|
-
return `${
|
|
1634
|
+
return `${jt}px`;
|
|
1587
1635
|
}
|
|
1588
|
-
}),
|
|
1636
|
+
}), r = M(() => {
|
|
1589
1637
|
switch (s.value) {
|
|
1590
1638
|
case 0:
|
|
1591
1639
|
return "100vw";
|
|
1592
1640
|
case 1:
|
|
1593
|
-
return `${
|
|
1641
|
+
return `${xe}px `.repeat(t.parts.length) + `${Ee}px`;
|
|
1594
1642
|
case 2:
|
|
1595
|
-
return `${
|
|
1643
|
+
return `${Be}px `.repeat(t.parts.length) + `${Pe}px`;
|
|
1596
1644
|
default:
|
|
1597
|
-
return `${
|
|
1645
|
+
return `${we}px `.repeat(t.parts.length) + `${Ve}px`;
|
|
1598
1646
|
}
|
|
1599
|
-
}),
|
|
1600
|
-
const
|
|
1601
|
-
return s.value > 0 ? '"' +
|
|
1647
|
+
}), m = M(() => {
|
|
1648
|
+
const u = [...t.parts.keys()];
|
|
1649
|
+
return s.value > 0 ? '"' + u.map((i) => "part" + i).join(" ") + ' controls"' : '"controls" ' + u.map((i) => '"part' + i + '"').join(" ");
|
|
1602
1650
|
});
|
|
1603
|
-
return (
|
|
1651
|
+
return (u, i) => (y(), S("div", {
|
|
1604
1652
|
class: "outer",
|
|
1605
1653
|
ref_key: "container",
|
|
1606
1654
|
ref: a
|
|
1607
1655
|
}, [
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
(
|
|
1611
|
-
key:
|
|
1612
|
-
class:
|
|
1613
|
-
name:
|
|
1614
|
-
volume:
|
|
1615
|
-
"onUpdate:volume": (
|
|
1616
|
-
solo:
|
|
1617
|
-
"onUpdate:solo": (
|
|
1618
|
-
mute:
|
|
1619
|
-
"onUpdate:mute": (
|
|
1656
|
+
c("div", Ft, [
|
|
1657
|
+
c("div", Ut, [
|
|
1658
|
+
(y(!0), S(le, null, ge(O(t).parts, (d, v) => (y(), Me(bt, {
|
|
1659
|
+
key: d.name,
|
|
1660
|
+
class: R("part" + v),
|
|
1661
|
+
name: d.name,
|
|
1662
|
+
volume: d.volume,
|
|
1663
|
+
"onUpdate:volume": (C) => d.volume = C,
|
|
1664
|
+
solo: d.solo,
|
|
1665
|
+
"onUpdate:solo": (C) => d.solo = C,
|
|
1666
|
+
mute: d.mute,
|
|
1667
|
+
"onUpdate:mute": (C) => d.mute = C,
|
|
1620
1668
|
ref_for: !0,
|
|
1621
1669
|
ref: "parts"
|
|
1622
1670
|
}, null, 8, ["class", "name", "volume", "onUpdate:volume", "solo", "onUpdate:solo", "mute", "onUpdate:mute"]))), 128)),
|
|
1623
|
-
|
|
1624
|
-
title:
|
|
1671
|
+
V(zt, {
|
|
1672
|
+
title: O(t).title,
|
|
1625
1673
|
class: "controls"
|
|
1626
|
-
},
|
|
1674
|
+
}, {
|
|
1675
|
+
menu: H(() => [
|
|
1676
|
+
re(u.$slots, "menu", {}, void 0, !0)
|
|
1677
|
+
]),
|
|
1678
|
+
_: 3
|
|
1679
|
+
}, 8, ["title"])
|
|
1627
1680
|
])
|
|
1628
1681
|
])
|
|
1629
1682
|
], 512));
|
|
1630
1683
|
}
|
|
1631
|
-
},
|
|
1684
|
+
}, na = /* @__PURE__ */ U(Gt, [["__scopeId", "data-v-df706138"]]), Kt = { class: "outer" }, Yt = { class: "mid" }, Qt = { class: "inner" }, Xt = {
|
|
1632
1685
|
key: 0,
|
|
1633
1686
|
class: "content"
|
|
1634
|
-
},
|
|
1687
|
+
}, Jt = {
|
|
1635
1688
|
__name: "Placeholder",
|
|
1636
1689
|
props: {
|
|
1637
1690
|
colour: {
|
|
@@ -1644,40 +1697,40 @@ const vt = {
|
|
|
1644
1697
|
}
|
|
1645
1698
|
},
|
|
1646
1699
|
setup(e) {
|
|
1647
|
-
return
|
|
1700
|
+
return G((t) => ({
|
|
1648
1701
|
"66bea586": e.colour
|
|
1649
|
-
})), (t, a) => (
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
e.text || t.$slots.default ? (
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
])) :
|
|
1702
|
+
})), (t, a) => (y(), S("div", Kt, [
|
|
1703
|
+
c("div", Yt, [
|
|
1704
|
+
c("div", Qt, [
|
|
1705
|
+
e.text || t.$slots.default ? (y(), S("div", Xt, [
|
|
1706
|
+
ye(F(e.text) + " ", 1),
|
|
1707
|
+
re(t.$slots, "default", {}, void 0, !0)
|
|
1708
|
+
])) : se("", !0)
|
|
1656
1709
|
])
|
|
1657
1710
|
])
|
|
1658
1711
|
]));
|
|
1659
1712
|
}
|
|
1660
|
-
},
|
|
1713
|
+
}, sa = /* @__PURE__ */ U(Jt, [["__scopeId", "data-v-dff76c48"]]);
|
|
1661
1714
|
export {
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1715
|
+
X as AudioButton,
|
|
1716
|
+
de as AudioSlider,
|
|
1717
|
+
Bt as BarInput,
|
|
1718
|
+
Fe as BaseNumericInput,
|
|
1719
|
+
ve as DEV_MODE,
|
|
1667
1720
|
ft as DummyAudioEngine,
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1721
|
+
zt as MixerControls,
|
|
1722
|
+
na as MixerLayout,
|
|
1723
|
+
bt as PartControl,
|
|
1724
|
+
sa as Placeholder,
|
|
1725
|
+
Pt as SpeedInput,
|
|
1726
|
+
Vt as TimeInput,
|
|
1727
|
+
De as TitleText,
|
|
1728
|
+
mt as TriState,
|
|
1729
|
+
ze as isDevFeature,
|
|
1730
|
+
aa as isDevMode,
|
|
1731
|
+
ee as useAudioStateStore,
|
|
1732
|
+
K as useElementSize,
|
|
1733
|
+
oe as useMasterAudioControl,
|
|
1734
|
+
ie as useMusicDataStore,
|
|
1735
|
+
pt as usePlaybackStateStore
|
|
1683
1736
|
};
|