@tspro/web-music-score 4.2.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
+
3
+ // src/audio/instrument.ts
4
+ function linearToDecibels(linearVolume) {
5
+ return !isFinite(linearVolume) || linearVolume <= 0 ? -Infinity : 20 * Math.log10(linearVolume);
6
+ }
7
+
8
+ export {
9
+ linearToDecibels
10
+ };
11
+ //# sourceMappingURL=chunk-AAL3CMRO.mjs.map
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "./chunk-5NWLGWHS.mjs";
4
+ } from "./chunk-J3KU3U4W.mjs";
5
5
 
6
6
  // src/theory/rhythm.ts
7
7
  import { Utils } from "@tspro/ts-utils-lib";
@@ -261,4 +261,4 @@ export {
261
261
  Tuplet,
262
262
  RhythmProps
263
263
  };
264
- //# sourceMappingURL=chunk-7MNV5JN6.mjs.map
264
+ //# sourceMappingURL=chunk-EYFT3RWB.mjs.map
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -6,4 +6,4 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6
6
  export {
7
7
  __publicField
8
8
  };
9
- //# sourceMappingURL=chunk-5NWLGWHS.mjs.map
9
+ //# sourceMappingURL=chunk-J3KU3U4W.mjs.map
@@ -6,7 +6,8 @@ declare enum MusicErrorType {
6
6
  Scale = 3,
7
7
  KeySignature = 4,
8
8
  Timesignature = 5,
9
- Score = 6
9
+ Score = 6,
10
+ Audio = 7
10
11
  }
11
12
  /** Music error class. */
12
13
  declare class MusicError extends Error {
@@ -6,7 +6,8 @@ declare enum MusicErrorType {
6
6
  Scale = 3,
7
7
  KeySignature = 4,
8
8
  Timesignature = 5,
9
- Score = 6
9
+ Score = 6,
10
+ Audio = 7
10
11
  }
11
12
  /** Music error class. */
12
13
  declare class MusicError extends Error {
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -38,6 +38,7 @@ var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
38
38
  MusicErrorType2[MusicErrorType2["KeySignature"] = 4] = "KeySignature";
39
39
  MusicErrorType2[MusicErrorType2["Timesignature"] = 5] = "Timesignature";
40
40
  MusicErrorType2[MusicErrorType2["Score"] = 6] = "Score";
41
+ MusicErrorType2[MusicErrorType2["Audio"] = 7] = "Audio";
41
42
  return MusicErrorType2;
42
43
  })(MusicErrorType || {});
43
44
  function formatType(type) {
@@ -62,7 +63,7 @@ function init() {
62
63
  return;
63
64
  }
64
65
  initialized = true;
65
- console.log("%cWebMusicScore v4.2.0 (cjs) initialized.", "background: black; color: white; padding: 2px;");
66
+ console.log("%cWebMusicScore v5.0.0 (cjs) initialized.", "background: black; color: white; padding: 2px;");
66
67
  }
67
68
  // Annotate the CommonJS export names for ESM import in node:
68
69
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v4.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-5NWLGWHS.mjs";
4
+ } from "../chunk-J3KU3U4W.mjs";
5
5
 
6
6
  // src/core/error.ts
7
7
  var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
@@ -12,6 +12,7 @@ var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
12
12
  MusicErrorType2[MusicErrorType2["KeySignature"] = 4] = "KeySignature";
13
13
  MusicErrorType2[MusicErrorType2["Timesignature"] = 5] = "Timesignature";
14
14
  MusicErrorType2[MusicErrorType2["Score"] = 6] = "Score";
15
+ MusicErrorType2[MusicErrorType2["Audio"] = 7] = "Audio";
15
16
  return MusicErrorType2;
16
17
  })(MusicErrorType || {});
17
18
  function formatType(type) {
@@ -36,7 +37,7 @@ function init() {
36
37
  return;
37
38
  }
38
39
  initialized = true;
39
- console.log("%cWebMusicScore v4.2.0 (esm) initialized.", "background: black; color: white; padding: 2px;");
40
+ console.log("%cWebMusicScore v5.0.0 (esm) initialized.", "background: black; color: white; padding: 2px;");
40
41
  }
41
42
  export {
42
43
  MusicError,