@tspro/web-music-score 2.0.0 → 3.0.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 +20 -0
- package/README.md +146 -64
- package/dist/audio/index.d.mts +1 -1
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +2 -2
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +2 -2
- package/dist/{chunk-2EPWQZKJ.mjs → chunk-4AS76G4O.mjs} +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +3 -3
- package/dist/{guitar-kbJYu3Am.d.mts → guitar-zASF7B1g.d.mts} +1 -1
- package/dist/iife/index.global.js +11 -12
- package/dist/interface-1TQHxSpb.d.ts +1769 -0
- package/dist/interface-DkUnsAjj.d.mts +1769 -0
- package/dist/{note-CraqEy8x.d.mts → note-B5ZtlHc8.d.mts} +1 -1
- package/dist/pieces/index.d.mts +3 -3
- package/dist/pieces/index.d.ts +2 -2
- package/dist/pieces/index.js +4 -52
- package/dist/pieces/index.mjs +8 -56
- package/dist/react-ui/index.d.mts +5 -4
- package/dist/react-ui/index.d.ts +3 -2
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/scale-B_2MZaT9.d.ts +87 -0
- package/dist/scale-C-YS5iVG.d.mts +87 -0
- package/dist/score/index.d.mts +42 -1557
- package/dist/score/index.d.ts +42 -1557
- package/dist/score/index.js +2863 -2045
- package/dist/score/index.mjs +2829 -2021
- package/dist/tempo-DoJd-UYT.d.ts +120 -0
- package/dist/tempo-TjQKn46X.d.mts +120 -0
- package/dist/theory/index.d.mts +6 -5
- package/dist/theory/index.d.ts +3 -2
- package/dist/theory/index.js +1 -1
- package/dist/theory/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/tempo--588tdcv.d.ts +0 -203
- package/dist/tempo-BEJBHZ5I.d.mts +0 -203
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.1] - 2025-09-03
|
|
4
|
+
|
|
5
|
+
## Fixed
|
|
6
|
+
- Draw arpeggio curly arrow also to guitar tab.
|
|
7
|
+
|
|
8
|
+
## [3.0.0] - 2025-08-31
|
|
9
|
+
Major update and brought some important changes.
|
|
10
|
+
### ** Breaking Changes **
|
|
11
|
+
- Removed old way of creating scores using MDocument, MMeasure, etc. Use DocumentBuilder instead.
|
|
12
|
+
- Removed DocumentOptions. Replaced using functions addScoreConfiguration() and setMeasuresPerRow() in DocumentBuilder.
|
|
13
|
+
- Tie and slur removed from NoteOptions. Use addConnective() in DocumentBuilder.
|
|
14
|
+
|
|
15
|
+
## Added
|
|
16
|
+
- Score configuration with multiple staves and tabs per row.
|
|
17
|
+
- Connective.Slide.
|
|
18
|
+
- Draw Connectives in tabs.
|
|
19
|
+
|
|
20
|
+
## Changed
|
|
21
|
+
- Lots of undocumented fixes, changes and improvements.
|
|
22
|
+
|
|
3
23
|
## [2.0.0] - 2025-07-28
|
|
4
24
|
Major update and brought many changes.
|
|
5
25
|
### ** Breaking Changes **
|
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# WebMusicScore
|
|
2
2
|
|
|
3
|
+
Typedoc API Reference, Examples and Demos can be found [here](https://pahkasoft.github.io). The API Reference is not commented but is mostly self explanatory and gives idea of full API.
|
|
4
|
+
|
|
5
|
+
## About
|
|
6
|
+
|
|
3
7
|
This library allows you to view and play music scores (notation) in the browser.
|
|
4
8
|
|
|
5
9
|
I'm not a professional musician. I began learning classical guitar on my own,
|
|
@@ -21,6 +25,15 @@ This is a work in progress project. Expect changes, bugs, or unexpected behavior
|
|
|
21
25
|
|
|
22
26
|
Enough changes until next major update!
|
|
23
27
|
|
|
28
|
+
## Version 3 Update
|
|
29
|
+
|
|
30
|
+
**Breaking:** Version 3 is another major update and brought some important changes.
|
|
31
|
+
|
|
32
|
+
* Support score configuration with multiple notation lines (combination of staves and tabs).
|
|
33
|
+
* Introduced DocumentBuilder to create scores, removed old way.
|
|
34
|
+
* DocumentOptions functionality is replaced using functions addScoreConfiguration() and setMeasuresPerRow() in DocumentBuilder.
|
|
35
|
+
* Add ties, slurs and slides using addConnective() in DocumentBuilder. Tie and span options removed from NoteOptions.
|
|
36
|
+
|
|
24
37
|
## Installation
|
|
25
38
|
|
|
26
39
|
```sh
|
|
@@ -62,13 +75,13 @@ It declares global variable `WebMusicScore` that contains `Core`, `Audio`, `Theo
|
|
|
62
75
|
and `Pieces` as corresponding subpath modules (excluding `react-ui` and `audio-cg`).
|
|
63
76
|
|
|
64
77
|
```html
|
|
65
|
-
<script src="https://unpkg.com/@tspro/web-music-score@
|
|
78
|
+
<script src="https://unpkg.com/@tspro/web-music-score@3"></script>
|
|
79
|
+
<script src="https://unpkg.com/@tspro/web-music-score@3.0.0"></script>
|
|
80
|
+
<script src="https://unpkg.com/@tspro/web-music-score@3.0.0/dist/iife/index.global.js"></script>
|
|
66
81
|
|
|
67
82
|
<!--
|
|
68
|
-
It is recommended to use version number (e.g. @
|
|
69
|
-
if there is breaking change between versions your code does not stop working.
|
|
70
|
-
|
|
71
|
-
TODO: Add direct link to bundle.
|
|
83
|
+
Use one of above. It is recommended to use version number (e.g. @3.0.0 or at least @3).
|
|
84
|
+
This way if there is breaking change between versions your code does not stop working.
|
|
72
85
|
-->
|
|
73
86
|
|
|
74
87
|
<script>
|
|
@@ -79,66 +92,116 @@ and `Pieces` as corresponding subpath modules (excluding `react-ui` and `audio-c
|
|
|
79
92
|
|
|
80
93
|
## API
|
|
81
94
|
|
|
82
|
-
Typedoc API reference is available [here](https://pahkasoft.github.io). It has no comments but
|
|
83
|
-
is mostly self explanatory and gives idea of full API.
|
|
84
|
-
|
|
85
95
|
Following is the main interface explained.
|
|
86
96
|
|
|
87
|
-
### Create
|
|
97
|
+
### Create DocumentBuilder
|
|
98
|
+
|
|
99
|
+
Documents are created using `DocumentBuilder`.
|
|
88
100
|
|
|
89
101
|
```js
|
|
90
|
-
let
|
|
102
|
+
let builder = new Score.DocumentBuilder();
|
|
103
|
+
|
|
104
|
+
// Here build document, e.g.
|
|
105
|
+
builder
|
|
106
|
+
.addMEasure()
|
|
107
|
+
.addNote(0, "C3", Theory.NoteLength.Quarter)
|
|
108
|
+
// etc.
|
|
109
|
+
|
|
110
|
+
// When ready, get document:
|
|
111
|
+
let doc = builder.getDocument();
|
|
91
112
|
```
|
|
113
|
+
|
|
114
|
+
### Set Score Configuration
|
|
115
|
+
Setting score configuration takes place in first measure of next row.
|
|
116
|
+
|
|
117
|
+
#### Using preset values
|
|
118
|
+
```js
|
|
119
|
+
builder.setScoreConfiguration(staffPreset: Score.StaffPreset);
|
|
120
|
+
```
|
|
121
|
+
|
|
92
122
|
`staffPreset` can be:
|
|
93
123
|
* `Score.StaffPreset.Treble`: Staff with treble (G-) clef.
|
|
94
124
|
* `Score.StaffPreset.Bass`: Staff with bass (F-) clef.
|
|
95
125
|
* `Score.StaffPreset.Grand`: Both treble and bas staves.
|
|
96
|
-
* `Score.StaffPreset.GuitarTreble`: `Treble` but one octave
|
|
126
|
+
* `Score.StaffPreset.GuitarTreble`: Same as `Treble` but one octave down.
|
|
97
127
|
* `Score.StaffPreset.GuitarTab`: Guitar tab only.
|
|
98
128
|
* `Score.StaffPreset.GuitarCombined`: Treble and tab for guitar.
|
|
99
129
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
130
|
+
```js
|
|
131
|
+
// Example
|
|
132
|
+
builder.setScoreConfiguration(Score.StaffPreset.GuitarCombined);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### Using configuration objects
|
|
136
|
+
```js
|
|
137
|
+
builder.setScoreConfiguration(config: Score.StaffConfig | Score.TabConfig);
|
|
138
|
+
builder.setScoreConfiguration(config: (Score.StaffConfig | Score.TabConfig)[]);
|
|
103
139
|
```
|
|
104
140
|
|
|
105
|
-
|
|
141
|
+
`config` is `StaffConfig`, `TabConfig` or array of combination.
|
|
142
|
+
|
|
143
|
+
`StaffConfig` contains following properties:
|
|
144
|
+
* `type`: "staff"
|
|
145
|
+
* `clef`: Clef can be `Score.Clef.G` or `Score.Clef.F`.
|
|
146
|
+
* `isOctaveDown`: boolean (optional)
|
|
147
|
+
* `minNote`: string (optional), minimum note allowed in staff.
|
|
148
|
+
* `maxNote`: string (optional), maximum note allowed in staff.
|
|
149
|
+
* `voiceIds`: number[] (optional), array of voice ids are visible on this staff.
|
|
150
|
+
* `isGrand`: boolean (optional), use this to create grand staff.
|
|
151
|
+
|
|
152
|
+
`TabConfig` contains following properties:
|
|
153
|
+
* `type`: "tab"
|
|
154
|
+
* `tuning`: string | string[] (optional), tuning name or array of 6 note names for tuning.
|
|
155
|
+
* `voiceIds`: number[] (optional), array of voice ids are visible on this tab.
|
|
106
156
|
|
|
107
157
|
```js
|
|
108
|
-
// Example
|
|
109
|
-
|
|
158
|
+
// Example: Staff and tab for guitar
|
|
159
|
+
builder.setScoreConfiguration([
|
|
160
|
+
{ type: "staff", clef: Score.Clef.G, isOctaveDown: true },
|
|
161
|
+
{ type: "tab", tuning: "Drop D" }
|
|
162
|
+
]);
|
|
163
|
+
|
|
164
|
+
// Example: Grand staff
|
|
165
|
+
builder.setScoreConfiguration([
|
|
166
|
+
{ type: "staff", clef: Score.Clef.G, isGrand: true },
|
|
167
|
+
{ type: "staff", clef: Score.Clef.F, isGrand: true }
|
|
168
|
+
]);
|
|
110
169
|
```
|
|
111
170
|
|
|
112
|
-
### Set
|
|
171
|
+
### Set Automatic Measures Per Row
|
|
172
|
+
```ts
|
|
173
|
+
builder.setMesuresPerRow(measuresPerRow: number)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`measuresPerRow` can be integer >= 1, or Infinity (default).
|
|
113
177
|
|
|
178
|
+
### Set Header
|
|
114
179
|
```js
|
|
115
|
-
|
|
180
|
+
builder.setHeader(title?: string, composer?: string, arranger?: string);
|
|
116
181
|
|
|
117
182
|
// Example
|
|
118
|
-
|
|
183
|
+
builder.setHeader("Demo Song");
|
|
119
184
|
```
|
|
120
185
|
|
|
121
186
|
### Add Measure
|
|
122
|
-
|
|
123
187
|
```js
|
|
124
|
-
|
|
188
|
+
builder.addMeasure();
|
|
125
189
|
```
|
|
126
190
|
|
|
127
191
|
### End Row
|
|
128
|
-
|
|
129
192
|
```js
|
|
130
|
-
|
|
193
|
+
builder.endRow();
|
|
131
194
|
```
|
|
132
195
|
|
|
133
|
-
Manually induce row change. Next measure that is added will
|
|
196
|
+
Manually induce row change. Next measure that is added will begin new row.
|
|
134
197
|
|
|
135
|
-
### Set Signature
|
|
198
|
+
### Set Key Signature
|
|
136
199
|
|
|
137
200
|
```js
|
|
138
|
-
|
|
201
|
+
builder.setKeySignature(tonic: string, scaleType: Theory.ScaleType);
|
|
139
202
|
|
|
140
203
|
// Example: Am
|
|
141
|
-
|
|
204
|
+
builder.setKeySignature("A", Theory.ScaleType.Aeolian);
|
|
142
205
|
```
|
|
143
206
|
|
|
144
207
|
`tonic` is scale tonic/root note, e.g. "C" (in "C Major").
|
|
@@ -160,11 +223,12 @@ m.setKeySignature("A", Theory.ScaleType.Aeolian);
|
|
|
160
223
|
- `Theory.ScaleType.MinorHexatonicBlues`
|
|
161
224
|
- `Theory.ScaleType.HeptatonicBlues`
|
|
162
225
|
|
|
226
|
+
### Set Time Signature
|
|
163
227
|
```js
|
|
164
|
-
|
|
228
|
+
builder.setTimeSignature(timeSignature: string);
|
|
165
229
|
|
|
166
230
|
// Example
|
|
167
|
-
|
|
231
|
+
builder.setTimeSignature("3/4");
|
|
168
232
|
```
|
|
169
233
|
|
|
170
234
|
timeSignature can be:
|
|
@@ -174,11 +238,12 @@ timeSignature can be:
|
|
|
174
238
|
- `"6/8"`
|
|
175
239
|
- `"9/8"`
|
|
176
240
|
|
|
241
|
+
### Set Tempo
|
|
177
242
|
```js
|
|
178
|
-
|
|
243
|
+
builder.setTempo(beatsPerMinute: number, beatLength?: Theory.NoteLength, dotted?: boolean);
|
|
179
244
|
|
|
180
245
|
// Example
|
|
181
|
-
|
|
246
|
+
builder.setTempo(100, Theory.NoteLength.Quarter);
|
|
182
247
|
```
|
|
183
248
|
|
|
184
249
|
`beatsPerMinute` is self explanatory.
|
|
@@ -190,12 +255,12 @@ m.setTempo(100, Theory.NoteLength.Quarter);
|
|
|
190
255
|
### Add Note Or Chord
|
|
191
256
|
|
|
192
257
|
```js
|
|
193
|
-
|
|
194
|
-
|
|
258
|
+
builder.addNote(voiceId: number, note: string, noteLength: Theory.NoteLength, noteOptions?: Score.NoteOptions);
|
|
259
|
+
builder.addChord(voiceId: number, notes: string[], noteLength: Theory.NoteLength, noteOptions?: Score.NoteOptions);
|
|
195
260
|
|
|
196
261
|
// Examples
|
|
197
|
-
|
|
198
|
-
|
|
262
|
+
builder.addNote(0, "C4", Theory.NoteLength.Half, { dotted: true });
|
|
263
|
+
builder.addChord(1, ["C3", "E3", "G3"], Theory.NoteLength.Whole, { arpeggio: Score.Arpeggio.Down });
|
|
199
264
|
```
|
|
200
265
|
|
|
201
266
|
`voiceId` can be `0`, `1`, `2` or `3`.
|
|
@@ -222,20 +287,16 @@ m.addChord(1, ["C3", "E3", "G3"], Theory.NoteLength.Whole, { arpeggio: Score.Arp
|
|
|
222
287
|
| arpeggio | `Score.Arpeggio.Up/Down` \| `boolean` | Play column in arpeggio. |
|
|
223
288
|
| staccato | `boolean` | Play column in staccato. |
|
|
224
289
|
| diamond | `boolean` | Diamond shaped note head. |
|
|
225
|
-
| tieSpan | `number` \| `TieType.Stub/ToMeasureEnd` | How many notes this tie spans. |
|
|
226
|
-
| tieAnchor | `Score.NoteAnchor.Auto/Above/Center/Below/StemTip` | Tie attach point. |
|
|
227
|
-
| slurSpan | `number` | How many notes this slur spans. |
|
|
228
|
-
| slurAnchor | `Score.NoteAnchor.Auto/Above/Center/Below/StemTip` | Slur attach point. |
|
|
229
290
|
| triplet | `boolean` | Set this note part of triplet. |
|
|
230
291
|
| string | `number` \| `number[]` | String number for guitar tab. Array of string numbers for chord. |
|
|
231
292
|
|
|
232
293
|
### Add Rest
|
|
233
294
|
|
|
234
295
|
```js
|
|
235
|
-
|
|
296
|
+
builder.addRest(voideId: number, restLength: Theory.NoteLength, restOptions?: Score.RestOptions);
|
|
236
297
|
|
|
237
298
|
// Example
|
|
238
|
-
|
|
299
|
+
builder.addRest(0, Theory.NoteLength.Sixteenth);
|
|
239
300
|
```
|
|
240
301
|
|
|
241
302
|
`voiceId` can be `0`, `1`, `2` or `3`.
|
|
@@ -254,27 +315,47 @@ m.addRest(0, Theory.NoteLength.Sixteenth);
|
|
|
254
315
|
### Add Fermata
|
|
255
316
|
|
|
256
317
|
```js
|
|
257
|
-
|
|
318
|
+
builder.addFermata(fermata?: Score.Fermata);
|
|
258
319
|
|
|
259
320
|
// Example
|
|
260
|
-
|
|
321
|
+
builder.addFermata(Score.Fermata.AtMeasureEnd);
|
|
261
322
|
```
|
|
262
323
|
|
|
263
324
|
`fermata` is typeof `Score.Fermata` and can be:
|
|
264
325
|
- `Score.Fermata.AtNote`: Adds fermata anchored to previously added note, chord or rest.
|
|
265
326
|
- `Score.Fermata.AtMeasureEnd`: Adds fermata at the end of measure.
|
|
266
327
|
|
|
328
|
+
### Add Connective (tie, slur)
|
|
329
|
+
|
|
330
|
+
```js
|
|
331
|
+
// Add tie
|
|
332
|
+
builder.addConnective(connective: Score.Connetive.Tie, span?: Score.ConnectiveSpan, noteAnchor?: Score.NoteAnchor);
|
|
333
|
+
|
|
334
|
+
// Add slur
|
|
335
|
+
builder.addConnective(connective: Score.Connetive.Slur, span?: Score.ConnectiveSpan, noteAnchor?: Score.NoteAnchor);
|
|
336
|
+
|
|
337
|
+
// Add slide
|
|
338
|
+
builder.addConnective(connective: Score.Connetive.Slide, noteAnchor?: Score.NoteAnchor);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
- `span` describes how many notes the connective is across.
|
|
342
|
+
It is integer >= 2 (for tie it can be also `Score.TieType.Stub|ToMeasureEnd`).
|
|
343
|
+
Default value is 2.
|
|
344
|
+
- `noteAnchor` describes the attach point of connective to note.
|
|
345
|
+
It can be `Score.NoteAnchor.Auto|Above|Center|Below|StemTip`.
|
|
346
|
+
Default value is `Score.NoteAnchor.Auto`.
|
|
347
|
+
|
|
267
348
|
### Add Navigation
|
|
268
349
|
|
|
269
350
|
Add navigational element to measure.
|
|
270
351
|
|
|
271
352
|
```js
|
|
272
|
-
|
|
353
|
+
builder.addNavigation(navigation: Score.Navigation, ...args?);
|
|
273
354
|
|
|
274
355
|
// Examples
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
356
|
+
builder.addNavigation(Score.Navigation.StartRepeat);
|
|
357
|
+
builder.addNavigation(Score.Navigation.EndRepeat, 3);
|
|
358
|
+
builder.addNavigation(Score.Navigation.Ending, 1, 2);
|
|
278
359
|
```
|
|
279
360
|
|
|
280
361
|
`navigation` can be:
|
|
@@ -299,10 +380,10 @@ m.addNavigation(Score.Navigation.Ending, 1, 2);
|
|
|
299
380
|
Add text label anchored to previously added note, chord or rest.
|
|
300
381
|
|
|
301
382
|
```js
|
|
302
|
-
|
|
383
|
+
builder.addLabel(label: Score.Label, text: string);
|
|
303
384
|
|
|
304
385
|
// Example
|
|
305
|
-
|
|
386
|
+
builder.addLabel(Score.Label.Chord, "Am);
|
|
306
387
|
```
|
|
307
388
|
|
|
308
389
|
`label` can be:
|
|
@@ -314,10 +395,10 @@ m.addLabel(Score.Label.Chord, "Am);
|
|
|
314
395
|
Add annotation text anchored to previously added note, chord or rest.
|
|
315
396
|
|
|
316
397
|
```js
|
|
317
|
-
|
|
398
|
+
builder.addAnnotation(annotation: Score.Annotation, text: string);
|
|
318
399
|
|
|
319
400
|
// Example
|
|
320
|
-
|
|
401
|
+
builder.addAnnotation(Score.Annotation.Tempo, "accel.");
|
|
321
402
|
```
|
|
322
403
|
|
|
323
404
|
`annotation` can be:
|
|
@@ -329,10 +410,10 @@ m.addAnnotation(Score.Annotation.Tempo, "accel.");
|
|
|
329
410
|
Adds extension line to element, for example to previously added annotation.
|
|
330
411
|
|
|
331
412
|
```js
|
|
332
|
-
|
|
413
|
+
builder.addExtension(extensionLength: number, visible?: boolean);
|
|
333
414
|
|
|
334
415
|
// Example
|
|
335
|
-
|
|
416
|
+
builder.addAnnotation(Score.Annotation.Tempo, "accel.").addExtension(Theory.NoteLength.Whole * 2, true);
|
|
336
417
|
```
|
|
337
418
|
|
|
338
419
|
`extensionLength` is `number` but `Theory.NoteLength` values can be used as number and multiplied to set desired extension length.
|
|
@@ -342,31 +423,32 @@ m.addAnnotation(Score.Annotation.Tempo, "accel.").addExtension(Theory.NoteLength
|
|
|
342
423
|
### Guitar Tab
|
|
343
424
|
|
|
344
425
|
This library has preliminary guitar tabs rendering.
|
|
345
|
-
Create document with `Score.StaffPreset.GuitarTab` or `Score.StaffPreset.GuitarCombined`,
|
|
346
|
-
|
|
347
|
-
```js
|
|
348
|
-
let doc = new Score.MDocument(Score.StaffPreset.GuitarCombined, { tuning: "Standard" });
|
|
349
|
-
```
|
|
426
|
+
Create document with `Score.StaffPreset.GuitarTab` or `Score.StaffPreset.GuitarCombined`, or set score configuration with TabConfig.
|
|
350
427
|
|
|
351
428
|
Add notes with `{ string: number | number[] }` to specify which string the fret number is rendered in guitar tab.
|
|
352
429
|
|
|
353
430
|
```js
|
|
354
431
|
// Single note
|
|
355
|
-
|
|
432
|
+
builder.addNote(0, "G3", Theory.NoteLength.Eighth, { string: 3 });
|
|
356
433
|
|
|
357
434
|
// Multi note
|
|
358
|
-
|
|
435
|
+
builder.addChord(0, ["E4", "C3"], Theory.NoteLength.Eighth, { string: [1, 5] });
|
|
359
436
|
```
|
|
360
437
|
|
|
361
438
|
### Queueing
|
|
362
439
|
|
|
363
|
-
|
|
440
|
+
`DocumentBuilder` operations can be queued.
|
|
364
441
|
|
|
365
442
|
```js
|
|
366
|
-
doc.
|
|
443
|
+
let doc = new Score.DocumentBuilder()
|
|
444
|
+
.addScoreConfiguration({ type: "staff", clef: Score.Clef.G, isOctavewDown: true })
|
|
445
|
+
.setMeasuresPerRow(4)
|
|
446
|
+
.addMeasure()
|
|
367
447
|
.addNote(1, "C3", Theory.NoteLength.Quarter)
|
|
368
448
|
.addChord(1, ["C3", "E3", "G3"], Theory.NoteLength.Quarter).addLabel(Score.Label.Chord, "C")
|
|
369
|
-
.addRest(1, Theory.NoteLength.Quarter)
|
|
449
|
+
.addRest(1, Theory.NoteLength.Quarter)
|
|
450
|
+
// etc.
|
|
451
|
+
.getDEocument();
|
|
370
452
|
```
|
|
371
453
|
|
|
372
454
|
### Beams
|
package/dist/audio/index.d.mts
CHANGED
package/dist/audio/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
1
|
+
/* WebMusicScore v3.0.1 | (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
|
|
1
|
+
/* WebMusicScore v3.0.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4AS76G4O.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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
1
|
+
/* WebMusicScore v3.0.1 | (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
|
|
1
|
+
/* WebMusicScore v3.0.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4AS76G4O.mjs";
|
|
5
5
|
|
|
6
6
|
// src/audio-cg/index.ts
|
|
7
7
|
import * as Tone from "tone";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
1
|
+
/* WebMusicScore v3.0.1 | (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-4AS76G4O.mjs.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore
|
|
1
|
+
/* WebMusicScore v3.0.1 | (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
|
|
64
|
+
console.log("%cWebMusicScore v3.0.1 (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
|
|
1
|
+
/* WebMusicScore v3.0.1 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4AS76G4O.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
|
|
38
|
+
console.log("%cWebMusicScore v3.0.1 (esm) initialized.", "background: black; color: white; padding: 2px;");
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
41
|
MusicError,
|