@tspro/web-music-score 5.4.1 → 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 (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +24 -0
  3. package/README.md +13 -6
  4. package/dist/audio/index.d.mts +1 -1
  5. package/dist/audio/index.d.ts +1 -1
  6. package/dist/audio/index.js +1637 -5
  7. package/dist/audio/index.mjs +9 -6
  8. package/dist/audio-cg/index.js +17487 -46
  9. package/dist/audio-cg/index.mjs +7 -5
  10. package/dist/audio-synth/index.js +18434 -32
  11. package/dist/audio-synth/index.mjs +12 -7
  12. package/dist/{chunk-6P4ECBUH.mjs → chunk-2DCCUAGC.mjs} +3 -3
  13. package/dist/{chunk-5I5KENEC.mjs → chunk-2PEB4HWS.mjs} +2 -2
  14. package/dist/{chunk-A5SMODAT.mjs → chunk-33HIE3HR.mjs} +18 -13
  15. package/dist/chunk-BMKUAUSJ.mjs +101 -0
  16. package/dist/chunk-PCQGQM63.mjs +18381 -0
  17. package/dist/chunk-T6TYLAJE.mjs +3766 -0
  18. package/dist/core/index.js +2 -2
  19. package/dist/core/index.mjs +4 -4
  20. package/dist/{guitar-CNOxM4ZK.d.ts → guitar-CarHGDAt.d.ts} +1 -1
  21. package/dist/{guitar-DXlB-9vK.d.mts → guitar-DK18GZ6h.d.mts} +1 -1
  22. package/dist/iife/audio-cg.global.js +1 -1
  23. package/dist/iife/index.global.js +11 -11
  24. package/dist/{music-objects-DYMqx839.d.mts → music-objects-CcJvZxS6.d.mts} +196 -115
  25. package/dist/{music-objects-DumXKWJp.d.ts → music-objects-l5Ai97QA.d.ts} +196 -115
  26. package/dist/{note-RVXvpfyV.d.mts → note-CJuq5aBy.d.mts} +1 -1
  27. package/dist/{note-RVXvpfyV.d.ts → note-CJuq5aBy.d.ts} +1 -1
  28. package/dist/pieces/index.d.mts +14 -8
  29. package/dist/pieces/index.d.ts +14 -8
  30. package/dist/pieces/index.js +25 -13
  31. package/dist/pieces/index.mjs +25 -14
  32. package/dist/react-ui/index.d.mts +5 -5
  33. package/dist/react-ui/index.d.ts +5 -5
  34. package/dist/react-ui/index.js +2163 -22
  35. package/dist/react-ui/index.mjs +18 -15
  36. package/dist/{scale-C8gHC448.d.mts → scale-DWM4RQco.d.mts} +2 -2
  37. package/dist/{scale-CUYFBo-8.d.ts → scale-DulPFco_.d.ts} +2 -2
  38. package/dist/score/index.d.mts +54 -6
  39. package/dist/score/index.d.ts +54 -6
  40. package/dist/score/index.js +5216 -1078
  41. package/dist/score/index.mjs +1743 -1011
  42. package/dist/{tempo-DwuZsv2T.d.ts → tempo-BnUjm25M.d.ts} +1 -1
  43. package/dist/{tempo-BlCGZuYg.d.mts → tempo-Cxu8vusu.d.mts} +1 -1
  44. package/dist/theory/index.d.mts +6 -6
  45. package/dist/theory/index.d.ts +6 -6
  46. package/dist/theory/index.js +2576 -136
  47. package/dist/theory/index.mjs +41 -49
  48. package/package.json +5 -5
  49. package/dist/chunk-U2ACCEHX.mjs +0 -9
@@ -1,14 +1,17 @@
1
- /* WebMusicScore v5.4.1 | (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-5I5KENEC.mjs";
5
- import "../chunk-U2ACCEHX.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())) {