@tspro/web-music-score 3.1.0 → 3.2.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.
- package/CHANGELOG.md +17 -0
- package/README.md +5 -3
- package/dist/audio/index.d.mts +1 -8
- package/dist/audio/index.d.ts +1 -8
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.d.mts +0 -1
- package/dist/audio-cg/index.d.ts +0 -1
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-B4J3KED2.mjs → chunk-LCTM7BID.mjs} +2 -2
- package/dist/core/index.d.mts +0 -3
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/{guitar-BIFwFT31.d.ts → guitar-C2Cp71NZ.d.ts} +1 -8
- package/dist/{guitar-zASF7B1g.d.mts → guitar-DggbM2UL.d.mts} +1 -8
- package/dist/iife/index.global.js +11 -11
- package/dist/{interface-DprVf__B.d.ts → interface-BlNl69uT.d.ts} +57 -77
- package/dist/{interface-BedxdQDE.d.mts → interface-Bn5HFt_U.d.mts} +57 -77
- package/dist/{note-B5ZtlHc8.d.mts → note-BFa43I86.d.mts} +0 -14
- package/dist/{note-B5ZtlHc8.d.ts → note-BFa43I86.d.ts} +0 -14
- package/dist/pieces/index.d.mts +3 -6
- package/dist/pieces/index.d.ts +3 -6
- package/dist/pieces/index.js +1 -1
- package/dist/pieces/index.mjs +2 -2
- package/dist/react-ui/index.d.mts +5 -23
- package/dist/react-ui/index.d.ts +5 -23
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-B_2MZaT9.d.ts → scale-DRR-t4Kr.d.mts} +2 -15
- package/dist/{scale-C-YS5iVG.d.mts → scale-ebJm37q1.d.ts} +2 -15
- package/dist/score/index.d.mts +18 -18
- package/dist/score/index.d.ts +18 -18
- package/dist/score/index.js +376 -229
- package/dist/score/index.mjs +377 -230
- package/dist/{tempo-TjQKn46X.d.mts → tempo-B4h5Ktob.d.mts} +1 -17
- package/dist/{tempo-DoJd-UYT.d.ts → tempo-DgqDEsn0.d.ts} +1 -17
- package/dist/theory/index.d.mts +6 -8
- package/dist/theory/index.d.ts +6 -8
- package/dist/theory/index.js +1 -1
- package/dist/theory/index.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.2.0] - 2025-09-12
|
|
4
|
+
## Added
|
|
5
|
+
- Added getter functions to score interface (MDocument, MMeasure, etc.)
|
|
6
|
+
|
|
7
|
+
## Fixed
|
|
8
|
+
- Extension line tip direction.
|
|
9
|
+
- Cursor top was always 0 (top of document instead of top of row).
|
|
10
|
+
- Pick accidental.
|
|
11
|
+
|
|
12
|
+
## Changed
|
|
13
|
+
- Do not pick note groups, rests and rhythm columns (only visible with multiple staff/tab anyway).
|
|
14
|
+
|
|
15
|
+
## [3.1.1] - 2025-09-10
|
|
16
|
+
## Fixed
|
|
17
|
+
- Accept array of staff/tab/group for addFermataTo(), addNavigationTo(), addAnnotationTo() and addLabelTo().
|
|
18
|
+
- Better infinite recursion detection for staff groups.
|
|
19
|
+
|
|
3
20
|
## [3.1.0] - 2025-09-09
|
|
4
21
|
## Added
|
|
5
22
|
- Staff/TabConfig.name.
|
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ builder.setScoreConfiguration(config: (Score.StaffConfig | Score.TabConfig)[]);
|
|
|
144
144
|
* `type`: "staff"
|
|
145
145
|
* `clef`: Clef can be `Score.Clef.G` or `Score.Clef.F`.
|
|
146
146
|
* `isOctaveDown`: boolean (optional)
|
|
147
|
+
* `name`: staff name.
|
|
147
148
|
* `minNote`: string (optional), minimum note allowed in staff.
|
|
148
149
|
* `maxNote`: string (optional), maximum note allowed in staff.
|
|
149
150
|
* `voiceIds`: number[] (optional), array of voice ids are visible on this staff.
|
|
@@ -151,6 +152,7 @@ builder.setScoreConfiguration(config: (Score.StaffConfig | Score.TabConfig)[]);
|
|
|
151
152
|
|
|
152
153
|
`TabConfig` contains following properties:
|
|
153
154
|
* `type`: "tab"
|
|
155
|
+
* `name`: tab name.
|
|
154
156
|
* `tuning`: string | string[] (optional), tuning name or array of 6 note names for tuning.
|
|
155
157
|
* `voiceIds`: number[] (optional), array of voice ids are visible on this tab.
|
|
156
158
|
|
|
@@ -395,13 +397,13 @@ There are alternatives to these functions:
|
|
|
395
397
|
|
|
396
398
|
First argument of these alterate functions is:
|
|
397
399
|
|
|
398
|
-
`
|
|
400
|
+
`staffTabOrGroups: Score.StaffTabOrGroups`.
|
|
399
401
|
|
|
400
|
-
|
|
402
|
+
`StaffTabOrGroups` can be:
|
|
401
403
|
- `number`: staff/tab index, 0=top staff/tab, etc.
|
|
402
404
|
- `string`: staff/tab name.
|
|
403
405
|
- `string`: staff group name.
|
|
404
|
-
-
|
|
406
|
+
- `(number | string)[]`: an array of staff/tab indices, names or group names.
|
|
405
407
|
|
|
406
408
|
```js
|
|
407
409
|
// Example: add label to top staff/tab.
|
package/dist/audio/index.d.mts
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { N as Note } from '../note-
|
|
1
|
+
import { N as Note } from '../note-BFa43I86.mjs';
|
|
2
2
|
|
|
3
|
-
/** @public */
|
|
4
3
|
interface Instrument {
|
|
5
4
|
getName(): string;
|
|
6
5
|
playNote(note: string, duration?: number, volume?: number): void;
|
|
7
6
|
stop(): void;
|
|
8
7
|
}
|
|
9
|
-
/** @public */
|
|
10
8
|
declare function getInstrumentList(): ReadonlyArray<string>;
|
|
11
|
-
/** @public */
|
|
12
9
|
declare function getCurrentInstrument(): string;
|
|
13
|
-
/** @public */
|
|
14
10
|
declare function registerInstrument(instr: Instrument): void;
|
|
15
|
-
/** @public */
|
|
16
11
|
declare function setInstrument(instrName: string): void;
|
|
17
|
-
/** @public */
|
|
18
12
|
declare function playNote(note: Note | string | number, duration?: number, linearVolume?: number): void;
|
|
19
|
-
/** @public */
|
|
20
13
|
declare function stop(): void;
|
|
21
14
|
|
|
22
15
|
export { type Instrument, getCurrentInstrument, getInstrumentList, playNote, registerInstrument, setInstrument, stop };
|
package/dist/audio/index.d.ts
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { N as Note } from '../note-
|
|
1
|
+
import { N as Note } from '../note-BFa43I86.js';
|
|
2
2
|
|
|
3
|
-
/** @public */
|
|
4
3
|
interface Instrument {
|
|
5
4
|
getName(): string;
|
|
6
5
|
playNote(note: string, duration?: number, volume?: number): void;
|
|
7
6
|
stop(): void;
|
|
8
7
|
}
|
|
9
|
-
/** @public */
|
|
10
8
|
declare function getInstrumentList(): ReadonlyArray<string>;
|
|
11
|
-
/** @public */
|
|
12
9
|
declare function getCurrentInstrument(): string;
|
|
13
|
-
/** @public */
|
|
14
10
|
declare function registerInstrument(instr: Instrument): void;
|
|
15
|
-
/** @public */
|
|
16
11
|
declare function setInstrument(instrName: string): void;
|
|
17
|
-
/** @public */
|
|
18
12
|
declare function playNote(note: Note | string | number, duration?: number, linearVolume?: number): void;
|
|
19
|
-
/** @public */
|
|
20
13
|
declare function stop(): void;
|
|
21
14
|
|
|
22
15
|
export { type Instrument, getCurrentInstrument, getInstrumentList, playNote, registerInstrument, setInstrument, stop };
|
package/dist/audio/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist/audio/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LCTM7BID.mjs";
|
|
5
5
|
|
|
6
6
|
// src/audio/index.ts
|
|
7
7
|
import { Note, PitchNotation, SymbolSet } from "@tspro/web-music-score/theory";
|
package/dist/audio-cg/index.d.ts
CHANGED
package/dist/audio-cg/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist/audio-cg/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LCTM7BID.mjs";
|
|
5
5
|
|
|
6
6
|
// src/audio-cg/index.ts
|
|
7
7
|
import * as Tone from "tone";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.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-
|
|
9
|
+
//# sourceMappingURL=chunk-LCTM7BID.mjs.map
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** @public */
|
|
2
1
|
declare enum MusicErrorType {
|
|
3
2
|
Unknown = 0,
|
|
4
3
|
InvalidArg = 1,
|
|
@@ -8,14 +7,12 @@ declare enum MusicErrorType {
|
|
|
8
7
|
Timesignature = 5,
|
|
9
8
|
Score = 6
|
|
10
9
|
}
|
|
11
|
-
/** @public */
|
|
12
10
|
declare class MusicError extends Error {
|
|
13
11
|
readonly type: MusicErrorType;
|
|
14
12
|
constructor(message: string);
|
|
15
13
|
constructor(type: MusicErrorType, message: string);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
/** @public */
|
|
19
16
|
declare function init(): void;
|
|
20
17
|
|
|
21
18
|
export { MusicError, MusicErrorType, init };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** @public */
|
|
2
1
|
declare enum MusicErrorType {
|
|
3
2
|
Unknown = 0,
|
|
4
3
|
InvalidArg = 1,
|
|
@@ -8,14 +7,12 @@ declare enum MusicErrorType {
|
|
|
8
7
|
Timesignature = 5,
|
|
9
8
|
Score = 6
|
|
10
9
|
}
|
|
11
|
-
/** @public */
|
|
12
10
|
declare class MusicError extends Error {
|
|
13
11
|
readonly type: MusicErrorType;
|
|
14
12
|
constructor(message: string);
|
|
15
13
|
constructor(type: MusicErrorType, message: string);
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
/** @public */
|
|
19
16
|
declare function init(): void;
|
|
20
17
|
|
|
21
18
|
export { MusicError, MusicErrorType, init };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.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;
|
|
@@ -61,7 +61,7 @@ function init() {
|
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
initialized = true;
|
|
64
|
-
console.log("%cWebMusicScore v3.
|
|
64
|
+
console.log("%cWebMusicScore v3.2.0 (cjs) initialized.", "background: black; color: white; padding: 2px;");
|
|
65
65
|
}
|
|
66
66
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
67
|
0 && (module.exports = {
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v3.
|
|
1
|
+
/* WebMusicScore v3.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-LCTM7BID.mjs";
|
|
5
5
|
|
|
6
6
|
// src/core/error.ts
|
|
7
7
|
var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
|
|
@@ -35,7 +35,7 @@ function init() {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
initialized = true;
|
|
38
|
-
console.log("%cWebMusicScore v3.
|
|
38
|
+
console.log("%cWebMusicScore v3.2.0 (esm) initialized.", "background: black; color: white; padding: 2px;");
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
41
|
MusicError,
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { N as Note } from './note-
|
|
1
|
+
import { N as Note } from './note-BFa43I86.js';
|
|
2
2
|
|
|
3
|
-
/** @public */
|
|
4
3
|
declare enum Handedness {
|
|
5
4
|
RightHanded = 0,
|
|
6
5
|
LeftHanded = 1
|
|
7
6
|
}
|
|
8
|
-
/** @public */
|
|
9
7
|
declare const DefaultHandedness = Handedness.RightHanded;
|
|
10
|
-
/** @public */
|
|
11
8
|
declare function validateHandedness(h: unknown): Handedness;
|
|
12
|
-
/** @public */
|
|
13
9
|
declare const TuningNameList: ReadonlyArray<string>;
|
|
14
|
-
/** @public */
|
|
15
10
|
declare const DefaultTuningName: string;
|
|
16
|
-
/** @public */
|
|
17
11
|
declare function validateTuningName(tuningName: string): string;
|
|
18
12
|
/**
|
|
19
|
-
* @public
|
|
20
13
|
* @returns Array of open string notes, note for each string.
|
|
21
14
|
*/
|
|
22
15
|
declare function getTuningStrings(tuningName: string): ReadonlyArray<Note>;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { N as Note } from './note-
|
|
1
|
+
import { N as Note } from './note-BFa43I86.mjs';
|
|
2
2
|
|
|
3
|
-
/** @public */
|
|
4
3
|
declare enum Handedness {
|
|
5
4
|
RightHanded = 0,
|
|
6
5
|
LeftHanded = 1
|
|
7
6
|
}
|
|
8
|
-
/** @public */
|
|
9
7
|
declare const DefaultHandedness = Handedness.RightHanded;
|
|
10
|
-
/** @public */
|
|
11
8
|
declare function validateHandedness(h: unknown): Handedness;
|
|
12
|
-
/** @public */
|
|
13
9
|
declare const TuningNameList: ReadonlyArray<string>;
|
|
14
|
-
/** @public */
|
|
15
10
|
declare const DefaultTuningName: string;
|
|
16
|
-
/** @public */
|
|
17
11
|
declare function validateTuningName(tuningName: string): string;
|
|
18
12
|
/**
|
|
19
|
-
* @public
|
|
20
13
|
* @returns Array of open string notes, note for each string.
|
|
21
14
|
*/
|
|
22
15
|
declare function getTuningStrings(tuningName: string): ReadonlyArray<Note>;
|