audio-mixer-ui 1.2.0 → 1.2.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/dist/audio-mixer-ui.js +765 -640
- package/dist/audio-mixer-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/audio-mixer-ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as _, watch as R, unref as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { ref as _, watch as R, unref as L, onScopeDispose as ee, readonly as Dt, mergeModels as Lt, useCssVars as at, computed as k, useTemplateRef as Y, useModel as tt, createElementBlock as T, openBlock as w, normalizeClass as I, createElementVNode as m, createCommentVNode as F, Fragment as pt, renderList as At, normalizeStyle as Gt, watchEffect as Tt, renderSlot as ut, toDisplayString as K, onUnmounted as kt, onMounted as Mt, createVNode as D, withCtx as Z, createTextVNode as St, withDirectives as It, withKeys as ae, vModelText as qt, withModifiers as Ct, createBlock as vt, nextTick as se, createStaticVNode as ne, vModelCheckbox as ie } from "vue";
|
|
2
|
+
import { defineStore as Pt } from "pinia";
|
|
3
3
|
import { LightweightAudioEngine as re, SpessaSynthAudioEngine as oe, PlaybackManager as le } from "audio-mixer-engine";
|
|
4
|
-
var
|
|
4
|
+
var Ht = function() {
|
|
5
5
|
if (typeof Map < "u")
|
|
6
6
|
return Map;
|
|
7
7
|
function e(t, a) {
|
|
@@ -47,10 +47,10 @@ var $t = function() {
|
|
|
47
47
|
}, t;
|
|
48
48
|
}()
|
|
49
49
|
);
|
|
50
|
-
}(),
|
|
50
|
+
}(), Bt = typeof window < "u" && typeof document < "u" && window.document === document, gt = function() {
|
|
51
51
|
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")();
|
|
52
52
|
}(), ue = function() {
|
|
53
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
53
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(gt) : function(e) {
|
|
54
54
|
return setTimeout(function() {
|
|
55
55
|
return e(Date.now());
|
|
56
56
|
}, 1e3 / 60);
|
|
@@ -59,24 +59,24 @@ var $t = function() {
|
|
|
59
59
|
function ce(e, t) {
|
|
60
60
|
var a = !1, s = !1, n = 0;
|
|
61
61
|
function i() {
|
|
62
|
-
a && (a = !1, e()), s &&
|
|
62
|
+
a && (a = !1, e()), s && h();
|
|
63
63
|
}
|
|
64
64
|
function r() {
|
|
65
65
|
ue(i);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
var
|
|
67
|
+
function h() {
|
|
68
|
+
var b = Date.now();
|
|
69
69
|
if (a) {
|
|
70
|
-
if (
|
|
70
|
+
if (b - n < de)
|
|
71
71
|
return;
|
|
72
72
|
s = !0;
|
|
73
73
|
} else
|
|
74
74
|
a = !0, s = !1, setTimeout(r, t);
|
|
75
|
-
n =
|
|
75
|
+
n = b;
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return h;
|
|
78
78
|
}
|
|
79
|
-
var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size", "weight"],
|
|
79
|
+
var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], fe = typeof MutationObserver < "u", pe = (
|
|
80
80
|
/** @class */
|
|
81
81
|
function() {
|
|
82
82
|
function e() {
|
|
@@ -98,14 +98,14 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
98
98
|
return a.broadcastActive();
|
|
99
99
|
}), t.length > 0;
|
|
100
100
|
}, e.prototype.connect_ = function() {
|
|
101
|
-
!
|
|
101
|
+
!Bt || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), fe ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
102
102
|
attributes: !0,
|
|
103
103
|
childList: !0,
|
|
104
104
|
characterData: !0,
|
|
105
105
|
subtree: !0
|
|
106
106
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
107
107
|
}, e.prototype.disconnect_ = function() {
|
|
108
|
-
!
|
|
108
|
+
!Bt || !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);
|
|
109
109
|
}, e.prototype.onTransitionEnd_ = function(t) {
|
|
110
110
|
var a = t.propertyName, s = a === void 0 ? "" : a, n = me.some(function(i) {
|
|
111
111
|
return !!~s.indexOf(i);
|
|
@@ -115,7 +115,7 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
115
115
|
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
116
116
|
}, e.instance_ = null, e;
|
|
117
117
|
}()
|
|
118
|
-
),
|
|
118
|
+
), Wt = function(e, t) {
|
|
119
119
|
for (var a = 0, s = Object.keys(t); a < s.length; a++) {
|
|
120
120
|
var n = s[a];
|
|
121
121
|
Object.defineProperty(e, n, {
|
|
@@ -126,59 +126,59 @@ var he = 20, me = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
return e;
|
|
129
|
-
},
|
|
129
|
+
}, ot = function(e) {
|
|
130
130
|
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
131
|
-
return t ||
|
|
132
|
-
},
|
|
133
|
-
function
|
|
131
|
+
return t || gt;
|
|
132
|
+
}, jt = xt(0, 0, 0, 0);
|
|
133
|
+
function bt(e) {
|
|
134
134
|
return parseFloat(e) || 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Vt(e) {
|
|
137
137
|
for (var t = [], a = 1; a < arguments.length; a++)
|
|
138
138
|
t[a - 1] = arguments[a];
|
|
139
139
|
return t.reduce(function(s, n) {
|
|
140
140
|
var i = e["border-" + n + "-width"];
|
|
141
|
-
return s +
|
|
141
|
+
return s + bt(i);
|
|
142
142
|
}, 0);
|
|
143
143
|
}
|
|
144
144
|
function ve(e) {
|
|
145
145
|
for (var t = ["top", "right", "bottom", "left"], a = {}, s = 0, n = t; s < n.length; s++) {
|
|
146
146
|
var i = n[s], r = e["padding-" + i];
|
|
147
|
-
a[i] =
|
|
147
|
+
a[i] = bt(r);
|
|
148
148
|
}
|
|
149
149
|
return a;
|
|
150
150
|
}
|
|
151
151
|
function ge(e) {
|
|
152
152
|
var t = e.getBBox();
|
|
153
|
-
return
|
|
153
|
+
return xt(0, 0, t.width, t.height);
|
|
154
154
|
}
|
|
155
155
|
function be(e) {
|
|
156
156
|
var t = e.clientWidth, a = e.clientHeight;
|
|
157
157
|
if (!t && !a)
|
|
158
|
-
return
|
|
159
|
-
var s =
|
|
160
|
-
if (s.boxSizing === "border-box" && (Math.round(
|
|
161
|
-
var l = Math.round(
|
|
162
|
-
Math.abs(l) !== 1 && (
|
|
158
|
+
return jt;
|
|
159
|
+
var s = ot(e).getComputedStyle(e), n = ve(s), i = n.left + n.right, r = n.top + n.bottom, h = bt(s.width), b = bt(s.height);
|
|
160
|
+
if (s.boxSizing === "border-box" && (Math.round(h + i) !== t && (h -= Vt(s, "left", "right") + i), Math.round(b + r) !== a && (b -= Vt(s, "top", "bottom") + r)), !ke(e)) {
|
|
161
|
+
var l = Math.round(h + i) - t, v = Math.round(b + r) - a;
|
|
162
|
+
Math.abs(l) !== 1 && (h -= l), Math.abs(v) !== 1 && (b -= v);
|
|
163
163
|
}
|
|
164
|
-
return
|
|
164
|
+
return xt(n.left, n.top, h, b);
|
|
165
165
|
}
|
|
166
166
|
var ye = /* @__PURE__ */ function() {
|
|
167
167
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
168
|
-
return e instanceof
|
|
168
|
+
return e instanceof ot(e).SVGGraphicsElement;
|
|
169
169
|
} : function(e) {
|
|
170
|
-
return e instanceof
|
|
170
|
+
return e instanceof ot(e).SVGElement && typeof e.getBBox == "function";
|
|
171
171
|
};
|
|
172
172
|
}();
|
|
173
173
|
function ke(e) {
|
|
174
|
-
return e ===
|
|
174
|
+
return e === ot(e).document.documentElement;
|
|
175
175
|
}
|
|
176
176
|
function Me(e) {
|
|
177
|
-
return
|
|
177
|
+
return Bt ? ye(e) ? ge(e) : be(e) : jt;
|
|
178
178
|
}
|
|
179
179
|
function Se(e) {
|
|
180
180
|
var t = e.x, a = e.y, s = e.width, n = e.height, i = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, r = Object.create(i.prototype);
|
|
181
|
-
return
|
|
181
|
+
return Wt(r, {
|
|
182
182
|
x: t,
|
|
183
183
|
y: a,
|
|
184
184
|
width: s,
|
|
@@ -189,14 +189,14 @@ function Se(e) {
|
|
|
189
189
|
left: t
|
|
190
190
|
}), r;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function xt(e, t, a, s) {
|
|
193
193
|
return { x: e, y: t, width: a, height: s };
|
|
194
194
|
}
|
|
195
|
-
var
|
|
195
|
+
var Pe = (
|
|
196
196
|
/** @class */
|
|
197
197
|
function() {
|
|
198
198
|
function e(t) {
|
|
199
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
199
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = xt(0, 0, 0, 0), this.target = t;
|
|
200
200
|
}
|
|
201
201
|
return e.prototype.isActive = function() {
|
|
202
202
|
var t = Me(this.target);
|
|
@@ -206,12 +206,12 @@ var xe = (
|
|
|
206
206
|
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
|
|
207
207
|
}, e;
|
|
208
208
|
}()
|
|
209
|
-
),
|
|
209
|
+
), xe = (
|
|
210
210
|
/** @class */
|
|
211
211
|
/* @__PURE__ */ function() {
|
|
212
212
|
function e(t, a) {
|
|
213
213
|
var s = Se(a);
|
|
214
|
-
|
|
214
|
+
Wt(this, { target: t, contentRect: s });
|
|
215
215
|
}
|
|
216
216
|
return e;
|
|
217
217
|
}()
|
|
@@ -219,7 +219,7 @@ var xe = (
|
|
|
219
219
|
/** @class */
|
|
220
220
|
function() {
|
|
221
221
|
function e(t, a, s) {
|
|
222
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
222
|
+
if (this.activeObservations_ = [], this.observations_ = new Ht(), typeof t != "function")
|
|
223
223
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
224
224
|
this.callback_ = t, this.controller_ = a, this.callbackCtx_ = s;
|
|
225
225
|
}
|
|
@@ -227,16 +227,16 @@ var xe = (
|
|
|
227
227
|
if (!arguments.length)
|
|
228
228
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
229
229
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
230
|
-
if (!(t instanceof
|
|
230
|
+
if (!(t instanceof ot(t).Element))
|
|
231
231
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
232
232
|
var a = this.observations_;
|
|
233
|
-
a.has(t) || (a.set(t, new
|
|
233
|
+
a.has(t) || (a.set(t, new Pe(t)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
234
234
|
}
|
|
235
235
|
}, e.prototype.unobserve = function(t) {
|
|
236
236
|
if (!arguments.length)
|
|
237
237
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
238
238
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
239
|
-
if (!(t instanceof
|
|
239
|
+
if (!(t instanceof ot(t).Element))
|
|
240
240
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
241
241
|
var a = this.observations_;
|
|
242
242
|
a.has(t) && (a.delete(t), a.size || this.controller_.removeObserver(this));
|
|
@@ -251,7 +251,7 @@ var xe = (
|
|
|
251
251
|
}, e.prototype.broadcastActive = function() {
|
|
252
252
|
if (this.hasActive()) {
|
|
253
253
|
var t = this.callbackCtx_, a = this.activeObservations_.map(function(s) {
|
|
254
|
-
return new
|
|
254
|
+
return new xe(s.target, s.broadcastRect());
|
|
255
255
|
});
|
|
256
256
|
this.callback_.call(t, a, t), this.clearActive();
|
|
257
257
|
}
|
|
@@ -261,7 +261,7 @@ var xe = (
|
|
|
261
261
|
return this.activeObservations_.length > 0;
|
|
262
262
|
}, e;
|
|
263
263
|
}()
|
|
264
|
-
),
|
|
264
|
+
), Zt = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Ht(), Yt = (
|
|
265
265
|
/** @class */
|
|
266
266
|
/* @__PURE__ */ function() {
|
|
267
267
|
function e(t) {
|
|
@@ -269,8 +269,8 @@ var xe = (
|
|
|
269
269
|
throw new TypeError("Cannot call a class as a function.");
|
|
270
270
|
if (!arguments.length)
|
|
271
271
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
272
|
-
var a =
|
|
273
|
-
|
|
272
|
+
var a = pe.getInstance(), s = new we(t, a, this);
|
|
273
|
+
Zt.set(this, s);
|
|
274
274
|
}
|
|
275
275
|
return e;
|
|
276
276
|
}()
|
|
@@ -280,46 +280,46 @@ var xe = (
|
|
|
280
280
|
"unobserve",
|
|
281
281
|
"disconnect"
|
|
282
282
|
].forEach(function(e) {
|
|
283
|
-
|
|
283
|
+
Yt.prototype[e] = function() {
|
|
284
284
|
var t;
|
|
285
|
-
return (t =
|
|
285
|
+
return (t = Zt.get(this))[e].apply(t, arguments);
|
|
286
286
|
};
|
|
287
287
|
});
|
|
288
288
|
var Ee = function() {
|
|
289
|
-
return typeof
|
|
289
|
+
return typeof gt.ResizeObserver < "u" ? gt.ResizeObserver : Yt;
|
|
290
290
|
}();
|
|
291
|
-
function
|
|
291
|
+
function st(e) {
|
|
292
292
|
const t = _(0), a = _(0);
|
|
293
293
|
let s = null;
|
|
294
294
|
const n = () => {
|
|
295
295
|
s && (s.disconnect(), s = null);
|
|
296
296
|
};
|
|
297
|
-
return R(() =>
|
|
297
|
+
return R(() => L(e), () => {
|
|
298
298
|
n();
|
|
299
|
-
const r =
|
|
299
|
+
const r = L(e);
|
|
300
300
|
if (!r) return;
|
|
301
|
-
s = new Ee((
|
|
302
|
-
const l =
|
|
301
|
+
s = new Ee((b) => {
|
|
302
|
+
const l = b[0];
|
|
303
303
|
l && (t.value = l.contentRect.width, a.value = l.contentRect.height);
|
|
304
304
|
}), s.observe(r);
|
|
305
|
-
const
|
|
306
|
-
t.value =
|
|
305
|
+
const h = r.getBoundingClientRect();
|
|
306
|
+
t.value = h.width, a.value = h.height;
|
|
307
307
|
}, { immediate: !0 }), ee(n), {
|
|
308
|
-
width:
|
|
309
|
-
height:
|
|
308
|
+
width: Dt(t),
|
|
309
|
+
height: Dt(a)
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const U = (e, t) => {
|
|
313
313
|
const a = e.__vccOpts || e;
|
|
314
314
|
for (const [s, n] of t)
|
|
315
315
|
a[s] = n;
|
|
316
316
|
return a;
|
|
317
|
-
}, Te = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-label", "aria-orientation", "tabindex"],
|
|
317
|
+
}, Te = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-label", "aria-orientation", "tabindex"], Ce = {
|
|
318
318
|
key: 0,
|
|
319
319
|
class: "level"
|
|
320
|
-
},
|
|
320
|
+
}, Be = {
|
|
321
321
|
__name: "AudioSlider",
|
|
322
|
-
props: /* @__PURE__ */
|
|
322
|
+
props: /* @__PURE__ */ Lt({
|
|
323
323
|
min: { type: Number, default: 0 },
|
|
324
324
|
max: { type: Number, default: 1 },
|
|
325
325
|
step: { type: Number, default: 0.01 },
|
|
@@ -338,62 +338,62 @@ const $ = (e, t) => {
|
|
|
338
338
|
}),
|
|
339
339
|
emits: ["update:value"],
|
|
340
340
|
setup(e) {
|
|
341
|
-
|
|
342
|
-
"2096b4c3":
|
|
343
|
-
"757f26aa":
|
|
344
|
-
"744b71b7":
|
|
345
|
-
d898db12:
|
|
346
|
-
"3a8d2f7c":
|
|
341
|
+
at((p) => ({
|
|
342
|
+
"2096b4c3": V.value,
|
|
343
|
+
"757f26aa": C.value,
|
|
344
|
+
"744b71b7": S.value,
|
|
345
|
+
d898db12: f.value,
|
|
346
|
+
"3a8d2f7c": P.value
|
|
347
347
|
}));
|
|
348
|
-
const t = e, a =
|
|
349
|
-
|
|
350
|
-
const
|
|
348
|
+
const t = e, a = Y("root"), { width: s, height: n } = st(a), i = k(() => Math.min(s.value, n.value)), r = k(() => Math.max(s.value, n.value)), h = k(() => s.value > n.value), b = k(() => h.value ? "h-slide" : "v-slide"), l = tt(e, "value");
|
|
349
|
+
k(() => Math.pow(1 - l.value, 0.5) * 180 + 20), k(() => Math.pow(l.value, 0.5) * 180 + 20);
|
|
350
|
+
const v = k(() => i.value * 0.8), E = k(() => i.value * t.thumbLength * 0.8), C = k(() => (h.value ? E : v).value + "px"), V = k(() => (h.value ? v : E).value + "px"), f = k(() => i.value * 0.1 + "px"), P = k(() => (r.value - E.value) * (l.value - t.min) / (t.max - t.min) + "px"), S = k(() => h.value ? "90deg" : "0deg"), B = _(!1), N = _(0), z = (p) => {
|
|
351
351
|
if (!a.value) return l.value;
|
|
352
|
-
const
|
|
352
|
+
const g = a.value.getBoundingClientRect(), A = p.clientX, lt = p.clientY;
|
|
353
353
|
let Q;
|
|
354
|
-
if (
|
|
355
|
-
const
|
|
356
|
-
Q = Math.max(0, Math.min(1,
|
|
354
|
+
if (h.value) {
|
|
355
|
+
const X = A - g.left - v.value / 2, J = g.width - v.value;
|
|
356
|
+
Q = Math.max(0, Math.min(1, X / J));
|
|
357
357
|
} else {
|
|
358
|
-
const
|
|
359
|
-
Q = Math.max(0, Math.min(1,
|
|
358
|
+
const X = g.bottom - lt - v.value / 2, J = g.height - v.value;
|
|
359
|
+
Q = Math.max(0, Math.min(1, X / J));
|
|
360
360
|
}
|
|
361
|
-
const
|
|
362
|
-
return t.step > 0 ? Math.round(
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
if (
|
|
369
|
-
if (
|
|
361
|
+
const W = t.min + Q * (t.max - t.min);
|
|
362
|
+
return t.step > 0 ? Math.round(W / t.step) * t.step : W;
|
|
363
|
+
}, q = (p) => {
|
|
364
|
+
p.preventDefault(), B.value = !0, N.value = l.value, a.value && a.value.focus(), l.value = z(p), a.value && a.value.setPointerCapture && a.value.setPointerCapture(p.pointerId), document.addEventListener("pointermove", G), document.addEventListener("pointerup", $), document.addEventListener("pointercancel", $);
|
|
365
|
+
}, G = (p) => {
|
|
366
|
+
B.value && (p.preventDefault(), l.value = z(p));
|
|
367
|
+
}, $ = (p) => {
|
|
368
|
+
if (B.value) {
|
|
369
|
+
if (p.preventDefault(), B.value = !1, a.value && a.value.releasePointerCapture)
|
|
370
370
|
try {
|
|
371
|
-
a.value.releasePointerCapture(
|
|
371
|
+
a.value.releasePointerCapture(p.pointerId);
|
|
372
372
|
} catch {
|
|
373
373
|
}
|
|
374
|
-
document.removeEventListener("pointermove",
|
|
374
|
+
document.removeEventListener("pointermove", G), document.removeEventListener("pointerup", $), document.removeEventListener("pointercancel", $);
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, H = (p) => {
|
|
377
377
|
if (a.value && a.value.getAttribute("tabindex") === "-1")
|
|
378
378
|
return;
|
|
379
|
-
const
|
|
379
|
+
const g = t.keystep !== null ? t.keystep : t.step || 0.01;
|
|
380
380
|
let A = l.value;
|
|
381
|
-
switch (
|
|
381
|
+
switch (p.key) {
|
|
382
382
|
case "ArrowLeft":
|
|
383
383
|
case "ArrowDown":
|
|
384
|
-
|
|
384
|
+
p.preventDefault(), A = Math.max(t.min, l.value - g);
|
|
385
385
|
break;
|
|
386
386
|
case "ArrowRight":
|
|
387
387
|
case "ArrowUp":
|
|
388
|
-
|
|
388
|
+
p.preventDefault(), A = Math.min(t.max, l.value + g);
|
|
389
389
|
break;
|
|
390
390
|
default:
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
l.value = A;
|
|
394
|
-
},
|
|
395
|
-
return (
|
|
396
|
-
class:
|
|
394
|
+
}, d = (p) => Math.min(1, Math.max(0, t.level * 10 - p + 1));
|
|
395
|
+
return (p, g) => (w(), T("div", {
|
|
396
|
+
class: I(b.value),
|
|
397
397
|
ref_key: "root",
|
|
398
398
|
ref: a,
|
|
399
399
|
role: "slider",
|
|
@@ -401,29 +401,29 @@ const $ = (e, t) => {
|
|
|
401
401
|
"aria-valuemax": e.max,
|
|
402
402
|
"aria-valuenow": l.value,
|
|
403
403
|
"aria-label": `${e.style} control`,
|
|
404
|
-
"aria-orientation":
|
|
404
|
+
"aria-orientation": h.value ? "horizontal" : "vertical",
|
|
405
405
|
tabindex: e.tabindex,
|
|
406
|
-
onPointerdown:
|
|
407
|
-
onKeydown:
|
|
406
|
+
onPointerdown: q,
|
|
407
|
+
onKeydown: H,
|
|
408
408
|
style: { userSelect: "none", touchAction: "none" }
|
|
409
409
|
}, [
|
|
410
|
-
|
|
411
|
-
e.showLevel ? (
|
|
412
|
-
(
|
|
413
|
-
class:
|
|
410
|
+
g[0] || (g[0] = m("div", { class: "track" }, null, -1)),
|
|
411
|
+
e.showLevel ? (w(), T("div", Ce, [
|
|
412
|
+
(w(), T(pt, null, At(10, (A) => m("div", {
|
|
413
|
+
class: I(["focus", "led" + A])
|
|
414
414
|
}, [
|
|
415
415
|
m("div", {
|
|
416
416
|
class: "on",
|
|
417
|
-
style:
|
|
417
|
+
style: Gt({ opacity: d(A) })
|
|
418
418
|
}, null, 4)
|
|
419
419
|
], 2)), 64))
|
|
420
|
-
])) :
|
|
420
|
+
])) : F("", !0),
|
|
421
421
|
m("div", {
|
|
422
|
-
class:
|
|
422
|
+
class: I(["thumb", { dragging: B.value, [e.colour]: !0, [e.style]: !0 }])
|
|
423
423
|
}, null, 2)
|
|
424
424
|
], 42, Te));
|
|
425
425
|
}
|
|
426
|
-
},
|
|
426
|
+
}, yt = /* @__PURE__ */ U(Be, [["__scopeId", "data-v-42160c3a"]]), _e = {
|
|
427
427
|
__name: "TitleText",
|
|
428
428
|
props: {
|
|
429
429
|
align: {
|
|
@@ -437,19 +437,19 @@ const $ = (e, t) => {
|
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
439
|
setup(e) {
|
|
440
|
-
|
|
441
|
-
"9d94564a":
|
|
440
|
+
at((E) => ({
|
|
441
|
+
"9d94564a": b.value,
|
|
442
442
|
"6241cf7e": l.value + "px"
|
|
443
443
|
}));
|
|
444
|
-
const t = e, a =
|
|
445
|
-
return
|
|
444
|
+
const t = e, a = Y("el"), s = Y("textEl"), { width: n, height: i } = st(a), r = k(() => Math.min(n.value, i.value)), h = k(() => n.value > i.value ? "h-text" : "v-text"), b = k(() => r.value * 3 / 4 + "px"), l = _(0), v = _(!1);
|
|
445
|
+
return Tt(() => {
|
|
446
446
|
if (!s.value || !a.value || t.overflow !== "scroll") {
|
|
447
|
-
|
|
447
|
+
v.value = !1, l.value = 0;
|
|
448
448
|
return;
|
|
449
449
|
}
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
}), (
|
|
450
|
+
const E = h.value === "h-text" ? n.value : i.value, C = h.value === "h-text" ? s.value.scrollWidth : s.value.scrollHeight, V = E - 20;
|
|
451
|
+
C > V ? (v.value = !0, l.value = C - V) : (v.value = !1, l.value = 0);
|
|
452
|
+
}), (E, C) => (w(), T("div", {
|
|
453
453
|
ref_key: "el",
|
|
454
454
|
ref: a,
|
|
455
455
|
class: "outer"
|
|
@@ -457,13 +457,13 @@ const $ = (e, t) => {
|
|
|
457
457
|
m("div", {
|
|
458
458
|
ref_key: "textEl",
|
|
459
459
|
ref: s,
|
|
460
|
-
class:
|
|
460
|
+
class: I({ [h.value]: !0, [e.align]: !0, scrolling: v.value })
|
|
461
461
|
}, [
|
|
462
|
-
|
|
462
|
+
ut(E.$slots, "default", {}, void 0, !0)
|
|
463
463
|
], 2)
|
|
464
464
|
], 512));
|
|
465
465
|
}
|
|
466
|
-
},
|
|
466
|
+
}, Qt = /* @__PURE__ */ U(_e, [["__scopeId", "data-v-8efcf3aa"]]), Le = { class: "s-label" }, Ae = { class: "m-label" }, Ie = {
|
|
467
467
|
__name: "TriState",
|
|
468
468
|
props: {
|
|
469
469
|
mute: { default: !1 },
|
|
@@ -473,33 +473,33 @@ const $ = (e, t) => {
|
|
|
473
473
|
},
|
|
474
474
|
emits: ["update:mute", "update:solo"],
|
|
475
475
|
setup(e) {
|
|
476
|
-
const t =
|
|
477
|
-
function
|
|
476
|
+
const t = tt(e, "mute"), a = tt(e, "solo"), s = Y("outer"), { width: n, height: i } = st(s), r = k(() => n.value > i.value * 1.9);
|
|
477
|
+
function h() {
|
|
478
478
|
t.value = !t.value, a.value = !1;
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function b() {
|
|
481
481
|
a.value = !a.value, t.value = !1;
|
|
482
482
|
}
|
|
483
|
-
return (l,
|
|
483
|
+
return (l, v) => (w(), T("div", {
|
|
484
484
|
class: "outer",
|
|
485
485
|
ref_key: "outer",
|
|
486
486
|
ref: s
|
|
487
487
|
}, [
|
|
488
488
|
m("div", {
|
|
489
489
|
title: "Solo",
|
|
490
|
-
class:
|
|
491
|
-
onClick:
|
|
490
|
+
class: I(["solo", { on: a.value }]),
|
|
491
|
+
onClick: b
|
|
492
492
|
}, null, 2),
|
|
493
|
-
m("div",
|
|
493
|
+
m("div", Le, K(r.value ? "SOLO" : "S"), 1),
|
|
494
494
|
m("div", {
|
|
495
495
|
title: "Mute",
|
|
496
|
-
class:
|
|
497
|
-
onClick:
|
|
496
|
+
class: I(["mute", { on: t.value }]),
|
|
497
|
+
onClick: h
|
|
498
498
|
}, null, 2),
|
|
499
499
|
m("div", Ae, K(r.value ? "MUTE" : "M"), 1)
|
|
500
500
|
], 512));
|
|
501
501
|
}
|
|
502
|
-
}, Ne = /* @__PURE__ */
|
|
502
|
+
}, Ne = /* @__PURE__ */ U(Ie, [["__scopeId", "data-v-7e3c1495"]]), _t = {
|
|
503
503
|
// Enable development UI features (animations, random data, etc.)
|
|
504
504
|
enabled: !1,
|
|
505
505
|
// Specific feature flags
|
|
@@ -511,7 +511,7 @@ const $ = (e, t) => {
|
|
|
511
511
|
// Enable other debug/dev features as needed
|
|
512
512
|
debugMode: !1
|
|
513
513
|
}
|
|
514
|
-
},
|
|
514
|
+
}, Oa = () => _t.enabled, Xt = (e) => _t.enabled && _t.features[e], nt = Pt("audioState", {
|
|
515
515
|
state: () => ({
|
|
516
516
|
// Playback state
|
|
517
517
|
isPlaying: !1,
|
|
@@ -615,11 +615,13 @@ const $ = (e, t) => {
|
|
|
615
615
|
this.isLoaded = e;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
}),
|
|
618
|
+
}), et = Pt("musicData", {
|
|
619
619
|
state: () => ({
|
|
620
620
|
// Musical structure
|
|
621
621
|
beats: [],
|
|
622
622
|
practiceMarks: {},
|
|
623
|
+
customPracticeMarks: {},
|
|
624
|
+
// User-added marks { letter: barNumber }
|
|
623
625
|
parts: [],
|
|
624
626
|
title: "",
|
|
625
627
|
// Timing calculations
|
|
@@ -649,6 +651,32 @@ const $ = (e, t) => {
|
|
|
649
651
|
return e.beats.forEach((s) => {
|
|
650
652
|
s.bar === t && a.add(s.repeat);
|
|
651
653
|
}), a.size;
|
|
654
|
+
},
|
|
655
|
+
// All marks (predefined + custom) as object
|
|
656
|
+
allPracticeMarks: (e) => ({ ...e.practiceMarks, ...e.customPracticeMarks }),
|
|
657
|
+
// All marks sorted by bar number (returns array of letters)
|
|
658
|
+
allPracticeMarksSorted: (e) => {
|
|
659
|
+
const t = { ...e.practiceMarks, ...e.customPracticeMarks };
|
|
660
|
+
return Object.entries(t).sort(([, a], [, s]) => a - s).map(([a]) => a);
|
|
661
|
+
},
|
|
662
|
+
// Check if a bar has any mark (predefined or custom)
|
|
663
|
+
barHasMark: (e) => (t) => {
|
|
664
|
+
const a = { ...e.practiceMarks, ...e.customPracticeMarks };
|
|
665
|
+
return Object.values(a).includes(t);
|
|
666
|
+
},
|
|
667
|
+
// Check if a letter is a custom mark
|
|
668
|
+
isCustomMark: (e) => (t) => t in e.customPracticeMarks,
|
|
669
|
+
// Get next available letter (A-Z)
|
|
670
|
+
nextAvailableLetter: (e) => {
|
|
671
|
+
const t = /* @__PURE__ */ new Set([
|
|
672
|
+
...Object.keys(e.practiceMarks),
|
|
673
|
+
...Object.keys(e.customPracticeMarks)
|
|
674
|
+
]);
|
|
675
|
+
for (let a = 0; a < 26; a++) {
|
|
676
|
+
const s = String.fromCharCode(65 + a);
|
|
677
|
+
if (!t.has(s)) return s;
|
|
678
|
+
}
|
|
679
|
+
return null;
|
|
652
680
|
}
|
|
653
681
|
},
|
|
654
682
|
actions: {
|
|
@@ -658,7 +686,7 @@ const $ = (e, t) => {
|
|
|
658
686
|
...t,
|
|
659
687
|
solo: t.solo || !1,
|
|
660
688
|
mute: t.mute || !1
|
|
661
|
-
})), this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature();
|
|
689
|
+
})), this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature(), this.loadCustomMarksFromStorage();
|
|
662
690
|
},
|
|
663
691
|
// Calculate total duration from beats
|
|
664
692
|
calculateDuration() {
|
|
@@ -679,6 +707,37 @@ const $ = (e, t) => {
|
|
|
679
707
|
removePracticeMark(e) {
|
|
680
708
|
delete this.practiceMarks[e];
|
|
681
709
|
},
|
|
710
|
+
// Add custom practice mark at bar number
|
|
711
|
+
addCustomMark(e) {
|
|
712
|
+
const t = this.nextAvailableLetter;
|
|
713
|
+
return t && !this.barHasMark(e) ? (this.customPracticeMarks[t] = e, this.saveCustomMarksToStorage(), t) : null;
|
|
714
|
+
},
|
|
715
|
+
// Remove custom practice mark
|
|
716
|
+
removeCustomMark(e) {
|
|
717
|
+
e in this.customPracticeMarks && (delete this.customPracticeMarks[e], this.saveCustomMarksToStorage());
|
|
718
|
+
},
|
|
719
|
+
// Get localStorage key for current song
|
|
720
|
+
getStorageKey() {
|
|
721
|
+
return `customPracticeMarks_${this.title}`;
|
|
722
|
+
},
|
|
723
|
+
// Save custom marks to localStorage
|
|
724
|
+
saveCustomMarksToStorage() {
|
|
725
|
+
this.title && localStorage.setItem(this.getStorageKey(), JSON.stringify(this.customPracticeMarks));
|
|
726
|
+
},
|
|
727
|
+
// Load custom marks from localStorage
|
|
728
|
+
loadCustomMarksFromStorage() {
|
|
729
|
+
if (this.title) {
|
|
730
|
+
const e = localStorage.getItem(this.getStorageKey());
|
|
731
|
+
if (e)
|
|
732
|
+
try {
|
|
733
|
+
this.customPracticeMarks = JSON.parse(e);
|
|
734
|
+
} catch {
|
|
735
|
+
this.customPracticeMarks = {};
|
|
736
|
+
}
|
|
737
|
+
else
|
|
738
|
+
this.customPracticeMarks = {};
|
|
739
|
+
}
|
|
740
|
+
},
|
|
682
741
|
// Update beats data (for when MIDI parser provides new beat information)
|
|
683
742
|
updateBeats(e) {
|
|
684
743
|
console.log("Updating beats in music data store"), this.beats = e, this.calculateDuration(), this.calculateMaxBar(), this.extractTimeSignature();
|
|
@@ -702,10 +761,10 @@ const $ = (e, t) => {
|
|
|
702
761
|
},
|
|
703
762
|
// Clear all music data (reset to initial state)
|
|
704
763
|
clear() {
|
|
705
|
-
this.beats = [], this.practiceMarks = {}, this.parts = [], this.title = "", this.totalDuration = 0, this.maxBar = 0, this.timeSignature = 4, this.baseTempo = 80;
|
|
764
|
+
this.beats = [], this.practiceMarks = {}, this.customPracticeMarks = {}, this.parts = [], this.title = "", this.totalDuration = 0, this.maxBar = 0, this.timeSignature = 4, this.baseTempo = 80;
|
|
706
765
|
}
|
|
707
766
|
}
|
|
708
|
-
}),
|
|
767
|
+
}), Nt = Pt("playbackState", {
|
|
709
768
|
state: () => ({
|
|
710
769
|
// Transport state
|
|
711
770
|
transportState: "stopped",
|
|
@@ -823,10 +882,10 @@ const $ = (e, t) => {
|
|
|
823
882
|
},
|
|
824
883
|
// Navigation points management
|
|
825
884
|
buildFixedNavigationPoints() {
|
|
826
|
-
const e = [], t =
|
|
885
|
+
const e = [], t = et();
|
|
827
886
|
e.push({ time: 0, bar: 1, repeat: 1, label: "Start" });
|
|
828
887
|
const a = t.beats.filter((s) => s.beat === 1);
|
|
829
|
-
for (const [s, n] of Object.entries(t.
|
|
888
|
+
for (const [s, n] of Object.entries(t.allPracticeMarks))
|
|
830
889
|
a.filter((i) => i.bar === n).forEach((i) => {
|
|
831
890
|
e.push({
|
|
832
891
|
time: i.time,
|
|
@@ -843,7 +902,7 @@ const $ = (e, t) => {
|
|
|
843
902
|
},
|
|
844
903
|
rebuildNavigationPoints() {
|
|
845
904
|
setTimeout(() => {
|
|
846
|
-
const e =
|
|
905
|
+
const e = et(), t = [...this.fixedNavigationPoints];
|
|
847
906
|
this.lastPlayStartBar !== null && e.beats.filter((n) => n.beat === 1 && n.bar === this.lastPlayStartBar).forEach((n) => {
|
|
848
907
|
t.push({
|
|
849
908
|
time: n.time,
|
|
@@ -870,7 +929,7 @@ const $ = (e, t) => {
|
|
|
870
929
|
}
|
|
871
930
|
}
|
|
872
931
|
});
|
|
873
|
-
function
|
|
932
|
+
function Jt(e) {
|
|
874
933
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
|
|
875
934
|
var s = e.get(t);
|
|
876
935
|
s ? s.push(a) : e.set(t, [a]);
|
|
@@ -886,7 +945,7 @@ function jt(e) {
|
|
|
886
945
|
});
|
|
887
946
|
} };
|
|
888
947
|
}
|
|
889
|
-
const
|
|
948
|
+
const zt = ["spessasynth", "lightweight"];
|
|
890
949
|
class De {
|
|
891
950
|
constructor() {
|
|
892
951
|
this._engineType = "spessasynth";
|
|
@@ -897,9 +956,9 @@ class De {
|
|
|
897
956
|
* @throws {Error} If engine type is invalid
|
|
898
957
|
*/
|
|
899
958
|
setEngineType(t) {
|
|
900
|
-
if (!
|
|
959
|
+
if (!zt.includes(t))
|
|
901
960
|
throw new Error(
|
|
902
|
-
`Invalid audio engine type: "${t}". Must be one of: ${
|
|
961
|
+
`Invalid audio engine type: "${t}". Must be one of: ${zt.join(", ")}`
|
|
903
962
|
);
|
|
904
963
|
this._engineType = t;
|
|
905
964
|
}
|
|
@@ -920,7 +979,7 @@ class De {
|
|
|
920
979
|
const Ve = new De();
|
|
921
980
|
class ze {
|
|
922
981
|
constructor() {
|
|
923
|
-
this.eventBus =
|
|
982
|
+
this.eventBus = Jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.metronomeVolume = 0.7, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0, this.audioContext = null, this.audioEngine = null, this.playbackManager = null, this.musicData = null, this.beats = [], this.practiceMarks = {}, this.songDuration = 0, this.maxBar = 0, this.masterGain = null, this.metronomeGain = null, this.partGainNodes = /* @__PURE__ */ new Map(), this.partAnalyserNodes = /* @__PURE__ */ new Map(), this.isInitialized = !1;
|
|
924
983
|
}
|
|
925
984
|
// Sanitize part names to ensure consistent lookup
|
|
926
985
|
// Remove non-printable characters, convert to lowercase, trim whitespace
|
|
@@ -945,8 +1004,8 @@ class ze {
|
|
|
945
1004
|
try {
|
|
946
1005
|
await this.audioEngine.initialize(r), console.log(`Loaded soundfont: ${r}`), n = !0;
|
|
947
1006
|
break;
|
|
948
|
-
} catch (
|
|
949
|
-
console.warn(`Failed to load soundfont ${r}:`,
|
|
1007
|
+
} catch (h) {
|
|
1008
|
+
console.warn(`Failed to load soundfont ${r}:`, h.message), i = h;
|
|
950
1009
|
}
|
|
951
1010
|
if (!n) {
|
|
952
1011
|
const r = "No soundfont could be loaded";
|
|
@@ -1250,12 +1309,12 @@ class ze {
|
|
|
1250
1309
|
const n = s.frequencyBinCount, i = new Uint8Array(n);
|
|
1251
1310
|
s.getByteFrequencyData(i);
|
|
1252
1311
|
let r = 0;
|
|
1253
|
-
for (let
|
|
1254
|
-
const l = i[
|
|
1312
|
+
for (let b = 0; b < n; b++) {
|
|
1313
|
+
const l = i[b] / 255;
|
|
1255
1314
|
r += l * l;
|
|
1256
1315
|
}
|
|
1257
|
-
const
|
|
1258
|
-
return Math.min(1, Math.pow(
|
|
1316
|
+
const h = Math.sqrt(r / n);
|
|
1317
|
+
return Math.min(1, Math.pow(h * 2, 0.7));
|
|
1259
1318
|
} catch (n) {
|
|
1260
1319
|
return console.warn(`Failed to get level for part ${t}:`, n), 0;
|
|
1261
1320
|
}
|
|
@@ -1341,150 +1400,154 @@ class ze {
|
|
|
1341
1400
|
}
|
|
1342
1401
|
}
|
|
1343
1402
|
const c = new ze();
|
|
1344
|
-
function
|
|
1345
|
-
const t =
|
|
1403
|
+
function dt(e = {}) {
|
|
1404
|
+
const t = nt(), a = et(), s = Nt(), n = {
|
|
1346
1405
|
soundfontUrl: e.soundfontUrl
|
|
1347
1406
|
}, i = ({ currentTime: o }) => {
|
|
1348
1407
|
t.setCurrentTime(o);
|
|
1349
1408
|
}, r = ({ isPlaying: o }) => {
|
|
1350
1409
|
t.setPlaybackState(o), s.setTransportState(o ? "playing" : "stopped"), !o && t.isLeadInActive && (t.setLeadInActive(!1), c.emitTimeAndBarUpdates(t.currentTime));
|
|
1351
|
-
},
|
|
1410
|
+
}, h = (o) => {
|
|
1352
1411
|
o && (t.isLeadInActive ? o.isLeadIn && o.beat !== void 0 && t.setCurrentBar(null, o.beat, null) : (t.setCurrentBar(o.bar, o.beat, o.repeat), s.updateLastBarPosition(o.bar)));
|
|
1353
|
-
},
|
|
1412
|
+
}, b = ({ speed: o }) => {
|
|
1354
1413
|
t.setPlaybackSpeed(o);
|
|
1355
1414
|
}, l = ({ volume: o }) => {
|
|
1356
1415
|
t.setMasterVolume(o);
|
|
1357
|
-
},
|
|
1358
|
-
t.setPartVolume(o,
|
|
1359
|
-
},
|
|
1360
|
-
t.setPartMuted(o,
|
|
1361
|
-
},
|
|
1362
|
-
t.setPartSolo(o,
|
|
1363
|
-
},
|
|
1416
|
+
}, v = ({ partName: o, volume: M }) => {
|
|
1417
|
+
t.setPartVolume(o, M);
|
|
1418
|
+
}, E = ({ partName: o, muted: M }) => {
|
|
1419
|
+
t.setPartMuted(o, M);
|
|
1420
|
+
}, C = ({ partName: o, solo: M }) => {
|
|
1421
|
+
t.setPartSolo(o, M);
|
|
1422
|
+
}, V = ({ bars: o }) => {
|
|
1364
1423
|
t.setLeadInActive(!0, o);
|
|
1365
|
-
},
|
|
1424
|
+
}, f = () => {
|
|
1366
1425
|
t.setLeadInActive(!1);
|
|
1367
|
-
},
|
|
1426
|
+
}, P = () => {
|
|
1368
1427
|
t.setStartingNotesActive(!0);
|
|
1369
|
-
},
|
|
1428
|
+
}, S = () => {
|
|
1370
1429
|
t.setStartingNotesActive(!1);
|
|
1371
|
-
},
|
|
1430
|
+
}, B = ({ mark: o }) => {
|
|
1372
1431
|
s.updateLastPracticeMarkUsed(o);
|
|
1373
|
-
},
|
|
1432
|
+
}, N = ({ parts: o }) => {
|
|
1374
1433
|
t.initializeParts(o), a.setParts(o);
|
|
1375
|
-
},
|
|
1376
|
-
t.setPlaybackState(!1), s.setTransportState("stopped"), console.log(`Song ended at time: ${o}`);
|
|
1377
|
-
},
|
|
1434
|
+
}, z = ({ finalTime: o }) => {
|
|
1435
|
+
t.setPlaybackState(!1), s.setTransportState("stopped"), s.setNavigationAction("ended"), console.log(`Song ended at time: ${o}`);
|
|
1436
|
+
}, q = ({ duration: o }) => {
|
|
1378
1437
|
console.log("Updating total duration in store to:", o), a.setTotalDuration(o);
|
|
1379
|
-
},
|
|
1380
|
-
console.log(`Updating music data store with ${o.length} beats and ${Object.keys(
|
|
1381
|
-
},
|
|
1382
|
-
c.on("timeChanged", i), c.on("playbackStateChanged", r), c.on("barChanged",
|
|
1383
|
-
},
|
|
1384
|
-
c.off("timeChanged", i), c.off("playbackStateChanged", r), c.off("barChanged",
|
|
1438
|
+
}, G = ({ beats: o, practiceMarks: M, maxBar: j }) => {
|
|
1439
|
+
console.log(`Updating music data store with ${o.length} beats and ${Object.keys(M).length} practice marks`), a.updateBeats(o), a.practiceMarks = M, a.maxBar = j;
|
|
1440
|
+
}, $ = () => {
|
|
1441
|
+
c.on("timeChanged", i), c.on("playbackStateChanged", r), c.on("barChanged", h), c.on("speedChanged", b), c.on("masterVolumeChanged", l), c.on("partVolumeChanged", v), c.on("partMutedChanged", E), c.on("partSoloChanged", C), c.on("leadInStarted", V), c.on("leadInCompleted", f), c.on("startingNotesStarted", P), c.on("startingNotesCompleted", S), c.on("practiceMarkChanged", B), c.on("initialized", N), c.on("songEnded", z), c.on("durationUpdated", q), c.on("musicDataExtracted", G);
|
|
1442
|
+
}, H = () => {
|
|
1443
|
+
c.off("timeChanged", i), c.off("playbackStateChanged", r), c.off("barChanged", h), c.off("speedChanged", b), c.off("masterVolumeChanged", l), c.off("partVolumeChanged", v), c.off("partMutedChanged", E), c.off("partSoloChanged", C), c.off("leadInStarted", V), c.off("leadInCompleted", f), c.off("startingNotesStarted", P), c.off("startingNotesCompleted", S), c.off("practiceMarkChanged", B), c.off("initialized", N), c.off("songEnded", z), c.off("durationUpdated", q), c.off("musicDataExtracted", G);
|
|
1385
1444
|
};
|
|
1386
1445
|
(() => {
|
|
1387
|
-
|
|
1446
|
+
Tt(() => {
|
|
1388
1447
|
const o = t.masterVolume;
|
|
1389
1448
|
try {
|
|
1390
1449
|
c.getMasterVolume() !== o && c.setMasterVolume(o);
|
|
1391
|
-
} catch (
|
|
1392
|
-
console.warn("Master volume sync skipped during initialization:",
|
|
1450
|
+
} catch (M) {
|
|
1451
|
+
console.warn("Master volume sync skipped during initialization:", M.message);
|
|
1393
1452
|
}
|
|
1394
|
-
}),
|
|
1453
|
+
}), Tt(() => {
|
|
1395
1454
|
const o = t.metronomeVolume;
|
|
1396
1455
|
try {
|
|
1397
1456
|
c.getMetronomeVolume() !== o && c.setMetronomeVolume(o);
|
|
1398
|
-
} catch (
|
|
1399
|
-
console.warn("Metronome volume sync skipped during initialization:",
|
|
1457
|
+
} catch (M) {
|
|
1458
|
+
console.warn("Metronome volume sync skipped during initialization:", M.message);
|
|
1400
1459
|
}
|
|
1401
1460
|
});
|
|
1402
1461
|
})();
|
|
1403
|
-
const
|
|
1462
|
+
const p = async (o) => {
|
|
1404
1463
|
try {
|
|
1405
|
-
if (t.setLoaded(!1),
|
|
1406
|
-
const
|
|
1407
|
-
t.setCurrentBar(
|
|
1464
|
+
if (t.setLoaded(!1), $(), a.loadMusicData(o), await c.initialize(o, n), s.buildFixedNavigationPoints(), !o.midiData && o.beats && o.beats.length > 0) {
|
|
1465
|
+
const M = o.beats[0];
|
|
1466
|
+
t.setCurrentBar(M.bar, M.beat, M.repeat), c.setTime(M.time);
|
|
1408
1467
|
}
|
|
1409
1468
|
c.updateToggleStates(t.metronomeEnabled, t.leadInEnabled), t.setLoaded(!0);
|
|
1410
|
-
} catch (
|
|
1411
|
-
throw console.error("Failed to initialize audio engine:",
|
|
1469
|
+
} catch (M) {
|
|
1470
|
+
throw console.error("Failed to initialize audio engine:", M), t.setLoaded(!1), M;
|
|
1412
1471
|
}
|
|
1413
|
-
},
|
|
1414
|
-
const o = t.currentBar,
|
|
1415
|
-
s.setLastPlayStart(o,
|
|
1472
|
+
}, g = () => {
|
|
1473
|
+
const o = t.currentBar, M = t.currentRepeat, j = t.currentTime;
|
|
1474
|
+
s.setLastPlayStart(o, M, j), s.setNavigationAction("play"), c.play();
|
|
1416
1475
|
}, A = () => {
|
|
1417
1476
|
s.setNavigationAction("pause"), c.stop();
|
|
1418
|
-
},
|
|
1477
|
+
}, lt = () => {
|
|
1419
1478
|
s.setNavigationAction("pause"), c.pause();
|
|
1420
1479
|
}, Q = (o) => {
|
|
1421
1480
|
s.setNavigationAction("manual"), c.setTime(o);
|
|
1422
|
-
},
|
|
1423
|
-
s.setNavigationAction("manual"), c.setBar(o,
|
|
1424
|
-
},
|
|
1425
|
-
|
|
1426
|
-
|
|
1481
|
+
}, W = (o, M = 0) => {
|
|
1482
|
+
s.setNavigationAction("manual"), c.setBar(o, M);
|
|
1483
|
+
}, X = (o) => {
|
|
1484
|
+
if (a.isCustomMark(o)) {
|
|
1485
|
+
const M = a.customPracticeMarks[o];
|
|
1486
|
+
M !== void 0 && c.setBar(M);
|
|
1487
|
+
} else
|
|
1488
|
+
c.goToPracticeMark(o);
|
|
1489
|
+
}, J = (o) => {
|
|
1427
1490
|
c.setPlaybackSpeed(o);
|
|
1428
|
-
},
|
|
1491
|
+
}, ct = (o) => {
|
|
1429
1492
|
c.setMasterVolume(o);
|
|
1430
|
-
},
|
|
1431
|
-
c.setPartVolume(o,
|
|
1432
|
-
},
|
|
1433
|
-
c.setPartMuted(o,
|
|
1434
|
-
},
|
|
1435
|
-
c.setPartSolo(o,
|
|
1436
|
-
},
|
|
1493
|
+
}, ht = (o, M) => {
|
|
1494
|
+
c.setPartVolume(o, M);
|
|
1495
|
+
}, wt = (o, M) => {
|
|
1496
|
+
c.setPartMuted(o, M);
|
|
1497
|
+
}, mt = (o, M) => {
|
|
1498
|
+
c.setPartSolo(o, M);
|
|
1499
|
+
}, ft = (o = 1) => {
|
|
1437
1500
|
c.playLeadIn(o);
|
|
1438
|
-
},
|
|
1501
|
+
}, Et = () => {
|
|
1439
1502
|
c.playStartingNotes();
|
|
1440
|
-
},
|
|
1441
|
-
|
|
1442
|
-
},
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1445
|
-
},
|
|
1503
|
+
}, u = (o, M = !0, j = 0) => {
|
|
1504
|
+
M && s.leadInEnabled ? (W(o, j), ft(s.leadInBars)) : (W(o, j), g());
|
|
1505
|
+
}, y = (o, M = !0) => {
|
|
1506
|
+
const j = a.getBarForMark(o);
|
|
1507
|
+
j && u(j, M);
|
|
1508
|
+
}, x = () => {
|
|
1446
1509
|
const o = !t.metronomeEnabled;
|
|
1447
1510
|
return t.setMetronomeEnabled(o), c.setMetronomeEnabled(o), o;
|
|
1448
|
-
},
|
|
1511
|
+
}, O = () => {
|
|
1449
1512
|
const o = !t.leadInEnabled;
|
|
1450
1513
|
return t.setLeadInEnabled(o), c.updateToggleStates(t.metronomeEnabled, o), o;
|
|
1451
|
-
},
|
|
1514
|
+
}, it = () => {
|
|
1452
1515
|
c.stop(), t.setLoaded(!1), a.clear(), console.log("Audio mixer reset - ready for new score");
|
|
1453
1516
|
};
|
|
1454
|
-
return
|
|
1455
|
-
|
|
1517
|
+
return kt(() => {
|
|
1518
|
+
H();
|
|
1456
1519
|
}), {
|
|
1457
1520
|
// Initialization
|
|
1458
|
-
initialize:
|
|
1459
|
-
reset:
|
|
1521
|
+
initialize: p,
|
|
1522
|
+
reset: it,
|
|
1460
1523
|
// Transport controls
|
|
1461
|
-
play:
|
|
1524
|
+
play: g,
|
|
1462
1525
|
stop: A,
|
|
1463
|
-
pause:
|
|
1526
|
+
pause: lt,
|
|
1464
1527
|
// Time controls
|
|
1465
1528
|
setTime: Q,
|
|
1466
|
-
setBar:
|
|
1529
|
+
setBar: W,
|
|
1467
1530
|
// Navigation
|
|
1468
|
-
goToPracticeMark:
|
|
1469
|
-
setPlaybackSpeed:
|
|
1531
|
+
goToPracticeMark: X,
|
|
1532
|
+
setPlaybackSpeed: J,
|
|
1470
1533
|
// Volume controls
|
|
1471
|
-
setMasterVolume:
|
|
1472
|
-
setPartVolume:
|
|
1473
|
-
setPartMuted:
|
|
1474
|
-
setPartSolo:
|
|
1534
|
+
setMasterVolume: ct,
|
|
1535
|
+
setPartVolume: ht,
|
|
1536
|
+
setPartMuted: wt,
|
|
1537
|
+
setPartSolo: mt,
|
|
1475
1538
|
getPartLevel: (o) => c.getPartLevel(o),
|
|
1476
1539
|
// Special features
|
|
1477
|
-
playLeadIn:
|
|
1478
|
-
playStartingNotes:
|
|
1540
|
+
playLeadIn: ft,
|
|
1541
|
+
playStartingNotes: Et,
|
|
1479
1542
|
// Feature toggles
|
|
1480
|
-
toggleMetronome:
|
|
1481
|
-
toggleLeadIn:
|
|
1543
|
+
toggleMetronome: x,
|
|
1544
|
+
toggleLeadIn: O,
|
|
1482
1545
|
setMetronomeEnabled: (o) => {
|
|
1483
1546
|
t.setMetronomeEnabled(o), c.setMetronomeEnabled(o);
|
|
1484
1547
|
},
|
|
1485
1548
|
// Complex operations
|
|
1486
|
-
playFromBar:
|
|
1487
|
-
playFromMark:
|
|
1549
|
+
playFromBar: u,
|
|
1550
|
+
playFromMark: y,
|
|
1488
1551
|
// Access to stores for components
|
|
1489
1552
|
audioState: t,
|
|
1490
1553
|
musicData: a,
|
|
@@ -1493,9 +1556,9 @@ function ot(e = {}) {
|
|
|
1493
1556
|
audioEngine: c
|
|
1494
1557
|
};
|
|
1495
1558
|
}
|
|
1496
|
-
const
|
|
1559
|
+
const Oe = ["aria-label"], Re = {
|
|
1497
1560
|
__name: "PartControl",
|
|
1498
|
-
props: /* @__PURE__ */
|
|
1561
|
+
props: /* @__PURE__ */ Lt({
|
|
1499
1562
|
name: {
|
|
1500
1563
|
type: String,
|
|
1501
1564
|
required: !0
|
|
@@ -1515,247 +1578,295 @@ const Re = ["aria-label"], Oe = {
|
|
|
1515
1578
|
}),
|
|
1516
1579
|
emits: ["update:volume", "update:mute", "update:solo"],
|
|
1517
1580
|
setup(e) {
|
|
1518
|
-
|
|
1581
|
+
at((f) => ({
|
|
1519
1582
|
"03f87250": l.value
|
|
1520
1583
|
}));
|
|
1521
1584
|
const t = e;
|
|
1522
|
-
|
|
1523
|
-
const a =
|
|
1524
|
-
R(s, (
|
|
1525
|
-
a.setPartVolume(t.name,
|
|
1526
|
-
}), R(n, (
|
|
1527
|
-
a.setPartMuted(t.name,
|
|
1528
|
-
}), R(i, (
|
|
1529
|
-
a.setPartSolo(t.name,
|
|
1585
|
+
nt();
|
|
1586
|
+
const a = dt(), s = tt(e, "volume"), n = tt(e, "mute"), i = tt(e, "solo");
|
|
1587
|
+
R(s, (f) => {
|
|
1588
|
+
a.setPartVolume(t.name, f);
|
|
1589
|
+
}), R(n, (f) => {
|
|
1590
|
+
a.setPartMuted(t.name, f), f && (i.value = !1);
|
|
1591
|
+
}), R(i, (f) => {
|
|
1592
|
+
a.setPartSolo(t.name, f), f && (n.value = !1);
|
|
1530
1593
|
});
|
|
1531
|
-
const r =
|
|
1532
|
-
() =>
|
|
1594
|
+
const r = Y("el"), { width: h, height: b } = st(r), l = k(() => Math.min(h.value, b.value) + "px"), v = k(
|
|
1595
|
+
() => h.value > b.value ? "mobile" : h.value < 60 ? "tablet" : "desktop"
|
|
1533
1596
|
);
|
|
1534
|
-
let
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1537
|
-
|
|
1597
|
+
let E = null;
|
|
1598
|
+
const C = _(0);
|
|
1599
|
+
Mt(() => {
|
|
1600
|
+
E = setInterval(() => {
|
|
1538
1601
|
if (n.value)
|
|
1539
|
-
|
|
1602
|
+
C.value = 0;
|
|
1540
1603
|
else
|
|
1541
1604
|
try {
|
|
1542
|
-
|
|
1605
|
+
C.value = a.getPartLevel(t.name);
|
|
1543
1606
|
} catch {
|
|
1544
|
-
|
|
1607
|
+
Xt("randomLevelIndicators") ? C.value = Math.random() * s.value : C.value = 0;
|
|
1545
1608
|
}
|
|
1546
1609
|
}, 16);
|
|
1547
|
-
}),
|
|
1548
|
-
|
|
1610
|
+
}), kt(() => {
|
|
1611
|
+
E && (clearInterval(E), E = null);
|
|
1549
1612
|
});
|
|
1550
|
-
const
|
|
1551
|
-
if (["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(
|
|
1552
|
-
|
|
1553
|
-
const
|
|
1554
|
-
s.value = Math.max(0, Math.min(1, s.value +
|
|
1555
|
-
} else
|
|
1613
|
+
const V = (f) => {
|
|
1614
|
+
if (["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"].includes(f.key)) {
|
|
1615
|
+
f.preventDefault(), f.stopPropagation();
|
|
1616
|
+
const P = f.key === "ArrowUp" || f.key === "ArrowRight" ? 0.1 : -0.1;
|
|
1617
|
+
s.value = Math.max(0, Math.min(1, s.value + P));
|
|
1618
|
+
} else f.key === "m" && !f.shiftKey ? (f.preventDefault(), f.stopPropagation(), n.value = !n.value) : f.key === "s" && !f.shiftKey && (f.preventDefault(), f.stopPropagation(), i.value = !i.value);
|
|
1556
1619
|
};
|
|
1557
|
-
return (
|
|
1620
|
+
return (f, P) => (w(), T("div", {
|
|
1558
1621
|
ref_key: "el",
|
|
1559
1622
|
ref: r,
|
|
1560
|
-
class:
|
|
1623
|
+
class: I([v.value, "part"]),
|
|
1561
1624
|
tabindex: "0",
|
|
1562
1625
|
role: "group",
|
|
1563
1626
|
"aria-label": `${e.name} part controls`,
|
|
1564
|
-
onKeydown:
|
|
1627
|
+
onKeydown: V
|
|
1565
1628
|
}, [
|
|
1566
|
-
|
|
1567
|
-
|
|
1629
|
+
P[3] || (P[3] = m("div", { class: "focus" }, null, -1)),
|
|
1630
|
+
D(Ne, {
|
|
1568
1631
|
class: "tri",
|
|
1569
1632
|
mute: n.value,
|
|
1570
|
-
"onUpdate:mute":
|
|
1633
|
+
"onUpdate:mute": P[0] || (P[0] = (S) => n.value = S),
|
|
1571
1634
|
solo: i.value,
|
|
1572
|
-
"onUpdate:solo":
|
|
1635
|
+
"onUpdate:solo": P[1] || (P[1] = (S) => i.value = S),
|
|
1573
1636
|
tabindex: "-1"
|
|
1574
1637
|
}, null, 8, ["mute", "solo"]),
|
|
1575
|
-
|
|
1638
|
+
D(Qt, {
|
|
1576
1639
|
align: "left",
|
|
1577
1640
|
class: "name"
|
|
1578
1641
|
}, {
|
|
1579
|
-
default:
|
|
1580
|
-
|
|
1642
|
+
default: Z(() => [
|
|
1643
|
+
St(K(e.name), 1)
|
|
1581
1644
|
]),
|
|
1582
1645
|
_: 1
|
|
1583
1646
|
}),
|
|
1584
|
-
|
|
1585
|
-
level:
|
|
1647
|
+
D(yt, {
|
|
1648
|
+
level: C.value,
|
|
1586
1649
|
"show-level": !0,
|
|
1587
1650
|
class: "vol",
|
|
1588
1651
|
value: s.value,
|
|
1589
|
-
"onUpdate:value":
|
|
1652
|
+
"onUpdate:value": P[2] || (P[2] = (S) => s.value = S),
|
|
1590
1653
|
step: 0.01,
|
|
1591
1654
|
tabindex: "-1"
|
|
1592
1655
|
}, null, 8, ["level", "value"])
|
|
1593
|
-
], 42,
|
|
1656
|
+
], 42, Oe));
|
|
1594
1657
|
}
|
|
1595
|
-
}, $e = /* @__PURE__ */
|
|
1658
|
+
}, $e = /* @__PURE__ */ U(Re, [["__scopeId", "data-v-67bb489c"]]), Fe = { class: "mark" }, Ue = { class: "rpt" }, Ke = { class: "beat-ind" }, Ge = { class: "beat" }, qe = {
|
|
1596
1659
|
key: 1,
|
|
1597
1660
|
class: "mark-grid-container"
|
|
1598
1661
|
}, He = { class: "mark-grid" }, We = ["onClick"], je = {
|
|
1599
1662
|
__name: "BarInput",
|
|
1600
1663
|
setup(e) {
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
"
|
|
1664
|
+
at((u) => ({
|
|
1665
|
+
aa78c0c8: q.value,
|
|
1666
|
+
"286643ea": G.value
|
|
1604
1667
|
}));
|
|
1605
|
-
const t =
|
|
1606
|
-
let
|
|
1668
|
+
const t = Y("el"), a = Y("rpt"), { width: s, height: n } = st(t), i = et(), r = nt(), h = Nt(), b = dt(), l = _("1"), v = _("A"), E = _(0), C = _(2), V = _(!1), f = _(!1), P = _(!1), S = _(!1), B = _(/* @__PURE__ */ new Set()), N = _(!0);
|
|
1669
|
+
let z = null;
|
|
1607
1670
|
R(() => {
|
|
1608
|
-
var
|
|
1609
|
-
return ((
|
|
1610
|
-
}, (
|
|
1611
|
-
console.log(
|
|
1612
|
-
}), R(() => r.currentBar, (
|
|
1613
|
-
|
|
1614
|
-
}), R(
|
|
1615
|
-
|
|
1616
|
-
}), R(() => r.currentBar, (
|
|
1617
|
-
|
|
1671
|
+
var u;
|
|
1672
|
+
return ((u = i.beats) == null ? void 0 : u.length) > 0;
|
|
1673
|
+
}, (u) => {
|
|
1674
|
+
console.log(u), u && !V.value && (l.value = r.currentBar.toString(), E.value = r.currentRepeat, C.value = i.getRepeatCountForBar(r.currentBar), g(r.currentBar), V.value = !0);
|
|
1675
|
+
}), R(() => r.currentBar, (u) => {
|
|
1676
|
+
C.value = i.getRepeatCountForBar(u);
|
|
1677
|
+
}), R(l, () => {
|
|
1678
|
+
l.value = l.value.replace(/\D/g, ""), l.value.length > 3 && (l.value = l.value.slice(0, 3));
|
|
1679
|
+
}), R(() => r.currentBar, (u) => {
|
|
1680
|
+
l.value = u.toString(), g(u);
|
|
1618
1681
|
}), R(() => r.currentBeat, () => {
|
|
1619
|
-
|
|
1620
|
-
|
|
1682
|
+
N.value = !0, setTimeout(() => {
|
|
1683
|
+
N.value = !1;
|
|
1621
1684
|
}, 50);
|
|
1622
|
-
}), R(
|
|
1623
|
-
|
|
1685
|
+
}), R(f, () => {
|
|
1686
|
+
f.value && ft();
|
|
1624
1687
|
});
|
|
1625
|
-
const
|
|
1626
|
-
function
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1688
|
+
const q = k(() => Math.min(n.value / 2.25, s.value / 4.5) + "px"), G = k(() => Math.min(s.value / 15, n.value / 6.4) + "px"), $ = k(() => i.allPracticeMarksSorted), H = k(() => !i.barHasMark(r.currentBar) && i.nextAvailableLetter !== null), d = k(() => !0), p = k(() => Object.keys(i.customPracticeMarks).length > 0);
|
|
1689
|
+
function g(u) {
|
|
1690
|
+
const y = i.allPracticeMarks, x = Object.keys(y).filter((O) => y[O] <= u).sort((O, it) => y[it] - y[O]);
|
|
1691
|
+
x.length > 0 ? v.value = x[0] : v.value = "";
|
|
1629
1692
|
}
|
|
1630
|
-
function
|
|
1631
|
-
var
|
|
1632
|
-
const
|
|
1633
|
-
if (~isNaN(
|
|
1634
|
-
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1693
|
+
function A() {
|
|
1694
|
+
var y;
|
|
1695
|
+
const u = parseInt(l.value);
|
|
1696
|
+
if (~isNaN(u)) {
|
|
1697
|
+
lt(u);
|
|
1698
|
+
const x = (y = t.value) == null ? void 0 : y.querySelector(".bar-input");
|
|
1699
|
+
x && x.blur(), t.value && t.value.focus();
|
|
1637
1700
|
}
|
|
1638
1701
|
}
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1702
|
+
function lt(u) {
|
|
1703
|
+
b.setBar(u, 0);
|
|
1641
1704
|
}
|
|
1642
|
-
function u
|
|
1643
|
-
|
|
1705
|
+
function Q(u, y) {
|
|
1706
|
+
if (y && y.stopPropagation(), S.value) {
|
|
1707
|
+
i.isCustomMark(u) && J(u);
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
v.value = u, f.value = !1, b.goToPracticeMark(u), t.value && t.value.blur();
|
|
1644
1711
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1712
|
+
function W(u) {
|
|
1713
|
+
u && u.stopPropagation();
|
|
1714
|
+
const y = i.addCustomMark(r.currentBar);
|
|
1715
|
+
y && (v.value = y, f.value = !1, h.buildFixedNavigationPoints());
|
|
1647
1716
|
}
|
|
1648
|
-
function
|
|
1649
|
-
|
|
1717
|
+
function X(u) {
|
|
1718
|
+
if (u && u.stopPropagation(), S.value) {
|
|
1719
|
+
const y = B.value.size > 0;
|
|
1720
|
+
B.value.forEach((x) => {
|
|
1721
|
+
i.removeCustomMark(x);
|
|
1722
|
+
}), B.value = /* @__PURE__ */ new Set(), S.value = !1, g(r.currentBar), y && h.buildFixedNavigationPoints();
|
|
1723
|
+
} else
|
|
1724
|
+
S.value = !0, B.value = /* @__PURE__ */ new Set();
|
|
1725
|
+
}
|
|
1726
|
+
function J(u, y) {
|
|
1727
|
+
const x = new Set(B.value);
|
|
1728
|
+
x.has(u) ? x.delete(u) : x.add(u), B.value = x;
|
|
1729
|
+
}
|
|
1730
|
+
function ct() {
|
|
1731
|
+
C.value > 1 && (P.value = !0), r.currentRepeat < C.value && b.setBar(r.currentBar, r.currentRepeat + 1);
|
|
1650
1732
|
}
|
|
1651
|
-
function
|
|
1652
|
-
|
|
1733
|
+
function ht() {
|
|
1734
|
+
C.value > 1 && (P.value = !0), r.currentRepeat > 1 && b.setBar(r.currentBar, r.currentRepeat - 1);
|
|
1653
1735
|
}
|
|
1654
|
-
function
|
|
1655
|
-
|
|
1656
|
-
(k = t.value) != null && k.contains(p.target) || (B.value = !1), (C = a.value) != null && C.contains(p.target) || (v.value = !1);
|
|
1736
|
+
function wt(u) {
|
|
1737
|
+
u.stopPropagation(), P.value = !1, f.value = !f.value, !f.value && S.value && (S.value = !1, B.value = /* @__PURE__ */ new Set());
|
|
1657
1738
|
}
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1739
|
+
function mt(u) {
|
|
1740
|
+
var y, x;
|
|
1741
|
+
(y = t.value) != null && y.contains(u.target) || (f.value = !1, S.value && (S.value = !1, B.value = /* @__PURE__ */ new Set())), (x = a.value) != null && x.contains(u.target) || (P.value = !1);
|
|
1742
|
+
}
|
|
1743
|
+
function ft() {
|
|
1744
|
+
f.value && setTimeout(() => {
|
|
1745
|
+
var x, O;
|
|
1746
|
+
const u = (x = t.value) == null ? void 0 : x.querySelector(".mark-grid"), y = (O = t.value) == null ? void 0 : O.querySelector(".mark-option.selected");
|
|
1747
|
+
if (y && u) {
|
|
1748
|
+
const it = u.getBoundingClientRect(), o = y.getBoundingClientRect(), M = o.left - it.left - it.width / 2 + o.width / 2;
|
|
1749
|
+
u.scrollLeft = Math.max(0, u.scrollLeft + M);
|
|
1665
1750
|
}
|
|
1666
1751
|
}, 50);
|
|
1667
1752
|
}
|
|
1668
|
-
|
|
1669
|
-
document.addEventListener("click",
|
|
1670
|
-
const
|
|
1671
|
-
r.setCurrentBar(r.currentBar,
|
|
1753
|
+
Mt(() => {
|
|
1754
|
+
document.addEventListener("click", mt), Xt("beatAnimation") && (z = setInterval(() => {
|
|
1755
|
+
const u = r.currentBeat % i.timeSignature + 1;
|
|
1756
|
+
r.setCurrentBar(r.currentBar, u, r.currentRepeat);
|
|
1672
1757
|
}, 800));
|
|
1673
|
-
}),
|
|
1674
|
-
document.removeEventListener("click",
|
|
1758
|
+
}), kt(() => {
|
|
1759
|
+
document.removeEventListener("click", mt), z && (clearInterval(z), z = null);
|
|
1675
1760
|
});
|
|
1676
|
-
const
|
|
1677
|
-
var
|
|
1678
|
-
const
|
|
1679
|
-
if (document.activeElement !==
|
|
1680
|
-
if (/^[a-z]$/.test(
|
|
1681
|
-
|
|
1682
|
-
const
|
|
1683
|
-
|
|
1684
|
-
} else
|
|
1761
|
+
const Et = (u) => {
|
|
1762
|
+
var x;
|
|
1763
|
+
const y = (x = t.value) == null ? void 0 : x.querySelector(".bar-input");
|
|
1764
|
+
if (document.activeElement !== y)
|
|
1765
|
+
if (/^[a-z]$/.test(u.key) && !u.ctrlKey && !u.metaKey && !u.shiftKey) {
|
|
1766
|
+
u.preventDefault(), u.stopPropagation();
|
|
1767
|
+
const O = u.key.toUpperCase();
|
|
1768
|
+
$.value.includes(O) && Q(O, null);
|
|
1769
|
+
} else u.key === "ArrowUp" ? (u.preventDefault(), u.stopPropagation(), ct()) : u.key === "ArrowDown" ? (u.preventDefault(), u.stopPropagation(), ht()) : u.key === "Enter" ? (u.preventDefault(), u.stopPropagation(), A()) : u.key === "+" && (u.preventDefault(), u.stopPropagation(), H.value && W(null));
|
|
1685
1770
|
};
|
|
1686
|
-
return (
|
|
1771
|
+
return (u, y) => (w(), T("div", {
|
|
1687
1772
|
ref_key: "el",
|
|
1688
1773
|
ref: t,
|
|
1689
|
-
class:
|
|
1774
|
+
class: I(["outer", { pulse: N.value, "mark-selecting": f.value }]),
|
|
1690
1775
|
tabindex: "0",
|
|
1691
1776
|
role: "group",
|
|
1692
1777
|
"aria-label": "Musical navigation",
|
|
1693
|
-
onKeydown:
|
|
1778
|
+
onKeydown: Et
|
|
1694
1779
|
}, [
|
|
1695
|
-
|
|
1780
|
+
y[9] || (y[9] = m("div", { class: "frame" }, null, -1)),
|
|
1696
1781
|
m("div", {
|
|
1697
|
-
class:
|
|
1782
|
+
class: I(["mark-input", { empty: !v.value, edit: f.value, disabled: !d.value }]),
|
|
1698
1783
|
tabindex: "-1",
|
|
1699
|
-
onClick:
|
|
1784
|
+
onClick: wt
|
|
1700
1785
|
}, [
|
|
1701
|
-
m("div", Fe, K(
|
|
1786
|
+
m("div", Fe, K(v.value || "-"), 1)
|
|
1702
1787
|
], 2),
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1788
|
+
y[10] || (y[10] = m("div", { class: "mark-title" }, "Mark", -1)),
|
|
1789
|
+
f.value ? F("", !0) : (w(), T(pt, { key: 0 }, [
|
|
1790
|
+
It(m("input", {
|
|
1706
1791
|
type: "text",
|
|
1707
1792
|
class: "bar-input",
|
|
1708
|
-
"onUpdate:modelValue":
|
|
1793
|
+
"onUpdate:modelValue": y[0] || (y[0] = (x) => l.value = x),
|
|
1709
1794
|
inputmode: "decimal",
|
|
1710
1795
|
pattern: "\\d*",
|
|
1711
1796
|
tabindex: "-1",
|
|
1712
|
-
onChange:
|
|
1713
|
-
onKeyup: ae(
|
|
1797
|
+
onChange: A,
|
|
1798
|
+
onKeyup: ae(A, ["enter"])
|
|
1714
1799
|
}, null, 544), [
|
|
1715
|
-
[
|
|
1800
|
+
[qt, l.value]
|
|
1716
1801
|
]),
|
|
1717
|
-
|
|
1802
|
+
y[5] || (y[5] = m("div", { class: "bar-title" }, "Bar", -1)),
|
|
1718
1803
|
m("div", {
|
|
1719
1804
|
ref_key: "rpt",
|
|
1720
1805
|
ref: a,
|
|
1721
|
-
class:
|
|
1806
|
+
class: I(["rpt-input", { edit: P.value, available: C.value > 1 }])
|
|
1722
1807
|
}, [
|
|
1723
|
-
m("div", Ue, K(
|
|
1724
|
-
(
|
|
1725
|
-
class:
|
|
1808
|
+
m("div", Ue, K(L(r).currentRepeat || "-"), 1),
|
|
1809
|
+
(w(), T("svg", {
|
|
1810
|
+
class: I(["inc", { disabled: L(r).currentRepeat >= C.value }]),
|
|
1726
1811
|
viewBox: "0 -100 100 100",
|
|
1727
|
-
onClick:
|
|
1728
|
-
},
|
|
1812
|
+
onClick: Ct(ct, ["prevent"])
|
|
1813
|
+
}, y[3] || (y[3] = [
|
|
1729
1814
|
m("path", { d: "m10-20 40-60 40 60H10Z" }, null, -1)
|
|
1730
1815
|
]), 2)),
|
|
1731
|
-
(
|
|
1732
|
-
class:
|
|
1816
|
+
(w(), T("svg", {
|
|
1817
|
+
class: I(["dec", { disabled: L(r).currentRepeat <= 1 }]),
|
|
1733
1818
|
viewBox: "0 -100 100 100",
|
|
1734
|
-
onClick:
|
|
1735
|
-
},
|
|
1819
|
+
onClick: Ct(ht, ["prevent"])
|
|
1820
|
+
}, y[4] || (y[4] = [
|
|
1736
1821
|
m("path", { d: "m10-80 40 60 40-60H10Z" }, null, -1)
|
|
1737
1822
|
]), 2))
|
|
1738
1823
|
], 2),
|
|
1739
|
-
|
|
1740
|
-
m("div",
|
|
1741
|
-
m("div",
|
|
1824
|
+
y[6] || (y[6] = m("div", { class: "rpt-title" }, "Rpt", -1)),
|
|
1825
|
+
m("div", Ke, [
|
|
1826
|
+
m("div", Ge, K(L(r).currentBeat), 1)
|
|
1742
1827
|
]),
|
|
1743
|
-
|
|
1828
|
+
y[7] || (y[7] = m("div", { class: "beat-title" }, "Beat", -1))
|
|
1744
1829
|
], 64)),
|
|
1745
|
-
|
|
1830
|
+
f.value ? (w(), T("div", qe, [
|
|
1746
1831
|
m("div", He, [
|
|
1747
|
-
(
|
|
1748
|
-
key:
|
|
1749
|
-
class:
|
|
1750
|
-
|
|
1751
|
-
|
|
1832
|
+
(w(!0), T(pt, null, At($.value, (x) => (w(), T("div", {
|
|
1833
|
+
key: x,
|
|
1834
|
+
class: I(["mark-option", {
|
|
1835
|
+
selected: !S.value && x === v.value,
|
|
1836
|
+
deleting: S.value && B.value.has(x),
|
|
1837
|
+
custom: L(i).isCustomMark(x),
|
|
1838
|
+
greyed: S.value && !L(i).isCustomMark(x)
|
|
1839
|
+
}]),
|
|
1840
|
+
onClick: (O) => Q(x, O)
|
|
1841
|
+
}, K(x), 11, We))), 128)),
|
|
1842
|
+
H.value ? (w(), T("div", {
|
|
1843
|
+
key: 0,
|
|
1844
|
+
class: I(["mark-option add-mark", { greyed: S.value }]),
|
|
1845
|
+
onClick: y[1] || (y[1] = (x) => !S.value && W(x))
|
|
1846
|
+
}, " + ", 2)) : F("", !0),
|
|
1847
|
+
p.value ? (w(), T("div", {
|
|
1848
|
+
key: 1,
|
|
1849
|
+
class: I(["mark-option trash-icon", { active: S.value }]),
|
|
1850
|
+
onClick: y[2] || (y[2] = (x) => X(x))
|
|
1851
|
+
}, y[8] || (y[8] = [
|
|
1852
|
+
m("svg", {
|
|
1853
|
+
viewBox: "0 -960 960 960",
|
|
1854
|
+
fill: "currentColor"
|
|
1855
|
+
}, [
|
|
1856
|
+
m("path", {
|
|
1857
|
+
transform: "rotate(135)",
|
|
1858
|
+
d: "M -831.95532 179.98077 L -751.96387 179.98077 L -751.96387 39.995727 L -611.97882 39.995727 L -611.97882 -39.995727 L -751.96387 -39.995727 L -751.96387 -179.98077 L -831.95532 -179.98077 L -831.95532 -39.995727 L -971.94037 -39.995727 L -971.94037 39.995727 L -831.95532 39.995727 L -831.95532 179.98077 z "
|
|
1859
|
+
}),
|
|
1860
|
+
m("path", { d: "M 280 -840 L 280 -680 L 120 -680 L 120 -120 L 680 -120 L 680 -280 L 840 -280 L 840 -840 L 280 -840 z M 360 -760 L 760 -760 L 760 -360 L 360 -360 L 360 -760 z M 200 -600 L 280 -600 L 280 -280 L 600 -280 L 600 -200 L 200 -200 L 200 -600 z " })
|
|
1861
|
+
], -1)
|
|
1862
|
+
]), 2)) : F("", !0)
|
|
1752
1863
|
])
|
|
1753
|
-
])) :
|
|
1864
|
+
])) : F("", !0)
|
|
1754
1865
|
], 34));
|
|
1755
1866
|
}
|
|
1756
|
-
}, Ze = /* @__PURE__ */
|
|
1867
|
+
}, Ze = /* @__PURE__ */ U(je, [["__scopeId", "data-v-e542aa14"]]), Ye = { class: "frame" }, Qe = { class: "title" }, Xe = {
|
|
1757
1868
|
__name: "BaseNumericInput",
|
|
1758
|
-
props: /* @__PURE__ */
|
|
1869
|
+
props: /* @__PURE__ */ Lt({
|
|
1759
1870
|
title: {
|
|
1760
1871
|
type: String,
|
|
1761
1872
|
required: !0
|
|
@@ -1818,48 +1929,48 @@ const Re = ["aria-label"], Oe = {
|
|
|
1818
1929
|
}),
|
|
1819
1930
|
emits: ["update:value"],
|
|
1820
1931
|
setup(e) {
|
|
1821
|
-
|
|
1932
|
+
at((v) => ({
|
|
1822
1933
|
"391e6684": e.textColor,
|
|
1823
1934
|
"6eae8f5d": e.backgroundColor,
|
|
1824
1935
|
"6ee151eb": e.color,
|
|
1825
|
-
"29a40ccc":
|
|
1826
|
-
"7366daab":
|
|
1936
|
+
"29a40ccc": b.value,
|
|
1937
|
+
"7366daab": h.value,
|
|
1827
1938
|
"0f87383a": e.focusColor
|
|
1828
1939
|
}));
|
|
1829
|
-
const t = e, a =
|
|
1940
|
+
const t = e, a = Y("el"), { width: s, height: n } = st(a), i = tt(e, "value"), r = _(t.formatValue(t.transformSliderToDisplay(i.value)));
|
|
1830
1941
|
R(i, () => {
|
|
1831
|
-
const
|
|
1832
|
-
r.value = t.formatValue(
|
|
1942
|
+
const v = t.transformSliderToDisplay(i.value);
|
|
1943
|
+
r.value = t.formatValue(v);
|
|
1833
1944
|
}), R(r, () => {
|
|
1834
1945
|
r.value = t.validateInput(r.value), t.maxChars && r.value.length > t.maxChars && (r.value = r.value.slice(0, t.maxChars));
|
|
1835
1946
|
});
|
|
1836
|
-
const
|
|
1947
|
+
const h = k(() => Math.min(n.value / 2.25, s.value / 2.2) + "px"), b = k(() => Math.min(s.value / 3, n.value / 6.4) + "px");
|
|
1837
1948
|
function l() {
|
|
1838
|
-
const
|
|
1839
|
-
i.value = Math.min(Math.max(
|
|
1949
|
+
const v = t.parseValue(r.value), E = t.transformDisplayToSlider(v);
|
|
1950
|
+
i.value = Math.min(Math.max(E, t.sliderMin), t.sliderMax);
|
|
1840
1951
|
}
|
|
1841
|
-
return (
|
|
1952
|
+
return (v, E) => (w(), T("div", {
|
|
1842
1953
|
class: "outer",
|
|
1843
1954
|
ref_key: "el",
|
|
1844
1955
|
ref: a
|
|
1845
1956
|
}, [
|
|
1846
1957
|
m("div", Ye, [
|
|
1847
|
-
|
|
1958
|
+
It(m("input", {
|
|
1848
1959
|
type: "text",
|
|
1849
1960
|
class: "input",
|
|
1850
|
-
"onUpdate:modelValue":
|
|
1961
|
+
"onUpdate:modelValue": E[0] || (E[0] = (C) => r.value = C),
|
|
1851
1962
|
inputmode: "decimal",
|
|
1852
1963
|
pattern: "\\d*",
|
|
1853
1964
|
onChange: l
|
|
1854
1965
|
}, null, 544), [
|
|
1855
|
-
[
|
|
1966
|
+
[qt, r.value]
|
|
1856
1967
|
]),
|
|
1857
1968
|
m("div", Qe, K(e.title), 1)
|
|
1858
1969
|
]),
|
|
1859
|
-
|
|
1970
|
+
D(yt, {
|
|
1860
1971
|
class: "slider",
|
|
1861
1972
|
value: i.value,
|
|
1862
|
-
"onUpdate:value":
|
|
1973
|
+
"onUpdate:value": E[1] || (E[1] = (C) => i.value = C),
|
|
1863
1974
|
"thumb-length": e.thumbLength,
|
|
1864
1975
|
max: e.sliderMax,
|
|
1865
1976
|
min: e.sliderMin,
|
|
@@ -1867,30 +1978,30 @@ const Re = ["aria-label"], Oe = {
|
|
|
1867
1978
|
}, null, 8, ["value", "thumb-length", "max", "min"])
|
|
1868
1979
|
], 512));
|
|
1869
1980
|
}
|
|
1870
|
-
},
|
|
1981
|
+
}, te = /* @__PURE__ */ U(Xe, [["__scopeId", "data-v-3c97bdb4"]]), Je = {
|
|
1871
1982
|
__name: "SpeedInput",
|
|
1872
1983
|
setup(e) {
|
|
1873
|
-
const t =
|
|
1984
|
+
const t = nt(), a = dt(), s = k({
|
|
1874
1985
|
get: () => Math.log2(t.playbackSpeed) * 0.5 + 0.5,
|
|
1875
1986
|
set: (l) => {
|
|
1876
|
-
const
|
|
1877
|
-
a.setPlaybackSpeed(
|
|
1987
|
+
const v = Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 0.05;
|
|
1988
|
+
a.setPlaybackSpeed(v);
|
|
1878
1989
|
}
|
|
1879
|
-
}), n = (l) => Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 5 + "", i = (l) => parseFloat(l), r = (l) => l.replace(/\D/g, ""),
|
|
1880
|
-
const
|
|
1881
|
-
return Math.min(Math.max(
|
|
1990
|
+
}), n = (l) => Math.floor(Math.pow(2, l * 2 - 1) * 20 + 0.5) * 5 + "", i = (l) => parseFloat(l), r = (l) => l.replace(/\D/g, ""), h = (l) => l, b = (l) => {
|
|
1991
|
+
const v = Math.log2(l / 100) * 0.5 + 0.5;
|
|
1992
|
+
return Math.min(Math.max(v, 0), 1);
|
|
1882
1993
|
};
|
|
1883
|
-
return (l,
|
|
1994
|
+
return (l, v) => (w(), vt(te, {
|
|
1884
1995
|
value: s.value,
|
|
1885
|
-
"onUpdate:value":
|
|
1996
|
+
"onUpdate:value": v[0] || (v[0] = (E) => s.value = E),
|
|
1886
1997
|
title: "Speed",
|
|
1887
1998
|
color: "#336",
|
|
1888
1999
|
"text-color": "#aad",
|
|
1889
2000
|
"format-value": n,
|
|
1890
2001
|
"parse-value": i,
|
|
1891
2002
|
"validate-input": r,
|
|
1892
|
-
"transform-slider-to-display":
|
|
1893
|
-
"transform-display-to-slider":
|
|
2003
|
+
"transform-slider-to-display": h,
|
|
2004
|
+
"transform-display-to-slider": b,
|
|
1894
2005
|
"thumb-length": 2,
|
|
1895
2006
|
"max-chars": 3
|
|
1896
2007
|
}, null, 8, ["value"]));
|
|
@@ -1898,25 +2009,25 @@ const Re = ["aria-label"], Oe = {
|
|
|
1898
2009
|
}, ta = {
|
|
1899
2010
|
__name: "TimeInput",
|
|
1900
2011
|
setup(e) {
|
|
1901
|
-
const t =
|
|
1902
|
-
return (l,
|
|
1903
|
-
value:
|
|
2012
|
+
const t = nt(), a = et(), s = dt(), n = (l) => l.toFixed(1), i = (l) => parseFloat(l), r = (l) => l.replace(/[^0-9.]/g, ""), h = (l) => l, b = (l) => l;
|
|
2013
|
+
return (l, v) => (w(), vt(te, {
|
|
2014
|
+
value: L(t).currentTime,
|
|
1904
2015
|
"onUpdate:value": [
|
|
1905
|
-
|
|
1906
|
-
|
|
2016
|
+
v[0] || (v[0] = (E) => L(t).currentTime = E),
|
|
2017
|
+
L(s).setTime
|
|
1907
2018
|
],
|
|
1908
2019
|
title: "Time",
|
|
1909
2020
|
color: "#344",
|
|
1910
2021
|
"focus-color": "#556868",
|
|
1911
2022
|
"text-color": "#acc",
|
|
1912
2023
|
"background-color": "#111117",
|
|
1913
|
-
"slider-max":
|
|
2024
|
+
"slider-max": L(a).totalDuration,
|
|
1914
2025
|
"slider-min": 0,
|
|
1915
2026
|
"format-value": n,
|
|
1916
2027
|
"parse-value": i,
|
|
1917
2028
|
"validate-input": r,
|
|
1918
|
-
"transform-slider-to-display":
|
|
1919
|
-
"transform-display-to-slider":
|
|
2029
|
+
"transform-slider-to-display": h,
|
|
2030
|
+
"transform-display-to-slider": b,
|
|
1920
2031
|
"thumb-length": 2
|
|
1921
2032
|
}, null, 8, ["value", "onUpdate:value", "slider-max"]));
|
|
1922
2033
|
}
|
|
@@ -1936,19 +2047,19 @@ const Re = ["aria-label"], Oe = {
|
|
|
1936
2047
|
const t = e, a = _(!1), s = () => {
|
|
1937
2048
|
t.disabled || (a.value = !0);
|
|
1938
2049
|
}, n = () => a.value = !1;
|
|
1939
|
-
return (i, r) => (
|
|
2050
|
+
return (i, r) => (w(), T("div", {
|
|
1940
2051
|
title: e.title,
|
|
1941
|
-
class:
|
|
2052
|
+
class: I(["button-outer", { down: a.value, disabled: e.disabled }]),
|
|
1942
2053
|
onPointerdown: s,
|
|
1943
2054
|
onPointerup: n,
|
|
1944
2055
|
onPointerleave: n
|
|
1945
2056
|
}, [
|
|
1946
2057
|
m("div", aa, [
|
|
1947
|
-
|
|
2058
|
+
ut(i.$slots, "default", {}, void 0, !0)
|
|
1948
2059
|
])
|
|
1949
2060
|
], 42, ea));
|
|
1950
2061
|
}
|
|
1951
|
-
},
|
|
2062
|
+
}, rt = /* @__PURE__ */ U(sa, [["__scopeId", "data-v-77d8694a"]]), na = { class: "outer" }, ia = { class: "title" }, ra = {
|
|
1952
2063
|
class: "buttons",
|
|
1953
2064
|
role: "toolbar",
|
|
1954
2065
|
"aria-label": "Transport controls"
|
|
@@ -1966,179 +2077,193 @@ const Re = ["aria-label"], Oe = {
|
|
|
1966
2077
|
},
|
|
1967
2078
|
emits: ["menu-click"],
|
|
1968
2079
|
setup(e, { emit: t }) {
|
|
1969
|
-
const a = e, s = t, n =
|
|
1970
|
-
function
|
|
1971
|
-
i.isPlayingOrLeadIn ?
|
|
2080
|
+
const a = e, s = t, n = et(), i = nt(), r = Nt(), h = dt();
|
|
2081
|
+
function b() {
|
|
2082
|
+
i.isPlayingOrLeadIn ? h.stop() : h.play();
|
|
1972
2083
|
}
|
|
1973
2084
|
function l() {
|
|
1974
|
-
const
|
|
1975
|
-
if (r.lastNavigationAction === "pause" && r.lastPlayStartTime !== null) {
|
|
1976
|
-
|
|
2085
|
+
const d = r.navigationPoints;
|
|
2086
|
+
if ((r.lastNavigationAction === "pause" || r.lastNavigationAction === "ended") && r.lastPlayStartTime !== null) {
|
|
2087
|
+
h.setTime(r.lastPlayStartTime), r.setNavigationAction(null);
|
|
1977
2088
|
return;
|
|
1978
2089
|
}
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
}
|
|
1982
|
-
function g() {
|
|
1983
|
-
const u = r.navigationPoints, h = i.currentTime, b = u.find((A) => A.time > h + 0.01);
|
|
1984
|
-
b && d.setTime(b.time);
|
|
2090
|
+
const p = i.currentTime, g = d.filter((A) => A.time < p - 0.01).pop();
|
|
2091
|
+
g && h.setTime(g.time);
|
|
1985
2092
|
}
|
|
1986
|
-
function
|
|
1987
|
-
d.
|
|
2093
|
+
function v() {
|
|
2094
|
+
const d = r.navigationPoints, p = i.currentTime, g = d.find((A) => A.time > p + 0.01);
|
|
2095
|
+
g && h.setTime(g.time);
|
|
1988
2096
|
}
|
|
1989
|
-
const T = M(() => i.metronomeEnabled), B = M(() => i.leadInEnabled), v = _(!1), S = _(null);
|
|
1990
2097
|
function E() {
|
|
2098
|
+
h.playStartingNotes();
|
|
2099
|
+
}
|
|
2100
|
+
const C = k(() => i.metronomeEnabled), V = k(() => i.leadInEnabled), f = _(!1), P = _(null);
|
|
2101
|
+
function S() {
|
|
1991
2102
|
if (a.externalMenuControl) {
|
|
1992
|
-
s("menu-click"),
|
|
1993
|
-
console.warn("Audio system pre-initialization failed:",
|
|
2103
|
+
s("menu-click"), h.audioEngine.initializeAudioSystem().catch((d) => {
|
|
2104
|
+
console.warn("Audio system pre-initialization failed:", d);
|
|
1994
2105
|
});
|
|
1995
2106
|
return;
|
|
1996
2107
|
}
|
|
1997
|
-
|
|
1998
|
-
console.warn("Audio system pre-initialization failed:",
|
|
2108
|
+
f.value = !f.value, f.value && (h.audioEngine.initializeAudioSystem().catch((d) => {
|
|
2109
|
+
console.warn("Audio system pre-initialization failed:", d);
|
|
1999
2110
|
}), setTimeout(() => {
|
|
2000
|
-
var
|
|
2001
|
-
const
|
|
2002
|
-
|
|
2111
|
+
var p;
|
|
2112
|
+
const d = (p = P.value) == null ? void 0 : p.querySelector('button, a, [tabindex="0"]');
|
|
2113
|
+
d && d.focus();
|
|
2003
2114
|
}, 0));
|
|
2004
2115
|
}
|
|
2005
|
-
function
|
|
2006
|
-
|
|
2116
|
+
function B() {
|
|
2117
|
+
f.value = !1;
|
|
2007
2118
|
}
|
|
2008
|
-
function
|
|
2009
|
-
|
|
2119
|
+
function N(d) {
|
|
2120
|
+
P.value && !P.value.contains(d.target) && B();
|
|
2010
2121
|
}
|
|
2011
|
-
|
|
2012
|
-
document.addEventListener("click",
|
|
2013
|
-
}),
|
|
2014
|
-
document.removeEventListener("click",
|
|
2122
|
+
Mt(() => {
|
|
2123
|
+
document.addEventListener("click", N), document.addEventListener("keydown", H);
|
|
2124
|
+
}), kt(() => {
|
|
2125
|
+
document.removeEventListener("click", N), document.removeEventListener("keydown", H);
|
|
2015
2126
|
});
|
|
2016
|
-
function
|
|
2017
|
-
|
|
2127
|
+
function z() {
|
|
2128
|
+
h.toggleMetronome();
|
|
2018
2129
|
}
|
|
2019
|
-
function
|
|
2020
|
-
|
|
2130
|
+
function q() {
|
|
2131
|
+
h.toggleLeadIn();
|
|
2021
2132
|
}
|
|
2022
|
-
const
|
|
2133
|
+
const G = k({
|
|
2023
2134
|
get: () => i.masterVolume,
|
|
2024
|
-
set: (
|
|
2025
|
-
}),
|
|
2135
|
+
set: (d) => i.setMasterVolume(d)
|
|
2136
|
+
}), $ = k({
|
|
2026
2137
|
get: () => i.metronomeVolume,
|
|
2027
|
-
set: (
|
|
2028
|
-
}),
|
|
2029
|
-
const
|
|
2030
|
-
if (!(
|
|
2031
|
-
if (
|
|
2032
|
-
|
|
2033
|
-
else if (
|
|
2034
|
-
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2037
|
-
} else if (
|
|
2038
|
-
|
|
2039
|
-
const
|
|
2040
|
-
|
|
2041
|
-
} else if (
|
|
2042
|
-
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
} else if (
|
|
2046
|
-
|
|
2047
|
-
else if (
|
|
2048
|
-
|
|
2049
|
-
else if (
|
|
2050
|
-
|
|
2051
|
-
else if (
|
|
2052
|
-
|
|
2053
|
-
else if (
|
|
2054
|
-
|
|
2055
|
-
else if (
|
|
2056
|
-
|
|
2057
|
-
else if (/^[0-9]$/.test(
|
|
2058
|
-
const
|
|
2059
|
-
if (document.activeElement ===
|
|
2138
|
+
set: (d) => i.setMetronomeVolume(d)
|
|
2139
|
+
}), H = (d) => {
|
|
2140
|
+
const p = d.target;
|
|
2141
|
+
if (!(p.matches('input[type="text"]') && (p.closest(".time") || p.closest(".speed")))) {
|
|
2142
|
+
if (d.key === "Escape")
|
|
2143
|
+
d.preventDefault(), S();
|
|
2144
|
+
else if (d.key === "B" && d.shiftKey) {
|
|
2145
|
+
d.preventDefault();
|
|
2146
|
+
const g = document.querySelector(".bar");
|
|
2147
|
+
g && g.focus();
|
|
2148
|
+
} else if (d.key === "T" && d.shiftKey) {
|
|
2149
|
+
d.preventDefault();
|
|
2150
|
+
const g = document.querySelector(".time input");
|
|
2151
|
+
g && g.focus();
|
|
2152
|
+
} else if (d.key === "S" && d.shiftKey) {
|
|
2153
|
+
d.preventDefault();
|
|
2154
|
+
const g = document.querySelector(".speed input");
|
|
2155
|
+
g && g.focus();
|
|
2156
|
+
} else if (d.key === " ")
|
|
2157
|
+
d.preventDefault(), b();
|
|
2158
|
+
else if (d.key === "PageUp")
|
|
2159
|
+
d.preventDefault(), v();
|
|
2160
|
+
else if (d.key === "PageDown")
|
|
2161
|
+
d.preventDefault(), l();
|
|
2162
|
+
else if (d.key === "M" && d.shiftKey)
|
|
2163
|
+
d.preventDefault(), z();
|
|
2164
|
+
else if (d.key === "L" && d.shiftKey)
|
|
2165
|
+
d.preventDefault(), q();
|
|
2166
|
+
else if (d.key === "N" && d.shiftKey)
|
|
2167
|
+
d.preventDefault(), i.isPlayingOrLeadIn || E();
|
|
2168
|
+
else if (/^[0-9]$/.test(d.key) && !d.ctrlKey && !d.metaKey && !d.shiftKey) {
|
|
2169
|
+
const g = document.querySelector(".bar .bar-input");
|
|
2170
|
+
if (document.activeElement === g)
|
|
2060
2171
|
return;
|
|
2061
|
-
|
|
2062
|
-
} else if (/^[a-z]$/.test(
|
|
2063
|
-
|
|
2064
|
-
const
|
|
2065
|
-
if (
|
|
2066
|
-
|
|
2172
|
+
d.preventDefault(), g && (g.value = d.key, g.focus(), g.setSelectionRange(1, 1), g.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
2173
|
+
} else if (/^[a-z]$/.test(d.key) && !d.ctrlKey && !d.metaKey && !d.shiftKey) {
|
|
2174
|
+
d.preventDefault();
|
|
2175
|
+
const g = document.querySelector(".bar");
|
|
2176
|
+
if (g) {
|
|
2177
|
+
g.focus();
|
|
2067
2178
|
const A = new KeyboardEvent("keydown", {
|
|
2068
|
-
key:
|
|
2069
|
-
code:
|
|
2179
|
+
key: d.key,
|
|
2180
|
+
code: d.code,
|
|
2070
2181
|
bubbles: !0,
|
|
2071
2182
|
cancelable: !0
|
|
2072
2183
|
});
|
|
2073
|
-
|
|
2184
|
+
g.dispatchEvent(A);
|
|
2185
|
+
}
|
|
2186
|
+
} else if (d.key === "+") {
|
|
2187
|
+
d.preventDefault();
|
|
2188
|
+
const g = document.querySelector(".bar");
|
|
2189
|
+
if (g) {
|
|
2190
|
+
g.focus();
|
|
2191
|
+
const A = new KeyboardEvent("keydown", {
|
|
2192
|
+
key: "+",
|
|
2193
|
+
code: "Equal",
|
|
2194
|
+
shiftKey: !0,
|
|
2195
|
+
bubbles: !0,
|
|
2196
|
+
cancelable: !0
|
|
2197
|
+
});
|
|
2198
|
+
g.dispatchEvent(A);
|
|
2074
2199
|
}
|
|
2075
2200
|
}
|
|
2076
2201
|
}
|
|
2077
2202
|
};
|
|
2078
|
-
return (
|
|
2203
|
+
return (d, p) => (w(), T("div", na, [
|
|
2079
2204
|
m("div", ia, [
|
|
2080
|
-
|
|
2205
|
+
D(Qt, {
|
|
2081
2206
|
class: "text",
|
|
2082
2207
|
align: "centre",
|
|
2083
2208
|
overflow: "scroll"
|
|
2084
2209
|
}, {
|
|
2085
|
-
default:
|
|
2086
|
-
|
|
2210
|
+
default: Z(() => [
|
|
2211
|
+
St(K(L(n).title), 1)
|
|
2087
2212
|
]),
|
|
2088
2213
|
_: 1
|
|
2089
2214
|
}),
|
|
2090
2215
|
m("div", {
|
|
2091
2216
|
class: "menu-container",
|
|
2092
2217
|
ref_key: "menuRef",
|
|
2093
|
-
ref:
|
|
2218
|
+
ref: P
|
|
2094
2219
|
}, [
|
|
2095
|
-
(
|
|
2220
|
+
(w(), T("svg", {
|
|
2096
2221
|
class: "menu",
|
|
2097
2222
|
viewBox: "0 -960 960 960",
|
|
2098
|
-
onClick:
|
|
2099
|
-
},
|
|
2223
|
+
onClick: S
|
|
2224
|
+
}, p[2] || (p[2] = [
|
|
2100
2225
|
m("path", { d: "M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" }, null, -1)
|
|
2101
2226
|
]))),
|
|
2102
|
-
!e.externalMenuControl &&
|
|
2227
|
+
!e.externalMenuControl && f.value && d.$slots.menu ? (w(), T("div", {
|
|
2103
2228
|
key: 0,
|
|
2104
2229
|
class: "dropdown-menu",
|
|
2105
|
-
onClick:
|
|
2230
|
+
onClick: B
|
|
2106
2231
|
}, [
|
|
2107
|
-
|
|
2108
|
-
])) :
|
|
2232
|
+
ut(d.$slots, "menu", {}, void 0, !0)
|
|
2233
|
+
])) : F("", !0)
|
|
2109
2234
|
], 512)
|
|
2110
2235
|
]),
|
|
2111
|
-
|
|
2236
|
+
D(yt, {
|
|
2112
2237
|
class: "main",
|
|
2113
2238
|
colour: "red",
|
|
2114
2239
|
step: 0.01,
|
|
2115
2240
|
keystep: 0.1,
|
|
2116
|
-
value:
|
|
2117
|
-
"onUpdate:value":
|
|
2241
|
+
value: G.value,
|
|
2242
|
+
"onUpdate:value": p[0] || (p[0] = (g) => G.value = g)
|
|
2118
2243
|
}, null, 8, ["value"]),
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2244
|
+
p[8] || (p[8] = m("div", { class: "main-t" }, "Main", -1)),
|
|
2245
|
+
p[9] || (p[9] = m("div", { class: "main-focus" }, null, -1)),
|
|
2246
|
+
D(yt, {
|
|
2122
2247
|
class: "tick",
|
|
2123
2248
|
colour: "blue",
|
|
2124
2249
|
step: 0.01,
|
|
2125
2250
|
keystep: 0.1,
|
|
2126
|
-
value:
|
|
2127
|
-
"onUpdate:value":
|
|
2251
|
+
value: $.value,
|
|
2252
|
+
"onUpdate:value": p[1] || (p[1] = (g) => $.value = g)
|
|
2128
2253
|
}, null, 8, ["value"]),
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2254
|
+
p[10] || (p[10] = m("div", { class: "tick-t" }, "Tick", -1)),
|
|
2255
|
+
p[11] || (p[11] = m("div", { class: "tick-focus" }, null, -1)),
|
|
2256
|
+
D(Ze, { class: "bar" }),
|
|
2257
|
+
D(ta, { class: "time" }),
|
|
2258
|
+
D(Je, { class: "speed" }),
|
|
2134
2259
|
m("div", ra, [
|
|
2135
|
-
|
|
2260
|
+
D(rt, {
|
|
2136
2261
|
title: "Previous Mark",
|
|
2137
2262
|
class: "button",
|
|
2138
2263
|
tabindex: "-1",
|
|
2139
2264
|
onClick: l
|
|
2140
2265
|
}, {
|
|
2141
|
-
default:
|
|
2266
|
+
default: Z(() => p[3] || (p[3] = [
|
|
2142
2267
|
m("svg", {
|
|
2143
2268
|
class: "icon",
|
|
2144
2269
|
viewBox: "0 0 48 48"
|
|
@@ -2149,28 +2274,28 @@ const Re = ["aria-label"], Oe = {
|
|
|
2149
2274
|
_: 1,
|
|
2150
2275
|
__: [3]
|
|
2151
2276
|
}),
|
|
2152
|
-
|
|
2153
|
-
title:
|
|
2277
|
+
D(rt, {
|
|
2278
|
+
title: L(i).isPlayingOrLeadIn ? "Pause" : "Play",
|
|
2154
2279
|
class: "button",
|
|
2155
2280
|
tabindex: "-1",
|
|
2156
|
-
onClick:
|
|
2281
|
+
onClick: b
|
|
2157
2282
|
}, {
|
|
2158
|
-
default:
|
|
2159
|
-
(
|
|
2283
|
+
default: Z(() => [
|
|
2284
|
+
(w(), T("svg", oa, [
|
|
2160
2285
|
m("path", {
|
|
2161
|
-
d:
|
|
2286
|
+
d: L(i).isPlayingOrLeadIn ? "M27.4 35.4V12.6h8v22.8Zm-14.8 0V12.6h8.05v22.8Z" : "M16 37.85v-28l22 14Z"
|
|
2162
2287
|
}, null, 8, la)
|
|
2163
2288
|
]))
|
|
2164
2289
|
]),
|
|
2165
2290
|
_: 1
|
|
2166
2291
|
}, 8, ["title"]),
|
|
2167
|
-
|
|
2292
|
+
D(rt, {
|
|
2168
2293
|
title: "Next Mark",
|
|
2169
2294
|
class: "button",
|
|
2170
2295
|
tabindex: "-1",
|
|
2171
|
-
onClick:
|
|
2296
|
+
onClick: v
|
|
2172
2297
|
}, {
|
|
2173
|
-
default:
|
|
2298
|
+
default: Z(() => p[4] || (p[4] = [
|
|
2174
2299
|
m("svg", {
|
|
2175
2300
|
class: "icon",
|
|
2176
2301
|
viewBox: "0 0 48 48"
|
|
@@ -2181,46 +2306,46 @@ const Re = ["aria-label"], Oe = {
|
|
|
2181
2306
|
_: 1,
|
|
2182
2307
|
__: [4]
|
|
2183
2308
|
}),
|
|
2184
|
-
|
|
2309
|
+
D(rt, {
|
|
2185
2310
|
title: "Toggle Metronome",
|
|
2186
2311
|
class: "button",
|
|
2187
2312
|
tabindex: "-1",
|
|
2188
|
-
onClick:
|
|
2313
|
+
onClick: z
|
|
2189
2314
|
}, {
|
|
2190
|
-
default:
|
|
2191
|
-
(
|
|
2192
|
-
class:
|
|
2315
|
+
default: Z(() => [
|
|
2316
|
+
(w(), T("svg", {
|
|
2317
|
+
class: I(["icon", C.value ? "on" : "off"]),
|
|
2193
2318
|
viewBox: "-128 -128 768 768"
|
|
2194
|
-
},
|
|
2319
|
+
}, p[5] || (p[5] = [
|
|
2195
2320
|
m("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)
|
|
2196
2321
|
]), 2))
|
|
2197
2322
|
]),
|
|
2198
2323
|
_: 1
|
|
2199
2324
|
}),
|
|
2200
|
-
|
|
2325
|
+
D(rt, {
|
|
2201
2326
|
title: "Toggle Lead-in",
|
|
2202
2327
|
class: "button",
|
|
2203
2328
|
tabindex: "-1",
|
|
2204
|
-
onClick:
|
|
2329
|
+
onClick: q
|
|
2205
2330
|
}, {
|
|
2206
|
-
default:
|
|
2207
|
-
(
|
|
2208
|
-
class:
|
|
2331
|
+
default: Z(() => [
|
|
2332
|
+
(w(), T("svg", {
|
|
2333
|
+
class: I(["icon", V.value ? "on" : "off"]),
|
|
2209
2334
|
viewBox: "-2 -2 28 28"
|
|
2210
|
-
},
|
|
2335
|
+
}, p[6] || (p[6] = [
|
|
2211
2336
|
m("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)
|
|
2212
2337
|
]), 2))
|
|
2213
2338
|
]),
|
|
2214
2339
|
_: 1
|
|
2215
2340
|
}),
|
|
2216
|
-
|
|
2341
|
+
D(rt, {
|
|
2217
2342
|
title: "Starting Notes",
|
|
2218
2343
|
class: "button",
|
|
2219
2344
|
tabindex: "-1",
|
|
2220
|
-
disabled:
|
|
2221
|
-
onClick:
|
|
2345
|
+
disabled: L(i).isPlayingOrLeadIn,
|
|
2346
|
+
onClick: E
|
|
2222
2347
|
}, {
|
|
2223
|
-
default:
|
|
2348
|
+
default: Z(() => p[7] || (p[7] = [
|
|
2224
2349
|
m("svg", {
|
|
2225
2350
|
class: "icon",
|
|
2226
2351
|
viewBox: "0 -960 960 960"
|
|
@@ -2235,10 +2360,10 @@ const Re = ["aria-label"], Oe = {
|
|
|
2235
2360
|
])
|
|
2236
2361
|
]));
|
|
2237
2362
|
}
|
|
2238
|
-
}, da = /* @__PURE__ */
|
|
2363
|
+
}, da = /* @__PURE__ */ U(ua, [["__scopeId", "data-v-9470408d"]]), ca = { class: "init-progress" }, ha = {
|
|
2239
2364
|
key: 0,
|
|
2240
2365
|
class: "progress-track"
|
|
2241
|
-
}, ma = { class: "message-container" },
|
|
2366
|
+
}, ma = { class: "message-container" }, fa = {
|
|
2242
2367
|
__name: "InitializationProgress",
|
|
2243
2368
|
props: {
|
|
2244
2369
|
/** Current initialization stage */
|
|
@@ -2268,22 +2393,22 @@ const Re = ["aria-label"], Oe = {
|
|
|
2268
2393
|
}
|
|
2269
2394
|
},
|
|
2270
2395
|
setup(e) {
|
|
2271
|
-
const t = e, a =
|
|
2272
|
-
return (i, r) => (
|
|
2273
|
-
a.value ? (
|
|
2396
|
+
const t = e, a = k(() => t.progress !== null), s = k(() => t.progress === null ? 0 : Math.max(0, Math.min(100, t.progress * 100))), n = k(() => t.hasError ? t.errorMessage : t.message);
|
|
2397
|
+
return (i, r) => (w(), T("div", ca, [
|
|
2398
|
+
a.value ? (w(), T("div", ha, [
|
|
2274
2399
|
m("div", {
|
|
2275
2400
|
class: "progress-fill",
|
|
2276
|
-
style:
|
|
2401
|
+
style: Gt({ width: `${s.value}%` })
|
|
2277
2402
|
}, null, 4)
|
|
2278
|
-
])) :
|
|
2403
|
+
])) : F("", !0),
|
|
2279
2404
|
m("div", ma, [
|
|
2280
2405
|
m("div", {
|
|
2281
|
-
class:
|
|
2406
|
+
class: I(["message", { error: e.hasError }])
|
|
2282
2407
|
}, K(n.value), 3)
|
|
2283
2408
|
])
|
|
2284
2409
|
]));
|
|
2285
2410
|
}
|
|
2286
|
-
},
|
|
2411
|
+
}, pa = /* @__PURE__ */ U(fa, [["__scopeId", "data-v-a9ed87f2"]]), va = Pt("initialization", {
|
|
2287
2412
|
state: () => ({
|
|
2288
2413
|
// Current initialization stage
|
|
2289
2414
|
currentStage: null,
|
|
@@ -2347,7 +2472,7 @@ const Re = ["aria-label"], Oe = {
|
|
|
2347
2472
|
}), ga = { class: "container" }, ba = { class: "panel" }, ya = {
|
|
2348
2473
|
key: 0,
|
|
2349
2474
|
class: "blur"
|
|
2350
|
-
},
|
|
2475
|
+
}, Ot = 40, Rt = 40, $t = 100, ka = 50, Ft = 400, Ut = 570, Kt = 570, Ma = 350, Sa = 330, Pa = 360, xa = 360, wa = {
|
|
2351
2476
|
__name: "MixerLayout",
|
|
2352
2477
|
props: {
|
|
2353
2478
|
/** Whether to show initialization progress (default: true) */
|
|
@@ -2363,88 +2488,88 @@ const Re = ["aria-label"], Oe = {
|
|
|
2363
2488
|
},
|
|
2364
2489
|
emits: ["menu-click"],
|
|
2365
2490
|
setup(e, { emit: t }) {
|
|
2366
|
-
|
|
2367
|
-
"3e3bf6e6":
|
|
2368
|
-
"3e499cb2":
|
|
2369
|
-
"3a701552":
|
|
2491
|
+
at((f) => ({
|
|
2492
|
+
"3e3bf6e6": E.value,
|
|
2493
|
+
"3e499cb2": C.value,
|
|
2494
|
+
"3a701552": V.value
|
|
2370
2495
|
}));
|
|
2371
|
-
const a = e, s = t, n =
|
|
2372
|
-
|
|
2496
|
+
const a = e, s = t, n = et(), i = nt(), r = va();
|
|
2497
|
+
Mt(() => {
|
|
2373
2498
|
r.initializeListeners();
|
|
2374
2499
|
});
|
|
2375
|
-
const
|
|
2376
|
-
const
|
|
2377
|
-
return
|
|
2378
|
-
}),
|
|
2379
|
-
switch (
|
|
2500
|
+
const h = Y("container"), { width: b } = st(h), l = k(() => i.isLoaded), v = k(() => {
|
|
2501
|
+
const f = b.value, P = n.parts.length;
|
|
2502
|
+
return f < 640 || f < Ot * P + Ft ? 0 : f < Rt * P + Ut ? 1 : f < $t * P + Kt ? 2 : 3;
|
|
2503
|
+
}), E = k(() => {
|
|
2504
|
+
switch (v.value) {
|
|
2380
2505
|
case 0:
|
|
2381
2506
|
return `${Ma}px ` + `${ka}px `.repeat(n.parts.length);
|
|
2382
2507
|
case 1:
|
|
2383
2508
|
return `${Sa}px`;
|
|
2384
2509
|
case 2:
|
|
2385
|
-
return `${xa}px`;
|
|
2386
|
-
default:
|
|
2387
2510
|
return `${Pa}px`;
|
|
2511
|
+
default:
|
|
2512
|
+
return `${xa}px`;
|
|
2388
2513
|
}
|
|
2389
|
-
}),
|
|
2390
|
-
switch (
|
|
2514
|
+
}), C = k(() => {
|
|
2515
|
+
switch (v.value) {
|
|
2391
2516
|
case 0:
|
|
2392
2517
|
return "100vw";
|
|
2393
2518
|
case 1:
|
|
2394
|
-
return `${
|
|
2519
|
+
return `${Ot}px `.repeat(n.parts.length) + `${Ft}px`;
|
|
2395
2520
|
case 2:
|
|
2396
|
-
return `${
|
|
2521
|
+
return `${Rt}px `.repeat(n.parts.length) + `${Ut}px`;
|
|
2397
2522
|
default:
|
|
2398
|
-
return `${
|
|
2523
|
+
return `${$t}px `.repeat(n.parts.length) + `${Kt}px`;
|
|
2399
2524
|
}
|
|
2400
|
-
}),
|
|
2401
|
-
const
|
|
2402
|
-
return
|
|
2525
|
+
}), V = k(() => {
|
|
2526
|
+
const f = [...n.parts.keys()];
|
|
2527
|
+
return v.value > 0 ? '"' + f.map((P) => "part" + P).join(" ") + ' controls"' : '"controls" ' + f.map((P) => '"part' + P + '"').join(" ");
|
|
2403
2528
|
});
|
|
2404
|
-
return (
|
|
2529
|
+
return (f, P) => (w(), T("div", {
|
|
2405
2530
|
class: "outer",
|
|
2406
2531
|
ref_key: "container",
|
|
2407
|
-
ref:
|
|
2532
|
+
ref: h
|
|
2408
2533
|
}, [
|
|
2409
2534
|
m("div", ga, [
|
|
2410
2535
|
m("div", ba, [
|
|
2411
|
-
(
|
|
2412
|
-
key:
|
|
2413
|
-
class:
|
|
2414
|
-
name:
|
|
2415
|
-
volume:
|
|
2416
|
-
"onUpdate:volume": (
|
|
2417
|
-
solo:
|
|
2418
|
-
"onUpdate:solo": (
|
|
2419
|
-
mute:
|
|
2420
|
-
"onUpdate:mute": (
|
|
2536
|
+
(w(!0), T(pt, null, At(L(n).parts, (S, B) => (w(), vt($e, {
|
|
2537
|
+
key: S.name,
|
|
2538
|
+
class: I("part" + B),
|
|
2539
|
+
name: S.name,
|
|
2540
|
+
volume: S.volume,
|
|
2541
|
+
"onUpdate:volume": (N) => S.volume = N,
|
|
2542
|
+
solo: S.solo,
|
|
2543
|
+
"onUpdate:solo": (N) => S.solo = N,
|
|
2544
|
+
mute: S.mute,
|
|
2545
|
+
"onUpdate:mute": (N) => S.mute = N,
|
|
2421
2546
|
ref_for: !0,
|
|
2422
2547
|
ref: "parts"
|
|
2423
2548
|
}, null, 8, ["class", "name", "volume", "onUpdate:volume", "solo", "onUpdate:solo", "mute", "onUpdate:mute"]))), 128)),
|
|
2424
|
-
|
|
2549
|
+
D(da, {
|
|
2425
2550
|
"external-menu-control": a.externalMenuControl,
|
|
2426
|
-
onMenuClick:
|
|
2551
|
+
onMenuClick: P[0] || (P[0] = (S) => s("menu-click")),
|
|
2427
2552
|
class: "controls"
|
|
2428
2553
|
}, {
|
|
2429
|
-
menu:
|
|
2430
|
-
|
|
2554
|
+
menu: Z(() => [
|
|
2555
|
+
ut(f.$slots, "menu", {}, void 0, !0)
|
|
2431
2556
|
]),
|
|
2432
2557
|
_: 3
|
|
2433
2558
|
}, 8, ["external-menu-control"]),
|
|
2434
|
-
l.value ?
|
|
2435
|
-
a.showInitProgress &&
|
|
2559
|
+
l.value ? F("", !0) : (w(), T("div", ya)),
|
|
2560
|
+
a.showInitProgress && L(r).shouldShowProgress ? (w(), vt(pa, {
|
|
2436
2561
|
key: 1,
|
|
2437
|
-
stage:
|
|
2438
|
-
message:
|
|
2439
|
-
progress:
|
|
2440
|
-
"has-error":
|
|
2441
|
-
"error-message":
|
|
2442
|
-
}, null, 8, ["stage", "message", "progress", "has-error", "error-message"])) :
|
|
2562
|
+
stage: L(r).currentStage,
|
|
2563
|
+
message: L(r).message,
|
|
2564
|
+
progress: L(r).progress,
|
|
2565
|
+
"has-error": L(r).hasError,
|
|
2566
|
+
"error-message": L(r).errorMessage
|
|
2567
|
+
}, null, 8, ["stage", "message", "progress", "has-error", "error-message"])) : F("", !0)
|
|
2443
2568
|
])
|
|
2444
2569
|
])
|
|
2445
2570
|
], 512));
|
|
2446
2571
|
}
|
|
2447
|
-
},
|
|
2572
|
+
}, Ra = /* @__PURE__ */ U(wa, [["__scopeId", "data-v-cf29d602"]]), Ea = { class: "outer" }, Ta = { class: "mid" }, Ca = { class: "inner" }, Ba = {
|
|
2448
2573
|
key: 0,
|
|
2449
2574
|
class: "content"
|
|
2450
2575
|
}, _a = {
|
|
@@ -2460,23 +2585,23 @@ const Re = ["aria-label"], Oe = {
|
|
|
2460
2585
|
}
|
|
2461
2586
|
},
|
|
2462
2587
|
setup(e) {
|
|
2463
|
-
return
|
|
2588
|
+
return at((t) => ({
|
|
2464
2589
|
"66bea586": e.colour
|
|
2465
|
-
})), (t, a) => (
|
|
2590
|
+
})), (t, a) => (w(), T("div", Ea, [
|
|
2466
2591
|
m("div", Ta, [
|
|
2467
|
-
m("div",
|
|
2468
|
-
e.text || t.$slots.default ? (
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
])) :
|
|
2592
|
+
m("div", Ca, [
|
|
2593
|
+
e.text || t.$slots.default ? (w(), T("div", Ba, [
|
|
2594
|
+
St(K(e.text) + " ", 1),
|
|
2595
|
+
ut(t.$slots, "default", {}, void 0, !0)
|
|
2596
|
+
])) : F("", !0)
|
|
2472
2597
|
])
|
|
2473
2598
|
])
|
|
2474
2599
|
]));
|
|
2475
2600
|
}
|
|
2476
|
-
}, $a = /* @__PURE__ */
|
|
2601
|
+
}, $a = /* @__PURE__ */ U(_a, [["__scopeId", "data-v-dff76c48"]]), La = { class: "modal-footer" }, Aa = {
|
|
2477
2602
|
key: 0,
|
|
2478
2603
|
class: "dont-remind"
|
|
2479
|
-
},
|
|
2604
|
+
}, Ia = {
|
|
2480
2605
|
__name: "KeyboardShortcutsHelp",
|
|
2481
2606
|
props: {
|
|
2482
2607
|
/** Controls visibility of the dialog */
|
|
@@ -2494,37 +2619,37 @@ const Re = ["aria-label"], Oe = {
|
|
|
2494
2619
|
setup(e, { emit: t }) {
|
|
2495
2620
|
const a = e, s = t, n = _(!1), i = _(null), r = () => {
|
|
2496
2621
|
n.value && s("dont-remind", !0), s("update:visible", !1);
|
|
2497
|
-
},
|
|
2498
|
-
|
|
2622
|
+
}, h = (b) => {
|
|
2623
|
+
b.key === "Escape" && (b.preventDefault(), b.stopPropagation(), r());
|
|
2499
2624
|
};
|
|
2500
|
-
return R(() => a.visible, async (
|
|
2625
|
+
return R(() => a.visible, async (b) => {
|
|
2501
2626
|
var l;
|
|
2502
|
-
|
|
2503
|
-
}), (
|
|
2627
|
+
b && (await se(), (l = i.value) == null || l.focus());
|
|
2628
|
+
}), (b, l) => e.visible ? (w(), T("div", {
|
|
2504
2629
|
key: 0,
|
|
2505
2630
|
class: "modal-overlay",
|
|
2506
2631
|
onClick: r,
|
|
2507
|
-
onKeydown:
|
|
2632
|
+
onKeydown: h
|
|
2508
2633
|
}, [
|
|
2509
2634
|
m("div", {
|
|
2510
2635
|
class: "modal-content shortcuts-help",
|
|
2511
|
-
onClick: l[1] || (l[1] =
|
|
2636
|
+
onClick: l[1] || (l[1] = Ct(() => {
|
|
2512
2637
|
}, ["stop"])),
|
|
2513
2638
|
role: "dialog",
|
|
2514
2639
|
"aria-labelledby": "shortcuts-title",
|
|
2515
2640
|
"aria-modal": "true"
|
|
2516
2641
|
}, [
|
|
2517
2642
|
l[3] || (l[3] = ne('<h2 id="shortcuts-title" data-v-bfa878a3>Keyboard Shortcuts</h2><div class="shortcuts-container" data-v-bfa878a3><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Transport Controls</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>P</kbd></dt><dd data-v-bfa878a3>Play / Pause</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>S</kbd></dt><dd data-v-bfa878a3>Stop</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>B</kbd></dt><dd data-v-bfa878a3>Previous bar</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>F</kbd></dt><dd data-v-bfa878a3>Next bar</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Features</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>M</kbd></dt><dd data-v-bfa878a3>Toggle metronome</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>L</kbd></dt><dd data-v-bfa878a3>Toggle lead-in</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>N</kbd></dt><dd data-v-bfa878a3>Play starting notes</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Sliders & Controls</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>↑</kbd> / <kbd data-v-bfa878a3>→</kbd></dt><dd data-v-bfa878a3>Increase value</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>↓</kbd> / <kbd data-v-bfa878a3>←</kbd></dt><dd data-v-bfa878a3>Decrease value</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Home</kbd></dt><dd data-v-bfa878a3>Set to minimum</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>End</kbd></dt><dd data-v-bfa878a3>Set to maximum</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Page Up</kbd> / <kbd data-v-bfa878a3>Page Down</kbd></dt><dd data-v-bfa878a3>Large adjustment</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Navigation</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Tab</kbd></dt><dd data-v-bfa878a3>Next control</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Shift</kbd> + <kbd data-v-bfa878a3>Tab</kbd></dt><dd data-v-bfa878a3>Previous control</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Enter</kbd> / <kbd data-v-bfa878a3>Space</kbd></dt><dd data-v-bfa878a3>Activate button</dd></div><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>Escape</kbd></dt><dd data-v-bfa878a3>Close dialog / menu</dd></div></dl></section><section class="shortcut-group" data-v-bfa878a3><h3 data-v-bfa878a3>Help</h3><dl data-v-bfa878a3><div class="shortcut-item" data-v-bfa878a3><dt data-v-bfa878a3><kbd data-v-bfa878a3>?</kbd></dt><dd data-v-bfa878a3>Show this help</dd></div></dl></section></div>', 2)),
|
|
2518
|
-
m("div",
|
|
2519
|
-
e.showDontRemind ? (
|
|
2520
|
-
|
|
2643
|
+
m("div", La, [
|
|
2644
|
+
e.showDontRemind ? (w(), T("label", Aa, [
|
|
2645
|
+
It(m("input", {
|
|
2521
2646
|
type: "checkbox",
|
|
2522
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2647
|
+
"onUpdate:modelValue": l[0] || (l[0] = (v) => n.value = v)
|
|
2523
2648
|
}, null, 512), [
|
|
2524
2649
|
[ie, n.value]
|
|
2525
2650
|
]),
|
|
2526
|
-
l[2] || (l[2] =
|
|
2527
|
-
])) :
|
|
2651
|
+
l[2] || (l[2] = St(" Don't show this again "))
|
|
2652
|
+
])) : F("", !0),
|
|
2528
2653
|
m("button", {
|
|
2529
2654
|
onClick: r,
|
|
2530
2655
|
class: "close-button",
|
|
@@ -2533,12 +2658,12 @@ const Re = ["aria-label"], Oe = {
|
|
|
2533
2658
|
}, "Close", 512)
|
|
2534
2659
|
])
|
|
2535
2660
|
])
|
|
2536
|
-
], 32)) :
|
|
2661
|
+
], 32)) : F("", !0);
|
|
2537
2662
|
}
|
|
2538
|
-
}, Fa = /* @__PURE__ */
|
|
2663
|
+
}, Fa = /* @__PURE__ */ U(Ia, [["__scopeId", "data-v-bfa878a3"]]);
|
|
2539
2664
|
class Na {
|
|
2540
2665
|
constructor() {
|
|
2541
|
-
this.eventBus =
|
|
2666
|
+
this.eventBus = Jt(), this.currentTime = 0, this.isPlaying = !1, this.playbackSpeed = 1, this.masterVolume = 0.75, this.parts = /* @__PURE__ */ new Map(), this.playbackTimer = null, this.lastTimestamp = 0;
|
|
2542
2667
|
}
|
|
2543
2668
|
// Initialize with musical data
|
|
2544
2669
|
initialize(t) {
|
|
@@ -2684,29 +2809,29 @@ class Na {
|
|
|
2684
2809
|
}
|
|
2685
2810
|
new Na();
|
|
2686
2811
|
export {
|
|
2687
|
-
|
|
2688
|
-
|
|
2812
|
+
rt as AudioButton,
|
|
2813
|
+
yt as AudioSlider,
|
|
2689
2814
|
Ze as BarInput,
|
|
2690
|
-
|
|
2691
|
-
|
|
2815
|
+
te as BaseNumericInput,
|
|
2816
|
+
_t as DEV_MODE,
|
|
2692
2817
|
Na as DummyAudioEngine,
|
|
2693
|
-
|
|
2818
|
+
pa as InitializationProgress,
|
|
2694
2819
|
Fa as KeyboardShortcutsHelp,
|
|
2695
2820
|
da as MixerControls,
|
|
2696
|
-
|
|
2821
|
+
Ra as MixerLayout,
|
|
2697
2822
|
$e as PartControl,
|
|
2698
2823
|
$a as Placeholder,
|
|
2699
2824
|
Je as SpeedInput,
|
|
2700
2825
|
ta as TimeInput,
|
|
2701
|
-
|
|
2826
|
+
Qt as TitleText,
|
|
2702
2827
|
Ne as TriState,
|
|
2703
2828
|
Ve as audioEngineConfig,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2829
|
+
Xt as isDevFeature,
|
|
2830
|
+
Oa as isDevMode,
|
|
2831
|
+
nt as useAudioStateStore,
|
|
2832
|
+
st as useElementSize,
|
|
2708
2833
|
va as useInitializationState,
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2834
|
+
dt as useMasterAudioControl,
|
|
2835
|
+
et as useMusicDataStore,
|
|
2836
|
+
Nt as usePlaybackStateStore
|
|
2712
2837
|
};
|