@tspro/web-music-score 5.4.2 → 5.5.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +24 -0
  3. package/README.md +13 -6
  4. package/dist/audio/index.d.ts +1 -1
  5. package/dist/audio/index.js +1637 -5
  6. package/dist/audio/index.mjs +9 -6
  7. package/dist/audio-cg/index.js +17487 -46
  8. package/dist/audio-cg/index.mjs +7 -5
  9. package/dist/audio-synth/index.js +18434 -32
  10. package/dist/audio-synth/index.mjs +12 -7
  11. package/dist/{chunk-MMWSQGVR.mjs → chunk-2DCCUAGC.mjs} +3 -3
  12. package/dist/{chunk-CVYTUTL6.mjs → chunk-2PEB4HWS.mjs} +2 -2
  13. package/dist/{chunk-42IBAVOC.mjs → chunk-33HIE3HR.mjs} +18 -13
  14. package/dist/chunk-BMKUAUSJ.mjs +101 -0
  15. package/dist/chunk-PCQGQM63.mjs +18381 -0
  16. package/dist/chunk-T6TYLAJE.mjs +3766 -0
  17. package/dist/core/index.js +2 -2
  18. package/dist/core/index.mjs +4 -4
  19. package/dist/{guitar-CNOxM4ZK.d.ts → guitar-CarHGDAt.d.ts} +1 -1
  20. package/dist/iife/audio-cg.global.js +1 -1
  21. package/dist/iife/index.global.js +11 -11
  22. package/dist/{music-objects-DqoO-Sfv.d.mts → music-objects-CcJvZxS6.d.mts} +123 -96
  23. package/dist/{music-objects-T8u8bnNP.d.ts → music-objects-l5Ai97QA.d.ts} +125 -98
  24. package/dist/{note-RVXvpfyV.d.ts → note-CJuq5aBy.d.ts} +1 -1
  25. package/dist/pieces/index.d.mts +12 -6
  26. package/dist/pieces/index.d.ts +14 -8
  27. package/dist/pieces/index.js +25 -13
  28. package/dist/pieces/index.mjs +25 -14
  29. package/dist/react-ui/index.d.mts +1 -1
  30. package/dist/react-ui/index.d.ts +5 -5
  31. package/dist/react-ui/index.js +2163 -22
  32. package/dist/react-ui/index.mjs +18 -15
  33. package/dist/{scale-CUYFBo-8.d.ts → scale-DulPFco_.d.ts} +2 -2
  34. package/dist/score/index.d.mts +51 -3
  35. package/dist/score/index.d.ts +54 -6
  36. package/dist/score/index.js +4828 -872
  37. package/dist/score/index.mjs +1280 -729
  38. package/dist/{tempo-DwuZsv2T.d.ts → tempo-BnUjm25M.d.ts} +1 -1
  39. package/dist/theory/index.d.ts +6 -6
  40. package/dist/theory/index.js +2576 -136
  41. package/dist/theory/index.mjs +41 -49
  42. package/package.json +4 -5
  43. package/dist/chunk-ROBXPR34.mjs +0 -9
@@ -1,14 +1,17 @@
1
- /* WebMusicScore v5.4.2 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.5.0 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  import {
3
3
  linearToDecibels
4
- } from "../chunk-CVYTUTL6.mjs";
5
- import "../chunk-ROBXPR34.mjs";
4
+ } from "../chunk-2PEB4HWS.mjs";
5
+ import {
6
+ guard_exports,
7
+ utils_exports
8
+ } from "../chunk-T6TYLAJE.mjs";
9
+ import "../chunk-BMKUAUSJ.mjs";
6
10
 
7
11
  // src/audio/index.ts
8
12
  import { Note, PitchNotation, SymbolSet } from "@tspro/web-music-score/theory";
9
13
  import { init as initCore, MusicError, MusicErrorType } from "@tspro/web-music-score/core";
10
14
  import { Synthesizer } from "@tspro/web-music-score/audio-synth";
11
- import { Guard, Utils } from "@tspro/ts-utils-lib";
12
15
  initCore();
13
16
  function getNoteName(note) {
14
17
  if (typeof note === "string") {
@@ -34,8 +37,8 @@ function getCurrentInstrument() {
34
37
  return currentInstrument.getName();
35
38
  }
36
39
  function addInstrument(instrument) {
37
- (Guard.isArray(instrument) ? instrument : [instrument]).forEach((instr) => {
38
- if (!Utils.Obj.hasProperties(instr, ["getName", "playNote", "stop"]) || !Guard.isFunction(instr.getName) || !Guard.isFunction(instr.playNote) || !Guard.isFunction(instr.stop)) {
40
+ (guard_exports.isArray(instrument) ? instrument : [instrument]).forEach((instr) => {
41
+ if (!utils_exports.Obj.hasProperties(instr, ["getName", "playNote", "stop"]) || !guard_exports.isFunction(instr.getName) || !guard_exports.isFunction(instr.playNote) || !guard_exports.isFunction(instr.stop)) {
39
42
  throw new MusicError(MusicErrorType.Audio, "Invalid instrument object: " + instr);
40
43
  }
41
44
  if (InstrumentList.some((instr2) => instr2.getName() === instr.getName())) {