web-music-score 0.0.1 → 6.0.0-pre.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/CHANGELOG.md +200 -0
- package/LICENSE +62 -1
- package/README.md +46 -2
- package/dist/audio/index.d.ts +50 -0
- package/dist/audio/index.js +1858 -0
- package/dist/audio/index.mjs +92 -0
- package/dist/audio-cg/index.d.ts +21 -0
- package/dist/audio-cg/index.js +17568 -0
- package/dist/audio-cg/index.mjs +90 -0
- package/dist/audio-synth/index.d.ts +15 -0
- package/dist/audio-synth/index.js +18497 -0
- package/dist/audio-synth/index.mjs +63 -0
- package/dist/chunk-A7C2G7OG.mjs +101 -0
- package/dist/chunk-GNT3ECDB.mjs +267 -0
- package/dist/chunk-LO4NI4AU.mjs +18381 -0
- package/dist/chunk-PW2SO6EZ.mjs +37 -0
- package/dist/chunk-VHB57TXT.mjs +11 -0
- package/dist/chunk-X7BMJX7E.mjs +3867 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +74 -0
- package/dist/core/index.mjs +22 -0
- package/dist/iife/audio-cg.global.js +220 -0
- package/dist/iife/index.global.js +228 -0
- package/dist/instrument-DS-9C6_8.d.ts +44 -0
- package/dist/music-objects-DLmp5uL6.d.ts +2398 -0
- package/dist/note-RVXvpfyV.d.ts +306 -0
- package/dist/pieces/index.d.ts +46 -0
- package/dist/pieces/index.js +79 -0
- package/dist/pieces/index.mjs +50 -0
- package/dist/react-ui/index.d.ts +86 -0
- package/dist/react-ui/index.js +132 -0
- package/dist/react-ui/index.mjs +96 -0
- package/dist/scale-B1M10_fu.d.ts +230 -0
- package/dist/score/index.d.ts +466 -0
- package/dist/score/index.js +13964 -0
- package/dist/score/index.mjs +10092 -0
- package/dist/tempo-D-JF-8b_.d.ts +409 -0
- package/dist/theory/index.d.ts +78 -0
- package/dist/theory/index.js +4842 -0
- package/dist/theory/index.mjs +1986 -0
- package/package.json +131 -3
- package/workspace.code-workspace +0 -9
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
|
+
import {
|
|
3
|
+
__publicField
|
|
4
|
+
} from "./chunk-A7C2G7OG.mjs";
|
|
5
|
+
|
|
6
|
+
// src/core/error.ts
|
|
7
|
+
var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
|
|
8
|
+
MusicErrorType2[MusicErrorType2["Unknown"] = 0] = "Unknown";
|
|
9
|
+
MusicErrorType2[MusicErrorType2["InvalidArg"] = 1] = "InvalidArg";
|
|
10
|
+
MusicErrorType2[MusicErrorType2["Note"] = 2] = "Note";
|
|
11
|
+
MusicErrorType2[MusicErrorType2["Scale"] = 3] = "Scale";
|
|
12
|
+
MusicErrorType2[MusicErrorType2["KeySignature"] = 4] = "KeySignature";
|
|
13
|
+
MusicErrorType2[MusicErrorType2["Timesignature"] = 5] = "Timesignature";
|
|
14
|
+
MusicErrorType2[MusicErrorType2["Score"] = 6] = "Score";
|
|
15
|
+
MusicErrorType2[MusicErrorType2["Audio"] = 7] = "Audio";
|
|
16
|
+
return MusicErrorType2;
|
|
17
|
+
})(MusicErrorType || {});
|
|
18
|
+
function formatType(type) {
|
|
19
|
+
return type === void 0 ? "" : `[${MusicErrorType[type]}] `;
|
|
20
|
+
}
|
|
21
|
+
var MusicError = class extends Error {
|
|
22
|
+
constructor(...args) {
|
|
23
|
+
const [type, msg] = args.length === 1 ? [0 /* Unknown */, args[0]] : args;
|
|
24
|
+
super(formatType(type) + msg);
|
|
25
|
+
/** Music error type. */
|
|
26
|
+
__publicField(this, "type");
|
|
27
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
28
|
+
this.name = "MusicError";
|
|
29
|
+
this.type = type;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
MusicErrorType,
|
|
35
|
+
MusicError
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-PW2SO6EZ.mjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (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-VHB57TXT.mjs.map
|