vue-audio-ui 0.1.5 → 0.1.6

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.
@@ -1,4 +1,4 @@
1
- import { ref as g, defineComponent as T, watch as N, computed as b, onMounted as Ct, onUnmounted as At, createElementBlock as x, openBlock as k, createStaticVNode as ct, createElementVNode as c, normalizeStyle as Z, resolveComponent as et, createVNode as X, renderSlot as xt, reactive as Bt, useTemplateRef as kt, normalizeClass as ut, toDisplayString as R, createCommentVNode as Dt, withDirectives as Ht, vModelText as Ft, nextTick as Yt, Fragment as lt, renderList as dt, onBeforeUnmount as _t } from "vue";
1
+ import { ref as g, defineComponent as T, watch as B, computed as C, onMounted as bt, onUnmounted as At, createElementBlock as x, openBlock as k, createStaticVNode as ct, createElementVNode as c, normalizeStyle as Z, resolveComponent as et, createVNode as X, renderSlot as xt, reactive as Nt, useTemplateRef as kt, normalizeClass as ut, toDisplayString as R, createCommentVNode as Dt, withDirectives as Ht, vModelText as Ft, nextTick as Yt, Fragment as lt, renderList as dt, onBeforeUnmount as _t } from "vue";
2
2
  const V = {
3
3
  colors: {
4
4
  primary: "#70bfff",
@@ -26,28 +26,28 @@ function pt(t, e) {
26
26
  function r(s, f) {
27
27
  s && o(s);
28
28
  }
29
- function d() {
29
+ function h() {
30
30
  return a?.getFloatTimeDomainData(i), i;
31
31
  }
32
32
  function y() {
33
33
  return a?.getFloatFrequencyData(i), i;
34
34
  }
35
- function C(s) {
35
+ function w(s) {
36
36
  let f = 0, m;
37
37
  for (let p = 0; p < s.length; p++)
38
38
  m = Math.abs(s[p]), m > f && (f = m);
39
39
  return 20 * Math.log10(f);
40
40
  }
41
- function h(s) {
41
+ function l(s) {
42
42
  let f = 0, m;
43
43
  for (let p = 0; p < s.length; p++)
44
44
  m = Math.abs(s[p]), f += m * m;
45
45
  return 20 * Math.log10(Math.sqrt(f / s.length));
46
46
  }
47
47
  return {
48
- getPeakDb: C,
49
- getRmsDb: h,
50
- getFloatTimeDomainData: d,
48
+ getPeakDb: w,
49
+ getRmsDb: l,
50
+ getFloatTimeDomainData: h,
51
51
  getFloatFrequencyData: y,
52
52
  onInputChanged: r,
53
53
  disposeMetering: n
@@ -76,7 +76,8 @@ const Kt = T({
76
76
  props: {
77
77
  input: {
78
78
  required: !1,
79
- type: AudioNode,
79
+ type: Object,
80
+ // type: AudioNode
80
81
  default: void 0
81
82
  },
82
83
  type: {
@@ -97,24 +98,26 @@ const Kt = T({
97
98
  },
98
99
  setup(t) {
99
100
  const { getPeakDb: e, getRmsDb: a, getFloatTimeDomainData: i, onInputChanged: o } = pt(t.fftSize, t.input);
100
- N(() => t.input, o);
101
- const { startRendering: n, stopRendering: r } = ft(), d = g(-1), y = g("black"), C = b(() => isNaN(d.value) ? "rotate(0 160 150)" : `rotate(${50 * d.value} 160 150)`);
102
- return Ct(() => {
101
+ B(() => t.input, (l, s) => {
102
+ o(l, s);
103
+ });
104
+ const { startRendering: n, stopRendering: r } = ft(), h = g(-1), y = g("black"), w = C(() => isNaN(h.value) ? "rotate(0 160 150)" : `rotate(${50 * h.value} 160 150)`);
105
+ return bt(() => {
103
106
  n(() => {
104
- const h = i();
107
+ const l = i();
105
108
  let s = 0;
106
- t.type === "peak" && h ? s = e(h) : t.type === "rms" && h && (s = a(h));
109
+ t.type === "peak" && l ? s = e(l) : t.type === "rms" && l && (s = a(l));
107
110
  const f = 80;
108
111
  s = s < -f ? -f : s;
109
112
  const m = (f + s) / f;
110
- d.value = m * 2 - 1;
113
+ h.value = m * 2 - 1;
111
114
  });
112
115
  }), At(() => {
113
116
  r();
114
117
  }), {
115
118
  color: y,
116
- rotation: C,
117
- value: d
119
+ rotation: w,
120
+ value: h
118
121
  };
119
122
  }
120
123
  }), D = (t, e) => {
@@ -130,7 +133,7 @@ function Jt(t, e, a, i, o, n) {
130
133
  viewBox: "0 0 320 220",
131
134
  xmlns: "http://www.w3.org/2000/svg"
132
135
  }, [
133
- e[1] || (e[1] = ct('<defs data-v-048f897f><linearGradient id="frameGrad" x1="0" y1="0" x2="0" y2="1" data-v-048f897f><stop offset="0%" stop-color="#f0f0f0" data-v-048f897f></stop><stop offset="50%" stop-color="#b5b5b5" data-v-048f897f></stop><stop offset="100%" stop-color="#8a8a8a" data-v-048f897f></stop></linearGradient><linearGradient id="faceGrad" x1="0" y1="0" x2="0" y2="1" data-v-048f897f><stop offset="0%" stop-color="#fffdf7" data-v-048f897f></stop><stop offset="100%" stop-color="#e9e2d3" data-v-048f897f></stop></linearGradient><radialGradient id="glassGrad" cx="50%" cy="0%" r="80%" data-v-048f897f><stop offset="0%" stop-color="white" stop-opacity="0.7" data-v-048f897f></stop><stop offset="60%" stop-color="white" stop-opacity="0.15" data-v-048f897f></stop><stop offset="100%" stop-color="white" stop-opacity="0" data-v-048f897f></stop></radialGradient><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%" data-v-048f897f><feDropShadow dx="0" dy="3" stdDeviation="4" flood-opacity="0.4" data-v-048f897f></feDropShadow></filter><filter id="needleShadow" data-v-048f897f><feDropShadow dx="1" dy="1" stdDeviation="1" flood-opacity="0.5" data-v-048f897f></feDropShadow></filter></defs><rect x="10" y="10" rx="18" ry="18" width="300" height="200" fill="url(#frameGrad)" filter="url(#shadow)" data-v-048f897f></rect><rect x="24" y="24" rx="12" ry="12" width="272" height="172" fill="url(#faceGrad)" stroke="#777" stroke-width="1" data-v-048f897f></rect><path d="M 60 90 A 130 70 0 0 1 260 90" fill="none" stroke="#222" stroke-width="2" data-v-048f897f></path><g stroke="#222" stroke-width="2" data-v-048f897f><line x1="100" y1="120" x2="105" y2="130" data-v-048f897f></line><line x1="160" y1="110" x2="160" y2="122" data-v-048f897f></line><line x1="220" y1="120" x2="215" y2="130" data-v-048f897f></line></g>', 5)),
136
+ e[1] || (e[1] = ct('<defs data-v-984809e7><linearGradient id="frameGrad" x1="0" y1="0" x2="0" y2="1" data-v-984809e7><stop offset="0%" stop-color="#f0f0f0" data-v-984809e7></stop><stop offset="50%" stop-color="#b5b5b5" data-v-984809e7></stop><stop offset="100%" stop-color="#8a8a8a" data-v-984809e7></stop></linearGradient><linearGradient id="faceGrad" x1="0" y1="0" x2="0" y2="1" data-v-984809e7><stop offset="0%" stop-color="#fffdf7" data-v-984809e7></stop><stop offset="100%" stop-color="#e9e2d3" data-v-984809e7></stop></linearGradient><radialGradient id="glassGrad" cx="50%" cy="0%" r="80%" data-v-984809e7><stop offset="0%" stop-color="white" stop-opacity="0.7" data-v-984809e7></stop><stop offset="60%" stop-color="white" stop-opacity="0.15" data-v-984809e7></stop><stop offset="100%" stop-color="white" stop-opacity="0" data-v-984809e7></stop></radialGradient><filter id="shadow" x="-20%" y="-20%" width="140%" height="140%" data-v-984809e7><feDropShadow dx="0" dy="3" stdDeviation="4" flood-opacity="0.4" data-v-984809e7></feDropShadow></filter><filter id="needleShadow" data-v-984809e7><feDropShadow dx="1" dy="1" stdDeviation="1" flood-opacity="0.5" data-v-984809e7></feDropShadow></filter></defs><rect x="10" y="10" rx="18" ry="18" width="300" height="200" fill="url(#frameGrad)" filter="url(#shadow)" data-v-984809e7></rect><rect x="24" y="24" rx="12" ry="12" width="272" height="172" fill="url(#faceGrad)" stroke="#777" stroke-width="1" data-v-984809e7></rect><path d="M 60 90 A 130 70 0 0 1 260 90" fill="none" stroke="#222" stroke-width="2" data-v-984809e7></path><g stroke="#222" stroke-width="2" data-v-984809e7><line x1="100" y1="120" x2="105" y2="130" data-v-984809e7></line><line x1="160" y1="110" x2="160" y2="122" data-v-984809e7></line><line x1="220" y1="120" x2="215" y2="130" data-v-984809e7></line></g>', 5)),
134
137
  c("g", {
135
138
  id: "needle",
136
139
  transform: t.rotation
@@ -173,7 +176,7 @@ function Jt(t, e, a, i, o, n) {
173
176
  ], 8, Zt))
174
177
  ]);
175
178
  }
176
- const Qt = /* @__PURE__ */ D(Kt, [["render", Jt], ["__scopeId", "data-v-048f897f"]]);
179
+ const Qt = /* @__PURE__ */ D(Kt, [["render", Jt], ["__scopeId", "data-v-984809e7"]]);
177
180
  function H(t, e, a) {
178
181
  return t < e ? e : t > a ? a : t;
179
182
  }
@@ -388,15 +391,15 @@ const re = 3, oe = 300, ne = 16, se = T({
388
391
  const t = this.zoomWindowLength / this.graphWidth, e = Math.max(Math.round(t), 1);
389
392
  this.drawBackground();
390
393
  let a = 0, i = 0, o = 0, n = 0, r = 0;
391
- for (let d = 0; d < this.graphWidth; d++)
392
- a = d, n = this.getMinSampleValue(
394
+ for (let h = 0; h < this.graphWidth; h++)
395
+ a = h, n = this.getMinSampleValue(
393
396
  this.amplitudeData,
394
- this.zoomWindowStartIndex + d * e,
395
- this.zoomWindowStartIndex + (d + 1) * e
397
+ this.zoomWindowStartIndex + h * e,
398
+ this.zoomWindowStartIndex + (h + 1) * e
396
399
  ), r = this.getMaxSampleValue(
397
400
  this.amplitudeData,
398
- this.zoomWindowStartIndex + d * e,
399
- this.zoomWindowStartIndex + (d + 1) * e
401
+ this.zoomWindowStartIndex + h * e,
402
+ this.zoomWindowStartIndex + (h + 1) * e
400
403
  ), i = this.graphHeight - (this.graphHeight / 2 + n * this.graphHeight / 2), o = this.graphHeight - (this.graphHeight / 2 + r * this.graphHeight / 2), this.canvasContext.fillStyle = this.canvasLineColor, this.canvasContext?.fillRect(a, i, 1, te(o - i, 1));
401
404
  this.drawSelection(), this.drawMarker();
402
405
  },
@@ -405,9 +408,9 @@ const re = 3, oe = 300, ne = 16, se = T({
405
408
  const e = this.zoomWindowLength / this.graphWidth, a = Math.max(Math.round(e), 1), i = this.graphWidth / this.zoomWindowLength;
406
409
  this.drawBackground();
407
410
  const o = new Path2D();
408
- let n = 0, r = 0, d = 0;
411
+ let n = 0, r = 0, h = 0;
409
412
  for (let y = this.zoomWindowStartIndex; y < this.zoomWindowEndIndex; y += a)
410
- d = this.amplitudeData[y], n = (y - this.zoomWindowStartIndex) * i, r = this.graphHeight - (this.graphHeight / 2 + d * this.graphHeight / 2), y === 0 ? o.moveTo(n, r) : o.lineTo(n, r), t && this.drawPoint(n, r);
413
+ h = this.amplitudeData[y], n = (y - this.zoomWindowStartIndex) * i, r = this.graphHeight - (this.graphHeight / 2 + h * this.graphHeight / 2), y === 0 ? o.moveTo(n, r) : o.lineTo(n, r), t && this.drawPoint(n, r);
411
414
  o.lineTo(this.graphWidth, r), this.canvasContext.strokeStyle = this.canvasLineColor, this.canvasContext?.stroke(o), this.drawSelection(), this.drawMarker();
412
415
  },
413
416
  drawAmplitudeAvg() {
@@ -452,8 +455,8 @@ const re = 3, oe = 300, ne = 16, se = T({
452
455
  if (Math.abs(i) >= Math.abs(o)) {
453
456
  if (this.prevX >= 0) {
454
457
  let n = -Math.round(i / this.graphWidth * this.zoomWindowLength);
455
- const r = -this.zoomWindowStartIndex, d = this.amplitudeData.length - this.zoomWindowEndIndex;
456
- n = H(n, r, d), this.shiftZoomWindow(n), this.markerIndex += n;
458
+ const r = -this.zoomWindowStartIndex, h = this.amplitudeData.length - this.zoomWindowEndIndex;
459
+ n = H(n, r, h), this.shiftZoomWindow(n), this.markerIndex += n;
457
460
  }
458
461
  } else
459
462
  this.prevY >= 0 && (this.zoom = H(this.zoom - o / oe * 1, 0, 1), this.setZoomWindow());
@@ -487,11 +490,13 @@ const he = /* @__PURE__ */ D(se, [["render", de], ["__scopeId", "data-v-f20165f6
487
490
  props: {
488
491
  leftInput: {
489
492
  required: !1,
490
- type: AudioNode
493
+ type: Object
494
+ // type: AudioNode
491
495
  },
492
496
  rightInput: {
493
497
  required: !1,
494
- type: AudioNode
498
+ type: Object
499
+ // type: AudioNode
495
500
  },
496
501
  type: {
497
502
  required: !1,
@@ -578,12 +583,13 @@ function pe(t, e, a, i, o, n) {
578
583
  ])
579
584
  ]);
580
585
  }
581
- const fe = /* @__PURE__ */ D(ce, [["render", pe], ["__scopeId", "data-v-688c5c09"]]), E = 90, me = new Tt(0, E, 2), ge = T({
586
+ const fe = /* @__PURE__ */ D(ce, [["render", pe], ["__scopeId", "data-v-f5aea9e4"]]), E = 90, me = new Tt(0, E, 2), ge = T({
582
587
  name: "VADigitalMeter",
583
588
  props: {
584
589
  input: {
585
590
  required: !1,
586
- type: AudioNode,
591
+ type: Object,
592
+ // type: AudioNode
587
593
  default: void 0
588
594
  },
589
595
  type: {
@@ -640,7 +646,9 @@ const fe = /* @__PURE__ */ D(ce, [["render", pe], ["__scopeId", "data-v-688c5c09
640
646
  },
641
647
  setup(t) {
642
648
  const e = pt(t.fftSize, t.input);
643
- return N(() => t.input, e.onInputChanged), {
649
+ return B(() => t.input, (a, i) => {
650
+ e.onInputChanged(a, i);
651
+ }), {
644
652
  ...e,
645
653
  ...ft()
646
654
  };
@@ -700,12 +708,12 @@ const xe = /* @__PURE__ */ D(ge, [["render", ve]]), ke = {}, we = {
700
708
  xmlns: "http://www.w3.org/2000/svg",
701
709
  width: "27"
702
710
  };
703
- function Ce(t, e) {
711
+ function be(t, e) {
704
712
  return k(), x("svg", we, [...e[0] || (e[0] = [
705
713
  ct('<defs><filter id="filter4165" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-1" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><filter id="filter4165-4" x="-.18715" y="-.046414" width="1.3743" height="1.0928" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="2.4419414"></feGaussianBlur></filter><linearGradient id="linearGradient7341" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(406.7,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7468" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(203.35,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7595" x1="678.43" x2="668.76" y1="597.36" y2="597.36" gradientTransform="translate(0,-14.18)" gradientUnits="userSpaceOnUse"><stop stop-color="#9a9a9a" offset="0"></stop><stop offset="1"></stop></linearGradient><linearGradient id="linearGradient7698" x1="87.866" x2="87.866" y1="516.83" y2="528.75" gradientTransform="matrix(1.0278,0,0,1,582.85,121.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#999" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7700" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0235,0,0,1,37.712,-1157.9)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7702" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .50643 51.792 414.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7704" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .42746 51.792 466.71)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7706" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1 0 0 .26952 51.792 554.43)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7708" x1="87.866" x2="87.866" y1="516.83" y2="521.42" gradientTransform="matrix(1.0364 0 0 .96441 581.97 -1263.8)" gradientUnits="userSpaceOnUse"><stop stop-color="#999" offset="0"></stop><stop stop-color="#333" offset="1"></stop></linearGradient><linearGradient id="linearGradient7710" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0364 0 0 .96441 29.714 -1226.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7712" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0274 0 0 .48841 35.581 -982.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7714" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0213 0 0 .41225 39.183 -932.97)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient><linearGradient id="linearGradient7716" x1="618.49" x2="618.49" y1="496.57" y2="499.1" gradientTransform="matrix(1.0122 0 0 .25993 44.587 -848)" gradientUnits="userSpaceOnUse"><stop stop-color="#ccc" offset="0"></stop><stop stop-color="#ccc" stop-opacity="0" offset="1"></stop></linearGradient></defs><g transform="translate(-642.36 -637.36)"><rect x="642.36" y="637.36" width="62.143" height="129.29" rx="3" ry="3" fill="#4d4d4d"></rect><rect x="643.3" y="701.75" width="60.419" height="3.5355" fill="#e6e6e6"></rect><rect x="643.05" y="638.08" width="60.613" height="21.071" rx="2.1483" ry="2" fill="url(#linearGradient7698)"></rect><rect x="643.25" y="689.59" width="58.811" height="10.119" fill="#333"></rect><rect x="642.36" y="680.23" width="61.133" height="8.7929" fill="#333"></rect><rect x="642.36" y="661.81" width="61.133" height="4.5457" fill="#1a1a1a"></rect><rect x="642.36" y="667.58" width="61.133" height="11.364" fill="#1a1a1a"></rect><rect transform="scale(1,-1)" x="643.05" y="-661.09" width="60.012" height="2.2612" rx="1.0235" ry=".63958" fill="url(#linearGradient7700)"></rect><rect x="643.22" y="666.37" width="58.633" height="1.1452" rx="1" ry=".3239" fill="url(#linearGradient7702)"></rect><rect x="643.22" y="679.09" width="58.633" height=".9666" rx="1" ry=".2734" fill="url(#linearGradient7704)"></rect><rect x="643.22" y="688.34" width="58.633" height=".60946" rx="1" ry=".17238" fill="url(#linearGradient7706)"></rect><rect transform="scale(1,-1)" x="642.67" y="-765.57" width="61.118" height="20.321" rx="2.1662" ry="1.9288" fill="url(#linearGradient7708)"></rect><rect transform="scale(1,-1)" x="643.25" y="-717.26" width="58.811" height="9.7593" fill="#333"></rect><rect transform="scale(1,-1)" x="642.36" y="-726.3" width="61.133" height="8.4799" fill="#666"></rect><rect transform="scale(1,-1)" x="642.36" y="-744.06" width="61.133" height="4.3839" fill="#808080"></rect><rect transform="scale(1,-1)" x="642.36" y="-738.49" width="61.133" height="10.96" fill="#808080"></rect><rect transform="scale(1,-1)" x="642.67" y="-746.93" width="60.767" height="2.1808" rx="1.0364" ry=".61681" fill="url(#linearGradient7710)"></rect><rect transform="scale(1,-1)" x="643.22" y="-740.17" width="60.24" height="1.1044" rx="1.0274" ry=".31237" fill="url(#linearGradient7712)"></rect><rect transform="scale(1,-1)" x="643.22" y="-728.15" width="59.883" height=".9322" rx="1.0213" ry=".26366" fill="url(#linearGradient7714)"></rect><rect transform="scale(1,-1)" x="643.22" y="-718.85" width="59.347" height=".58776" rx="1.0122" ry=".16624" fill="url(#linearGradient7716)"></rect></g>', 2)
706
714
  ])]);
707
715
  }
708
- const be = /* @__PURE__ */ D(ke, [["render", Ce]]), Me = {}, Se = {
716
+ const Ce = /* @__PURE__ */ D(ke, [["render", be]]), Me = {}, Se = {
709
717
  version: "1.1",
710
718
  viewBox: "0 0 104 460",
711
719
  xmlns: "http://www.w3.org/2000/svg"
@@ -718,7 +726,7 @@ function Ge(t, e) {
718
726
  const Ve = /* @__PURE__ */ D(Me, [["render", Ge]]), De = T({
719
727
  name: "VAFader",
720
728
  components: {
721
- defaultFaderHead: be,
729
+ defaultFaderHead: Ce,
722
730
  defaultFaderBackground: Ve
723
731
  },
724
732
  emits: ["update:modelValue"],
@@ -849,7 +857,7 @@ const Ve = /* @__PURE__ */ D(Me, [["render", Ge]]), De = T({
849
857
  class: "fader-background"
850
858
  };
851
859
  function Ae(t, e, a, i, o, n) {
852
- const r = et("defaultFaderBackground"), d = et("defaultFaderHead");
860
+ const r = et("defaultFaderBackground"), h = et("defaultFaderHead");
853
861
  return k(), x("div", {
854
862
  ref: "faderContainer",
855
863
  class: "fader-container",
@@ -868,7 +876,7 @@ function Ae(t, e, a, i, o, n) {
868
876
  onDblclick: e[2] || (e[2] = (...y) => t.onHeadDblClick && t.onHeadDblClick(...y))
869
877
  }, [
870
878
  xt(t.$slots, "faderHead", {}, () => [
871
- X(d)
879
+ X(h)
872
880
  ], !0)
873
881
  ], 544)
874
882
  ], 4);
@@ -887,7 +895,7 @@ function Ie(t, e) {
887
895
  c2.3-2.8,5.2-4.7,8.4-5.9c1-2.2,1.9-4.6,2.5-7.1C109.1,83.4,109.3,80.7,109.4,78.2z" data-v-3cef4f4a></path></g><ellipse class="st1" cx="70.4" cy="70.4" rx="26.7" ry="26.7" data-v-3cef4f4a></ellipse><g transform="translate(0 -8)" data-v-3cef4f4a><path class="st2" d="M71.5,28.5c-0.4,0-0.9,0-1.1,0c-0.3,0-0.9,0-1.1,0v31h2.5v-31H71.5z" data-v-3cef4f4a></path></g></g></g></g>`, 1)
888
896
  ])]);
889
897
  }
890
- const Ee = /* @__PURE__ */ D(Te, [["render", Ie], ["__scopeId", "data-v-3cef4f4a"]]), We = T({
898
+ const Ee = /* @__PURE__ */ D(Te, [["render", Ie], ["__scopeId", "data-v-3cef4f4a"]]), Oe = T({
891
899
  components: {
892
900
  defaultKnob: Ee
893
901
  },
@@ -902,7 +910,7 @@ const Ee = /* @__PURE__ */ D(Te, [["render", Ie], ["__scopeId", "data-v-3cef4f4a
902
910
  valueCurve: new ht(t.minValue, t.maxValue)
903
911
  // audioParamValue: null as AudioParam | null
904
912
  };
905
- return t.modelValue instanceof Number && (e.linearValue = t.modelValue, e.curvedValue = e.valueCurve.getCurvedValue(t.modelValue), e.unsteppedValue = e.curvedValue), Bt(e);
913
+ return t.modelValue instanceof Number && (e.linearValue = t.modelValue, e.curvedValue = e.valueCurve.getCurvedValue(t.modelValue), e.unsteppedValue = e.curvedValue), Nt(e);
906
914
  },
907
915
  props: {
908
916
  modelValue: {
@@ -984,15 +992,15 @@ const Ee = /* @__PURE__ */ D(Te, [["render", Ie], ["__scopeId", "data-v-3cef4f4a
984
992
  this.curvedValue = t, this.unsteppedValue = this.valueCurve.getLinearValue(this.curvedValue), this.linearValue = this.step === 0 ? this.unsteppedValue : this.roundToStep(this.unsteppedValue);
985
993
  }
986
994
  }
987
- }), Oe = { class: "control-container" }, qe = { class: "knob-row" };
995
+ }), We = { class: "control-container" }, qe = { class: "knob-row" };
988
996
  function Le(t, e, a, i, o, n) {
989
997
  const r = et("default-knob");
990
- return k(), x("div", Oe, [
998
+ return k(), x("div", We, [
991
999
  c("div", qe, [
992
1000
  c("span", {
993
- onMousedown: e[0] || (e[0] = (...d) => t.onKnobMouseDown && t.onKnobMouseDown(...d)),
994
- onTouchstart: e[1] || (e[1] = (...d) => t.onKnobMouseDown && t.onKnobMouseDown(...d)),
995
- onDblclick: e[2] || (e[2] = (...d) => t.onKnobDblClick && t.onKnobDblClick(...d)),
1001
+ onMousedown: e[0] || (e[0] = (...h) => t.onKnobMouseDown && t.onKnobMouseDown(...h)),
1002
+ onTouchstart: e[1] || (e[1] = (...h) => t.onKnobMouseDown && t.onKnobMouseDown(...h)),
1003
+ onDblclick: e[2] || (e[2] = (...h) => t.onKnobDblClick && t.onKnobDblClick(...h)),
996
1004
  class: "knob-container",
997
1005
  style: Z(`transform: rotate(${t.knobRotation}rad); width: ${t.size}px; height: ${t.size}px;`)
998
1006
  }, [
@@ -1003,7 +1011,7 @@ function Le(t, e, a, i, o, n) {
1003
1011
  ])
1004
1012
  ]);
1005
1013
  }
1006
- const ze = /* @__PURE__ */ D(We, [["render", Le], ["__scopeId", "data-v-516025e9"]]), Q = 20, tt = -120, Re = 3, Ne = T({
1014
+ const ze = /* @__PURE__ */ D(Oe, [["render", Le], ["__scopeId", "data-v-516025e9"]]), Q = 20, tt = -120, Re = 3, Be = T({
1007
1015
  name: "VASpectrumAnalyzer",
1008
1016
  data() {
1009
1017
  return {
@@ -1015,7 +1023,8 @@ const ze = /* @__PURE__ */ D(We, [["render", Le], ["__scopeId", "data-v-516025e9
1015
1023
  props: {
1016
1024
  input: {
1017
1025
  required: !1,
1018
- type: AudioNode
1026
+ type: Object
1027
+ // type: AudioNode
1019
1028
  },
1020
1029
  fftSize: {
1021
1030
  type: Number,
@@ -1072,7 +1081,9 @@ const ze = /* @__PURE__ */ D(We, [["render", Le], ["__scopeId", "data-v-516025e9
1072
1081
  },
1073
1082
  setup(t) {
1074
1083
  const e = pt(t.fftSize, t.input);
1075
- return N(() => t.input, e.onInputChanged), {
1084
+ return B(() => t.input, (a, i) => {
1085
+ e.onInputChanged(a, i);
1086
+ }), {
1076
1087
  ...e,
1077
1088
  ...ft()
1078
1089
  };
@@ -1113,8 +1124,8 @@ const ze = /* @__PURE__ */ D(We, [["render", Le], ["__scopeId", "data-v-516025e9
1113
1124
  this.canvasContext.beginPath(), this.canvasContext.lineWidth = 1, this.canvasContext.strokeStyle = this.lineColor ?? V.colors.primary, this.canvasContext.fillStyle = this.lineColor ?? V.colors.primary, this.canvasContext.moveTo(0, this.graphHeight);
1114
1125
  let i = 0, o = this.graphHeight - (a[0] - tt) / t * this.graphHeight;
1115
1126
  for (let n = 0; n < a.length; n++) {
1116
- const r = (a[n] - tt) / t * this.graphHeight, d = n * (e / a.length);
1117
- this.canvasContext.lineTo(i, o), d >= Q && (i = this.scaleX(d, Q, e, this.graphWidth), o = this.graphHeight - r, this.fillStyle === "lines" && this.canvasContext.fillRect(i, o, 1, r)), this.canvasContext.lineTo(i, o);
1127
+ const r = (a[n] - tt) / t * this.graphHeight, h = n * (e / a.length);
1128
+ this.canvasContext.lineTo(i, o), h >= Q && (i = this.scaleX(h, Q, e, this.graphWidth), o = this.graphHeight - r, this.fillStyle === "lines" && this.canvasContext.fillRect(i, o, 1, r)), this.canvasContext.lineTo(i, o);
1118
1129
  }
1119
1130
  this.canvasContext.lineTo(this.graphWidth, this.graphHeight), this.canvasContext.closePath(), this.canvasContext.stroke(), this.fillStyle === "solid" && this.canvasContext.fill();
1120
1131
  }
@@ -1145,7 +1156,7 @@ const ze = /* @__PURE__ */ D(We, [["render", Le], ["__scopeId", "data-v-516025e9
1145
1156
  }
1146
1157
  }
1147
1158
  }
1148
- }), Be = ["width", "height"];
1159
+ }), Ne = ["width", "height"];
1149
1160
  function He(t, e, a, i, o, n) {
1150
1161
  return k(), x("canvas", {
1151
1162
  width: t.graphWidth,
@@ -1153,13 +1164,14 @@ function He(t, e, a, i, o, n) {
1153
1164
  ref: "analyserCanvas",
1154
1165
  class: "analyser-canvas",
1155
1166
  style: Z(t.cssVars)
1156
- }, null, 12, Be);
1167
+ }, null, 12, Ne);
1157
1168
  }
1158
- const Fe = /* @__PURE__ */ D(Ne, [["render", He], ["__scopeId", "data-v-670d0fd3"]]), Ye = ["height", "width"], _e = 3, Ke = /* @__PURE__ */ T({
1169
+ const Fe = /* @__PURE__ */ D(Be, [["render", He], ["__scopeId", "data-v-e2050d2b"]]), Ye = ["height", "width"], _e = 3, Ke = /* @__PURE__ */ T({
1159
1170
  __name: "v-a-oscilloscope",
1160
1171
  props: {
1161
1172
  input: {
1162
- type: AudioNode,
1173
+ type: Object,
1174
+ // type: AudioNode
1163
1175
  required: !1
1164
1176
  },
1165
1177
  width: {
@@ -1186,29 +1198,31 @@ const Fe = /* @__PURE__ */ D(Ne, [["render", He], ["__scopeId", "data-v-670d0fd3
1186
1198
  },
1187
1199
  setup(t) {
1188
1200
  const e = t, a = pt(e.fftSize, e.input), i = ft();
1189
- N(() => e.input, a.onInputChanged);
1201
+ B(() => e.input, (w, l) => {
1202
+ a.onInputChanged(w, l);
1203
+ });
1190
1204
  const o = kt("analyserCanvas");
1191
1205
  let n;
1192
- Ct(() => {
1206
+ bt(() => {
1193
1207
  n = o.value?.getContext("2d"), i.startRendering(y);
1194
- }), At(d);
1195
- const r = b(() => e.height ? e.height : e.width / _e);
1196
- function d() {
1208
+ }), At(h);
1209
+ const r = C(() => e.height ? e.height : e.width / _e);
1210
+ function h() {
1197
1211
  a.disposeMetering(e.input);
1198
1212
  }
1199
1213
  function y() {
1200
- let C = a.getFloatTimeDomainData();
1201
- if (!n || (n.fillStyle = "black", n.fillRect(0, 0, e.width, r.value), !C)) return;
1214
+ let w = a.getFloatTimeDomainData();
1215
+ if (!n || (n.fillStyle = "black", n.fillRect(0, 0, e.width, r.value), !w)) return;
1202
1216
  n.lineWidth = 2.5, n.strokeStyle = e.lineColor ?? V.colors.primary, n.beginPath();
1203
- const h = e.width / C.length;
1217
+ const l = e.width / w.length;
1204
1218
  let s = 0, f = 0;
1205
- for (let m = 0; m < C.length; m++) {
1206
- const p = -C[m] * r.value / 2;
1207
- f = r.value / 2 + p, m === 0 ? n.moveTo(s, f) : n.lineTo(s, f), s += h;
1219
+ for (let m = 0; m < w.length; m++) {
1220
+ const p = -w[m] * r.value / 2;
1221
+ f = r.value / 2 + p, m === 0 ? n.moveTo(s, f) : n.lineTo(s, f), s += l;
1208
1222
  }
1209
1223
  n.lineTo(e.width, f), n.stroke();
1210
1224
  }
1211
- return (C, h) => (k(), x("canvas", {
1225
+ return (w, l) => (k(), x("canvas", {
1212
1226
  ref_key: "analyserCanvas",
1213
1227
  ref: o,
1214
1228
  height: r.value,
@@ -1231,7 +1245,7 @@ const Fe = /* @__PURE__ */ D(Ne, [["render", He], ["__scopeId", "data-v-670d0fd3
1231
1245
  }
1232
1246
  },
1233
1247
  setup(t) {
1234
- const e = g(!1), a = b(() => ({
1248
+ const e = g(!1), a = C(() => ({
1235
1249
  "--on-color": `${t.color}`
1236
1250
  }));
1237
1251
  function i() {
@@ -1258,50 +1272,50 @@ const je = /* @__PURE__ */ D(Xe, [["render", Ze], ["__scopeId", "data-v-87a8a5ae
1258
1272
  height: { type: Number, required: !1 }
1259
1273
  },
1260
1274
  setup(t, e) {
1261
- const a = g("black"), i = g("#70bfff"), o = g("#70bfff"), n = g(4), r = g(16), d = 0.25, y = 0.4, C = 0.1, h = 0.25, s = g(0), f = g(0), m = g(0), p = g(0);
1275
+ const a = g("black"), i = g("#70bfff"), o = g("#70bfff"), n = g(4), r = g(16), h = 0.25, y = 0.4, w = 0.1, l = 0.25, s = g(0), f = g(0), m = g(0), p = g(0);
1262
1276
  let M = 0, $ = 0, A = 0, P = 0;
1263
- const U = g(0), u = g(0), l = g(0), v = g(0);
1264
- let B = 0, F = 0, bt = 0, Mt = 0;
1265
- const mt = g(0), gt = g(0), S = 10, W = g("");
1277
+ const U = g(0), u = g(0), d = g(0), v = g(0);
1278
+ let N = 0, F = 0, Ct = 0, Mt = 0;
1279
+ const mt = g(0), gt = g(0), S = 10, O = g("");
1266
1280
  let at = -1, St = -1;
1267
- const Ut = b(() => t.modelValue.attack + t.modelValue.decay + t.modelValue.release), Gt = b(() => t.width), Vt = b(() => t.height ? t.height : t.width / 2.5), j = b(() => Gt.value - S * 2), G = b(() => Vt.value - S * 2), It = b(() => G.value * 1), Y = b(() => d * j.value), J = b(() => Y.value * (t.modelValue.attack / t.attackMax)), _ = b(() => y * j.value), it = b(() => _.value * (t.modelValue.decay / t.decayMax)), rt = b(() => C * j.value), yt = b(() => h * j.value), ot = b(() => yt.value * (t.modelValue.release / t.releaseMax)), Et = b(() => {
1268
- s.value = S, f.value = G.value + S, m.value = J.value + S, p.value = S, M = J.value + it.value / 4 + S, $ = (G.value - G.value * t.modelValue.sustain) / 2 + S, A = J.value + it.value / 2 + S, P = G.value - G.value * t.modelValue.sustain + S, U.value = J.value + it.value + S, u.value = G.value - G.value * t.modelValue.sustain + S, l.value = Y.value + _.value + rt.value, v.value = G.value - G.value * t.modelValue.sustain + S, B = Y.value + _.value + rt.value + ot.value / 4, F = G.value - G.value * t.modelValue.sustain / 2 + S, bt = Y.value + _.value + rt.value + ot.value / 2, Mt = G.value + S, mt.value = l.value + ot.value, gt.value = G.value + S;
1269
- const w = `M ${s.value} ${f.value} `, nt = `L ${m.value} ${p.value} `, O = `C
1281
+ const Ut = C(() => t.modelValue.attack + t.modelValue.decay + t.modelValue.release), Gt = C(() => t.width), Vt = C(() => t.height ? t.height : t.width / 2.5), j = C(() => Gt.value - S * 2), G = C(() => Vt.value - S * 2), It = C(() => G.value * 1), Y = C(() => h * j.value), J = C(() => Y.value * (t.modelValue.attack / t.attackMax)), _ = C(() => y * j.value), it = C(() => _.value * (t.modelValue.decay / t.decayMax)), rt = C(() => w * j.value), yt = C(() => l * j.value), ot = C(() => yt.value * (t.modelValue.release / t.releaseMax)), Et = C(() => {
1282
+ s.value = S, f.value = G.value + S, m.value = J.value + S, p.value = S, M = J.value + it.value / 4 + S, $ = (G.value - G.value * t.modelValue.sustain) / 2 + S, A = J.value + it.value / 2 + S, P = G.value - G.value * t.modelValue.sustain + S, U.value = J.value + it.value + S, u.value = G.value - G.value * t.modelValue.sustain + S, d.value = Y.value + _.value + rt.value, v.value = G.value - G.value * t.modelValue.sustain + S, N = Y.value + _.value + rt.value + ot.value / 4, F = G.value - G.value * t.modelValue.sustain / 2 + S, Ct = Y.value + _.value + rt.value + ot.value / 2, Mt = G.value + S, mt.value = d.value + ot.value, gt.value = G.value + S;
1283
+ const b = `M ${s.value} ${f.value} `, nt = `L ${m.value} ${p.value} `, W = `C
1270
1284
  ${M}
1271
1285
  ${$}
1272
1286
  ${A}
1273
1287
  ${P}
1274
1288
  ${U.value}
1275
- ${u.value}`, st = `L ${l.value} ${v.value}`, I = `C
1276
- ${B}
1289
+ ${u.value}`, st = `L ${d.value} ${v.value}`, I = `C
1290
+ ${N}
1277
1291
  ${F}
1278
- ${bt}
1292
+ ${Ct}
1279
1293
  ${Mt}
1280
1294
  ${mt.value}
1281
1295
  ${gt.value}`;
1282
- return w + nt + O + st + I;
1296
+ return b + nt + W + st + I;
1283
1297
  });
1284
- function Wt(w) {
1285
- w.preventDefault ? w.preventDefault() : w.returnValue = !1, W.value = "attackAnchor";
1298
+ function Ot(b) {
1299
+ b.preventDefault ? b.preventDefault() : b.returnValue = !1, O.value = "attackAnchor";
1286
1300
  }
1287
- function Ot(w) {
1288
- w.preventDefault ? w.preventDefault() : w.returnValue = !1, W.value = "decaySustainAnchor";
1301
+ function Wt(b) {
1302
+ b.preventDefault ? b.preventDefault() : b.returnValue = !1, O.value = "decaySustainAnchor";
1289
1303
  }
1290
- function qt(w) {
1291
- w.preventDefault ? w.preventDefault() : w.returnValue = !1, W.value = "releaseAnchor";
1304
+ function qt(b) {
1305
+ b.preventDefault ? b.preventDefault() : b.returnValue = !1, O.value = "releaseAnchor";
1292
1306
  }
1293
- function vt(w, nt) {
1294
- let O, st, I = 0, q = 0, L = 0, z = 0;
1295
- if (W.value != "") {
1296
- switch (W.value) {
1307
+ function vt(b, nt) {
1308
+ let W, st, I = 0, q = 0, L = 0, z = 0;
1309
+ if (O.value != "") {
1310
+ switch (O.value) {
1297
1311
  case "attackAnchor":
1298
- O = w - at, I = O / Y.value * t.attackMax, I = t.modelValue.attack + I >= t.attackMax && I > 0 ? t.attackMax - t.modelValue.attack : t.modelValue.attack + I <= 0 && I < 0 ? 0 : I;
1312
+ W = b - at, I = W / Y.value * t.attackMax, I = t.modelValue.attack + I >= t.attackMax && I > 0 ? t.attackMax - t.modelValue.attack : t.modelValue.attack + I <= 0 && I < 0 ? 0 : I;
1299
1313
  break;
1300
1314
  case "decaySustainAnchor":
1301
- O = w - at, q = O / _.value * t.decayMax, q = t.modelValue.decay + q >= t.decayMax && q > 0 ? t.decayMax - t.modelValue.decay : t.modelValue.decay + q <= 0 && q < 0 ? 0 : q, st = nt - St, L = -(st / G.value), L = t.modelValue.sustain + L >= 1 && L > 0 ? 1 - t.modelValue.sustain : t.modelValue.sustain + L <= 0 && L < 0 ? 0 : L;
1315
+ W = b - at, q = W / _.value * t.decayMax, q = t.modelValue.decay + q >= t.decayMax && q > 0 ? t.decayMax - t.modelValue.decay : t.modelValue.decay + q <= 0 && q < 0 ? 0 : q, st = nt - St, L = -(st / G.value), L = t.modelValue.sustain + L >= 1 && L > 0 ? 1 - t.modelValue.sustain : t.modelValue.sustain + L <= 0 && L < 0 ? 0 : L;
1302
1316
  break;
1303
1317
  case "releaseAnchor":
1304
- O = w - at, z = O / yt.value * t.releaseMax, z = t.modelValue.release + z >= t.releaseMax && z > 0 ? t.releaseMax - t.modelValue.release : t.modelValue.release + z <= 0 && z < 0 ? 0 : z;
1318
+ W = b - at, z = W / yt.value * t.releaseMax, z = t.modelValue.release + z >= t.releaseMax && z > 0 ? t.releaseMax - t.modelValue.release : t.modelValue.release + z <= 0 && z < 0 ? 0 : z;
1305
1319
  break;
1306
1320
  }
1307
1321
  e.emit("update:modelValue", {
@@ -1311,19 +1325,19 @@ const je = /* @__PURE__ */ D(Xe, [["render", Ze], ["__scopeId", "data-v-87a8a5ae
1311
1325
  release: t.modelValue.release + z
1312
1326
  });
1313
1327
  }
1314
- at = w, St = nt;
1328
+ at = b, St = nt;
1315
1329
  }
1316
- function Lt(w) {
1317
- vt(w.pageX, w.pageY);
1330
+ function Lt(b) {
1331
+ vt(b.pageX, b.pageY);
1318
1332
  }
1319
- function zt(w) {
1320
- w.touches[0] && vt(w.touches[0].pageX, w.touches[0].pageY);
1333
+ function zt(b) {
1334
+ b.touches[0] && vt(b.touches[0].pageX, b.touches[0].pageY);
1321
1335
  }
1322
1336
  function Rt() {
1323
- W.value = "";
1337
+ O.value = "";
1324
1338
  }
1325
- function Nt() {
1326
- W.value = "";
1339
+ function Bt() {
1340
+ O.value = "";
1327
1341
  }
1328
1342
  return {
1329
1343
  backgroundColor: a,
@@ -1331,7 +1345,7 @@ const je = /* @__PURE__ */ D(Xe, [["render", Ze], ["__scopeId", "data-v-87a8a5ae
1331
1345
  anchorColor: o,
1332
1346
  anchorRadius: n,
1333
1347
  ghostAnchorRadius: r,
1334
- activeAnchorId: W,
1348
+ activeAnchorId: O,
1335
1349
  startX: s,
1336
1350
  startY: f,
1337
1351
  attackPeakX: m,
@@ -1354,11 +1368,11 @@ const je = /* @__PURE__ */ D(Xe, [["render", Ze], ["__scopeId", "data-v-87a8a5ae
1354
1368
  releaseTotalWidth: yt,
1355
1369
  releaseWidth: ot,
1356
1370
  adsrPath: Et,
1357
- attackAnchorMouseDown: Wt,
1358
- decaySustainAnchorMouseDown: Ot,
1371
+ attackAnchorMouseDown: Ot,
1372
+ decaySustainAnchorMouseDown: Wt,
1359
1373
  releaseAnchorMouseDown: qt,
1360
1374
  onMouseUp: Rt,
1361
- onMouseLeave: Nt,
1375
+ onMouseLeave: Bt,
1362
1376
  onMove: vt,
1363
1377
  onMouseMove: Lt,
1364
1378
  onTouchMove: zt
@@ -1486,7 +1500,7 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1486
1500
  }, xa = ["fill"], ka = {
1487
1501
  key: 0,
1488
1502
  class: "num-value"
1489
- }, wa = ["min", "max"], Ca = 90, ba = /* @__PURE__ */ T({
1503
+ }, wa = ["min", "max"], ba = 90, Ca = /* @__PURE__ */ T({
1490
1504
  __name: "v-a-num-box",
1491
1505
  props: {
1492
1506
  modelValue: {
@@ -1520,16 +1534,16 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1520
1534
  },
1521
1535
  emits: ["update:modelValue"],
1522
1536
  setup(t, { emit: e }) {
1523
- const a = e, i = t, o = g(!1), n = g(!1), r = g(i.modelValue), d = kt("manualInputEl"), y = kt("numBox");
1524
- let C = -1;
1525
- const h = b(() => o.value ? V.colors.primary : V.colors.secondary), s = b(() => ({
1537
+ const a = e, i = t, o = g(!1), n = g(!1), r = g(i.modelValue), h = kt("manualInputEl"), y = kt("numBox");
1538
+ let w = -1;
1539
+ const l = C(() => o.value ? V.colors.primary : V.colors.secondary), s = C(() => ({
1526
1540
  "--border-color": `${V.colors.secondary}`,
1527
1541
  "--numbox-width": i.width ? `${i.width}px` : "auto"
1528
- })), f = b(() => i.maxValue - i.minValue);
1529
- N(() => i.modelValue, (v) => r.value = v);
1542
+ })), f = C(() => i.maxValue - i.minValue);
1543
+ B(() => i.modelValue, (v) => r.value = v);
1530
1544
  function m() {
1531
1545
  n.value = !0, r.value = i.modelValue, Yt().then(() => {
1532
- d.value?.select(), document.addEventListener("mouseup", p);
1546
+ h.value?.select(), document.addEventListener("mouseup", p);
1533
1547
  });
1534
1548
  }
1535
1549
  function p(v) {
@@ -1549,15 +1563,15 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1549
1563
  ), n.value = !1, document.removeEventListener("mouseup", p);
1550
1564
  }
1551
1565
  function A(v) {
1552
- n.value || (v.preventDefault(), document.addEventListener("mousemove", l), document.addEventListener("touchmove", u), document.addEventListener("mouseup", P), document.addEventListener("touchend", P));
1566
+ n.value || (v.preventDefault(), document.addEventListener("mousemove", d), document.addEventListener("touchmove", u), document.addEventListener("mouseup", P), document.addEventListener("touchend", P));
1553
1567
  }
1554
1568
  function P() {
1555
- o.value = !1, document.removeEventListener("mousemove", l), document.removeEventListener("touchmove", u), document.removeEventListener("mouseup", P), document.removeEventListener("touchend", P), C = -1;
1569
+ o.value = !1, document.removeEventListener("mousemove", d), document.removeEventListener("touchmove", u), document.removeEventListener("mouseup", P), document.removeEventListener("touchend", P), w = -1;
1556
1570
  }
1557
1571
  function U(v) {
1558
- if (o.value = !0, C >= 0) {
1559
- const B = C - v, F = H(
1560
- i.modelValue + B / Ca * (f.value / 2),
1572
+ if (o.value = !0, w >= 0) {
1573
+ const N = w - v, F = H(
1574
+ i.modelValue + N / ba * (f.value / 2),
1561
1575
  i.minValue,
1562
1576
  i.maxValue
1563
1577
  );
@@ -1565,12 +1579,12 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1565
1579
  }
1566
1580
  }
1567
1581
  function u(v) {
1568
- v.touches[0] && (U(v.touches[0].pageY), C = v.touches[0].pageY);
1582
+ v.touches[0] && (U(v.touches[0].pageY), w = v.touches[0].pageY);
1569
1583
  }
1570
- function l(v) {
1571
- U(v.pageY), C = v.pageY;
1584
+ function d(v) {
1585
+ U(v.pageY), w = v.pageY;
1572
1586
  }
1573
- return (v, B) => (k(), x("div", {
1587
+ return (v, N) => (k(), x("div", {
1574
1588
  ref_key: "numBox",
1575
1589
  ref: y,
1576
1590
  class: ut(["numbox", { "show-border": t.showBorder }]),
@@ -1581,7 +1595,7 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1581
1595
  (k(), x("svg", va, [
1582
1596
  c("polygon", {
1583
1597
  points: "0,0 0,12 8,6",
1584
- fill: h.value
1598
+ fill: l.value
1585
1599
  }, null, 8, xa)
1586
1600
  ])),
1587
1601
  n.value ? Dt("", !0) : (k(), x("span", ka, R(t.modelValue), 1)),
@@ -1589,18 +1603,18 @@ const ya = /* @__PURE__ */ D(Je, [["render", ga], ["__scopeId", "data-v-f87b5263
1589
1603
  key: 1,
1590
1604
  id: "manualInputEl",
1591
1605
  ref_key: "manualInputEl",
1592
- ref: d,
1606
+ ref: h,
1593
1607
  type: "number",
1594
1608
  min: t.minValue,
1595
1609
  max: t.maxValue,
1596
- "onUpdate:modelValue": B[0] || (B[0] = (F) => r.value = F),
1610
+ "onUpdate:modelValue": N[0] || (N[0] = (F) => r.value = F),
1597
1611
  onKeydown: M
1598
1612
  }, null, 40, wa)), [
1599
1613
  [Ft, r.value]
1600
1614
  ]) : Dt("", !0)
1601
1615
  ], 38));
1602
1616
  }
1603
- }), Ma = /* @__PURE__ */ D(ba, [["__scopeId", "data-v-41e990e3"]]);
1617
+ }), Ma = /* @__PURE__ */ D(Ca, [["__scopeId", "data-v-41e990e3"]]);
1604
1618
  class Sa {
1605
1619
  _minusInputMin;
1606
1620
  _plusOutputMin;
@@ -1639,36 +1653,37 @@ const Va = { class: "matrix-row header" }, Da = { class: "matrix-cell source-lab
1639
1653
  required: !0
1640
1654
  },
1641
1655
  loggerNode: {
1642
- type: AudioNode,
1656
+ type: Object,
1657
+ // type: AudioNode
1643
1658
  required: !1
1644
1659
  }
1645
1660
  },
1646
1661
  setup(t) {
1647
1662
  const e = t, a = g(), i = g([]);
1648
1663
  let o = [];
1649
- N(() => e.sources, (h, s) => {
1650
- C(s, e.destinations), y(h, e.destinations);
1651
- }), N(() => e.destinations, (h, s) => {
1652
- C(e.sources), y(e.sources, h);
1664
+ B(() => e.sources, (l, s) => {
1665
+ w(s, e.destinations), y(l, e.destinations);
1666
+ }), B(() => e.destinations, (l, s) => {
1667
+ w(e.sources), y(e.sources, l);
1653
1668
  });
1654
- function n(h, s) {
1655
- h.modAmountNode.gain.setValueAtTime(s, a.value.currentTime);
1669
+ function n(l, s) {
1670
+ l.modAmountNode.gain.setValueAtTime(s, a.value.currentTime);
1656
1671
  }
1657
- function r(h, s) {
1658
- s.ratioSum = new GainNode(h, { gain: 1 }), s.sourceCells.forEach(((f) => {
1672
+ function r(l, s) {
1673
+ s.ratioSum = new GainNode(l, { gain: 1 }), s.sourceCells.forEach(((f) => {
1659
1674
  s.ratioSum && f.modAmountNode.connect(s.ratioSum);
1660
- })), s.clamper = new WaveShaperNode(h, { curve: [0, 0, 1] }), s.ratioSum.connect(s.clamper), s.outputScaler = new Sa(h, 0, 1, s.destination.minValue, s.destination.maxValue), s.clamper.connect(s.outputScaler.input), s.output = s.outputScaler.output, (s.destination.node instanceof AudioParam || s.destination.node instanceof AudioNode) && s.output.connect(s.destination.node);
1675
+ })), s.clamper = new WaveShaperNode(l, { curve: [0, 0, 1] }), s.ratioSum.connect(s.clamper), s.outputScaler = new Sa(l, 0, 1, s.destination.minValue, s.destination.maxValue), s.clamper.connect(s.outputScaler.input), s.output = s.outputScaler.output, (s.destination.node instanceof AudioParam || s.destination.node instanceof AudioNode) && s.output.connect(s.destination.node);
1661
1676
  }
1662
- function d(h) {
1663
- h.sourceCells.forEach((s) => {
1677
+ function h(l) {
1678
+ l.sourceCells.forEach((s) => {
1664
1679
  s.modAmountNode.disconnect();
1665
- }), h.ratioSum?.disconnect(), h.ratioSum = void 0, h.clamper?.disconnect(), h.clamper = void 0;
1680
+ }), l.ratioSum?.disconnect(), l.ratioSum = void 0, l.clamper?.disconnect(), l.clamper = void 0;
1666
1681
  }
1667
- function y(h, s) {
1668
- if (h.length > 0 && (a.value = h[0]?.node.context), !a.value)
1682
+ function y(l, s) {
1683
+ if (l.length > 0 && (a.value = l[0]?.node.context), !a.value)
1669
1684
  return;
1670
1685
  const f = a.value, m = [];
1671
- h.forEach((p) => {
1686
+ l.forEach((p) => {
1672
1687
  const M = [];
1673
1688
  s.forEach((A) => {
1674
1689
  const P = new GainNode(f, { gain: 0 }), U = new Ga(f, p.minValue, p.maxValue);
@@ -1690,16 +1705,16 @@ const Va = { class: "matrix-row header" }, Da = { class: "matrix-cell source-lab
1690
1705
  r(f, M), o.push(M);
1691
1706
  });
1692
1707
  }
1693
- function C(h, s) {
1694
- h.forEach((f) => {
1708
+ function w(l, s) {
1709
+ l.forEach((f) => {
1695
1710
  i.value.shift()?.forEach((p) => {
1696
1711
  p.source.node.disconnect(p.signalToRatioConverter.input), p.signalToRatioConverter.dispose(), p.modAmountNode.disconnect();
1697
1712
  });
1698
1713
  }), i.value = [], o.forEach((f) => {
1699
- d(f);
1714
+ h(f);
1700
1715
  }), o = [];
1701
1716
  }
1702
- return (h, s) => {
1717
+ return (l, s) => {
1703
1718
  const f = et("v-a-num-box");
1704
1719
  return k(), x("div", null, [
1705
1720
  c("div", Va, [
@@ -1731,7 +1746,7 @@ const Va = { class: "matrix-row header" }, Da = { class: "matrix-cell source-lab
1731
1746
  ]);
1732
1747
  };
1733
1748
  }
1734
- }), Aa = /* @__PURE__ */ D($a, [["__scopeId", "data-v-c8b43eec"]]), K = g(!1), Pa = T({
1749
+ }), Aa = /* @__PURE__ */ D($a, [["__scopeId", "data-v-778558a2"]]), K = g(!1), Pa = T({
1735
1750
  emits: [
1736
1751
  "keySlideOn",
1737
1752
  "keySlideOff",
@@ -1767,51 +1782,51 @@ const Va = { class: "matrix-row header" }, Da = { class: "matrix-cell source-lab
1767
1782
  ];
1768
1783
  let n = t.startingOctave * 12;
1769
1784
  function r(u) {
1770
- const l = o.findIndex((v) => v === u.code);
1771
- if (l > -1) {
1772
- const v = l + n;
1785
+ const d = o.findIndex((v) => v === u.code);
1786
+ if (d > -1) {
1787
+ const v = d + n;
1773
1788
  y(v), e.emit("keyboardKeyDown", v);
1774
1789
  }
1775
1790
  }
1776
- function d(u) {
1777
- const l = o.findIndex((v) => v === u.code);
1778
- if (l > -1) {
1779
- const v = l + n;
1780
- C(v), e.emit("keyboardKeyUp", v);
1791
+ function h(u) {
1792
+ const d = o.findIndex((v) => v === u.code);
1793
+ if (d > -1) {
1794
+ const v = d + n;
1795
+ w(v), e.emit("keyboardKeyUp", v);
1781
1796
  } else u.code === "KeyZ" ? n -= 12 : u.code === "KeyX" ? n += 12 : u.code === "KeyC" || u.code;
1782
1797
  }
1783
1798
  function y(u) {
1784
- const l = document.querySelector(`#key${u}`);
1785
- l != null && (l.style.background = a);
1799
+ const d = document.querySelector(`#key${u}`);
1800
+ d != null && (d.style.background = a);
1786
1801
  }
1787
- function C(u) {
1788
- const l = document.querySelector(`#key${u}`);
1789
- l != null && (l.style.background = i.includes(u % 12) ? "black" : "white");
1802
+ function w(u) {
1803
+ const d = document.querySelector(`#key${u}`);
1804
+ d != null && (d.style.background = i.includes(u % 12) ? "black" : "white");
1790
1805
  }
1791
- function h(u) {
1792
- const l = u.target;
1793
- return parseInt(l.id.replace("key", ""));
1806
+ function l(u) {
1807
+ const d = u.target;
1808
+ return parseInt(d.id.replace("key", ""));
1794
1809
  }
1795
1810
  function s(u) {
1796
1811
  if (!K.value) return;
1797
- const l = h(u);
1798
- u.stopPropagation(), t.disabled || (y(l), e.emit("keySlideOn", l));
1812
+ const d = l(u);
1813
+ u.stopPropagation(), t.disabled || (y(d), e.emit("keySlideOn", d));
1799
1814
  }
1800
1815
  function f(u) {
1801
1816
  if (!K.value) return;
1802
1817
  u.stopPropagation();
1803
- const l = h(u);
1804
- t.disabled || (C(l), e.emit("keySlideOff", l));
1818
+ const d = l(u);
1819
+ t.disabled || (w(d), e.emit("keySlideOff", d));
1805
1820
  }
1806
1821
  function m(u) {
1807
1822
  u.stopPropagation(), K.value = !0;
1808
- const l = h(u);
1809
- t.disabled || (y(l), e.emit("keyMouseDown", l));
1823
+ const d = l(u);
1824
+ t.disabled || (y(d), e.emit("keyMouseDown", d));
1810
1825
  }
1811
1826
  function p(u) {
1812
1827
  u.stopPropagation(), K.value = !1;
1813
- const l = h(u);
1814
- t.disabled || (C(l), e.emit("keyMouseUp", h(u)));
1828
+ const d = l(u);
1829
+ t.disabled || (w(d), e.emit("keyMouseUp", l(u)));
1815
1830
  }
1816
1831
  function M() {
1817
1832
  K.value = !0;
@@ -1820,31 +1835,31 @@ const Va = { class: "matrix-row header" }, Da = { class: "matrix-cell source-lab
1820
1835
  K.value = !1;
1821
1836
  }
1822
1837
  function A() {
1823
- document.addEventListener("mousedown", M), document.addEventListener("mouseup", $), document.addEventListener("keydown", r), document.addEventListener("keyup", d);
1838
+ document.addEventListener("mousedown", M), document.addEventListener("mouseup", $), document.addEventListener("keydown", r), document.addEventListener("keyup", h);
1824
1839
  const u = document.querySelectorAll(
1825
1840
  "div.keyboard div.key, div.keyboard div.black-key"
1826
1841
  );
1827
- for (const l of u)
1828
- l.addEventListener("mousedown", m), l.addEventListener("mouseup", p), l.addEventListener("mouseover", s), l.addEventListener("mouseout", f), l.addEventListener("touchstart", m), l.addEventListener("touchend", p);
1842
+ for (const d of u)
1843
+ d.addEventListener("mousedown", m), d.addEventListener("mouseup", p), d.addEventListener("mouseover", s), d.addEventListener("mouseout", f), d.addEventListener("touchstart", m), d.addEventListener("touchend", p);
1829
1844
  }
1830
1845
  function P() {
1831
- document.removeEventListener("mousedown", M), document.removeEventListener("mouseup", $), document.removeEventListener("keydown", r), document.removeEventListener("keyup", d);
1846
+ document.removeEventListener("mousedown", M), document.removeEventListener("mouseup", $), document.removeEventListener("keydown", r), document.removeEventListener("keyup", h);
1832
1847
  const u = document.querySelectorAll(
1833
1848
  "div.keyboard div.key, div.keyboard div.black-key"
1834
1849
  );
1835
- for (const l of u)
1836
- l.removeEventListener("mousedown", m), l.removeEventListener("mouseup", p), l.removeEventListener("mouseover", s), l.removeEventListener("mouseout", f), l.removeEventListener("touchstart", m), l.removeEventListener("touchend", p);
1850
+ for (const d of u)
1851
+ d.removeEventListener("mousedown", m), d.removeEventListener("mouseup", p), d.removeEventListener("mouseover", s), d.removeEventListener("mouseout", f), d.removeEventListener("touchstart", m), d.removeEventListener("touchend", p);
1837
1852
  }
1838
1853
  function U() {
1839
1854
  P(), A();
1840
1855
  }
1841
- Ct(() => {
1856
+ bt(() => {
1842
1857
  A();
1843
1858
  }), _t(() => {
1844
1859
  P();
1845
- }), N(() => t.numOctaves, U);
1860
+ }), B(() => t.numOctaves, U);
1846
1861
  }
1847
- }), Ta = ["id"], Ua = ["id"], Ia = ["id"], Ea = ["id"], Wa = ["id"], Oa = ["id"], qa = ["id"], La = ["id"], za = ["id"], Ra = ["id"], Na = ["id"], Ba = ["id"];
1862
+ }), Ta = ["id"], Ua = ["id"], Ia = ["id"], Ea = ["id"], Oa = ["id"], Wa = ["id"], qa = ["id"], La = ["id"], za = ["id"], Ra = ["id"], Ba = ["id"], Na = ["id"];
1848
1863
  function Ha(t, e, a, i, o, n) {
1849
1864
  return k(), x("div", {
1850
1865
  class: ut(["keyboard", t.disabled ? "disabled" : ""])
@@ -1874,7 +1889,7 @@ function Ha(t, e, a, i, o, n) {
1874
1889
  c("div", {
1875
1890
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 4}`,
1876
1891
  class: "key"
1877
- }, null, 8, Wa),
1892
+ }, null, 8, Oa),
1878
1893
  c("div", {
1879
1894
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 5}`,
1880
1895
  class: "key"
@@ -1883,7 +1898,7 @@ function Ha(t, e, a, i, o, n) {
1883
1898
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 6}`,
1884
1899
  class: "black-key"
1885
1900
  }, null, 8, qa)
1886
- ], 8, Oa),
1901
+ ], 8, Wa),
1887
1902
  c("div", {
1888
1903
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 7}`,
1889
1904
  class: "key"
@@ -1900,12 +1915,12 @@ function Ha(t, e, a, i, o, n) {
1900
1915
  c("div", {
1901
1916
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 10}`,
1902
1917
  class: "black-key"
1903
- }, null, 8, Na)
1918
+ }, null, 8, Ba)
1904
1919
  ], 8, Ra),
1905
1920
  c("div", {
1906
1921
  id: `key${t.startingOctave * 12 + (r - 1) * 12 + 11}`,
1907
1922
  class: "key"
1908
- }, null, 8, Ba)
1923
+ }, null, 8, Na)
1909
1924
  ]))), 128))
1910
1925
  ], 2);
1911
1926
  }