@dsebastien/music-notation 0.5.3 → 0.7.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/README.md +12 -2
- package/dist/THIRD_PARTY_LICENSES.md +256 -0
- package/dist/blocks/note-set-field.d.ts +4 -1
- package/dist/blocks/renderers.d.ts +2 -0
- package/dist/cli.js +70 -0
- package/dist/fretboard/positions.d.ts +34 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +314 -52
- package/dist/index.js.map +13 -13
- package/dist/music-notation.publish.min.js +17 -17
- package/dist/music-notation.tab.min.js +4 -4
- package/dist/playback/player.d.ts +3 -5
- package/dist/publish/index.js +312 -52
- package/dist/publish/index.js.map +13 -13
- package/dist/tab/index.d.ts +2 -1
- package/dist/tab/index.js +55 -6
- package/dist/tab/index.js.map +4 -4
- package/dist/theory/note-set.d.ts +19 -5
- package/dist/voicings/index.js +45 -6
- package/dist/voicings/index.js.map +4 -4
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -115,13 +115,23 @@ if (!result.ok) console.warn(result.error)
|
|
|
115
115
|
- The renderers (`renderGuitarDiagram`, `renderKeyboard`, `renderFretboard`, `renderChart`), the parsers and the theory helpers (`parseChord`, `transposeChord`, `chordNoteSet`, `scaleNoteSet`…) are exported too.
|
|
116
116
|
- Styles: `injectStyles(document)`, or ship `@dsebastien/music-notation/music-notation.css`. Colors follow Obsidian's theme variables, with fallbacks for any page.
|
|
117
117
|
|
|
118
|
+
## Check your notes
|
|
119
|
+
|
|
120
|
+
The `check` command draws every block of your Markdown files and lists the mistakes, one per line (`file:line: language: message`). It exits with code 1 when a block has a mistake:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx @dsebastien/music-notation check notes/*.md
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`--describe` prints what each block draws (titles, chord names, the notes of each dot or key, the frets or keys shown), and `--json` prints the same as JSON. The [guide](https://dsebastien.github.io/music-notation/check.html) has the details.
|
|
127
|
+
|
|
118
128
|
## Obsidian Publish
|
|
119
129
|
|
|
120
130
|
Add this to your site's `publish.js`. It loads the bundle only on pages that have notation blocks, and the tab bundle (with alphaTab) only on pages with tabs or scores:
|
|
121
131
|
|
|
122
132
|
```js
|
|
123
133
|
;(() => {
|
|
124
|
-
const VERSION = '0.
|
|
134
|
+
const VERSION = '0.6.0'
|
|
125
135
|
const CDN = `https://cdn.jsdelivr.net/npm/@dsebastien/music-notation@${VERSION}/dist`
|
|
126
136
|
const selector = (languages) => languages.map((l) => `pre > code.language-${l}`).join(', ')
|
|
127
137
|
const BLOCKS = selector(['chord', 'chords', 'keyboard', 'fretboard'])
|
|
@@ -147,7 +157,7 @@ The bundle renders every block, now and as you navigate, and hides a block's sou
|
|
|
147
157
|
|
|
148
158
|
## Credits and licenses
|
|
149
159
|
|
|
150
|
-
MIT. Built on [tonal](https://github.com/tonaljs/tonal) (MIT) for music theory and [chords-db](https://github.com/tombatossals/chords-db) (MIT) for guitar voicings. Tabs and scores use [alphaTab](https://alphatab.net) (MPL-2.0), which the app passes in. The tab bundle loads it from jsDelivr.
|
|
160
|
+
MIT. Built on [tonal](https://github.com/tonaljs/tonal) (MIT) for music theory and [chords-db](https://github.com/tombatossals/chords-db) (MIT) for guitar voicings. The `check` command bundles [linkedom](https://github.com/WebReflection/linkedom) (ISC) for the DOM in Node. Tabs and scores use [alphaTab](https://alphatab.net) (MPL-2.0), which the app passes in. The tab bundle loads it from jsDelivr.
|
|
151
161
|
|
|
152
162
|
## News & support
|
|
153
163
|
|
|
@@ -55,3 +55,259 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
55
55
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
56
|
SOFTWARE.
|
|
57
57
|
```
|
|
58
|
+
|
|
59
|
+
## @acemir/cssom
|
|
60
|
+
|
|
61
|
+
Shipped in: cli.js
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Copyright (c) Nikita Vasilyev
|
|
65
|
+
|
|
66
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
67
|
+
a copy of this software and associated documentation files (the
|
|
68
|
+
"Software"), to deal in the Software without restriction, including
|
|
69
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
70
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
71
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
72
|
+
the following conditions:
|
|
73
|
+
|
|
74
|
+
The above copyright notice and this permission notice shall be
|
|
75
|
+
included in all copies or substantial portions of the Software.
|
|
76
|
+
|
|
77
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
78
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
79
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
80
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
81
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
82
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
83
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## boolbase
|
|
87
|
+
|
|
88
|
+
Shipped in: cli.js
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Copyright (c) 2014-2015, Felix Boehm <me@feedic.com>
|
|
92
|
+
|
|
93
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
94
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
95
|
+
copyright notice and this permission notice appear in all copies.
|
|
96
|
+
|
|
97
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
98
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
99
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
100
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
101
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
102
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
103
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## css-select
|
|
107
|
+
|
|
108
|
+
Shipped in: cli.js
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Copyright (c) Felix Böhm
|
|
112
|
+
All rights reserved.
|
|
113
|
+
|
|
114
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
115
|
+
|
|
116
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
117
|
+
|
|
118
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
119
|
+
|
|
120
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
121
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## css-what
|
|
125
|
+
|
|
126
|
+
Shipped in: cli.js
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Copyright (c) Felix Böhm
|
|
130
|
+
All rights reserved.
|
|
131
|
+
|
|
132
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
133
|
+
|
|
134
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
135
|
+
|
|
136
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
137
|
+
|
|
138
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
139
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## dom-serializer
|
|
143
|
+
|
|
144
|
+
Shipped in: cli.js
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Copyright © 2022 The Cheerio contributors
|
|
148
|
+
|
|
149
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
150
|
+
|
|
151
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
152
|
+
|
|
153
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## domelementtype
|
|
157
|
+
|
|
158
|
+
Shipped in: cli.js
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Copyright (c) Felix Böhm
|
|
162
|
+
All rights reserved.
|
|
163
|
+
|
|
164
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
165
|
+
|
|
166
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
167
|
+
|
|
168
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
169
|
+
|
|
170
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
171
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## domhandler
|
|
175
|
+
|
|
176
|
+
Shipped in: cli.js
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
Copyright (c) Felix Böhm
|
|
180
|
+
All rights reserved.
|
|
181
|
+
|
|
182
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
183
|
+
|
|
184
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
185
|
+
|
|
186
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
187
|
+
|
|
188
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
189
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## domutils
|
|
193
|
+
|
|
194
|
+
Shipped in: cli.js
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
Copyright (c) Felix Böhm
|
|
198
|
+
All rights reserved.
|
|
199
|
+
|
|
200
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
201
|
+
|
|
202
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
203
|
+
|
|
204
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
205
|
+
|
|
206
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
207
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## entities
|
|
211
|
+
|
|
212
|
+
Shipped in: cli.js
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
Copyright (c) Felix Böhm
|
|
216
|
+
All rights reserved.
|
|
217
|
+
|
|
218
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
219
|
+
|
|
220
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
221
|
+
|
|
222
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
223
|
+
|
|
224
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
225
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## htmlparser2
|
|
229
|
+
|
|
230
|
+
Shipped in: cli.js
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
|
234
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
235
|
+
of this software and associated documentation files (the "Software"), to
|
|
236
|
+
deal in the Software without restriction, including without limitation the
|
|
237
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
238
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
239
|
+
furnished to do so, subject to the following conditions:
|
|
240
|
+
|
|
241
|
+
The above copyright notice and this permission notice shall be included in
|
|
242
|
+
all copies or substantial portions of the Software.
|
|
243
|
+
|
|
244
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
245
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
246
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
247
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
248
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
249
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
250
|
+
IN THE SOFTWARE.
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## linkedom
|
|
254
|
+
|
|
255
|
+
Shipped in: cli.js
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
ISC License
|
|
259
|
+
|
|
260
|
+
Copyright (c) 2021, Andrea Giammarchi, @WebReflection
|
|
261
|
+
|
|
262
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
263
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
264
|
+
copyright notice and this permission notice appear in all copies.
|
|
265
|
+
|
|
266
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
267
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
268
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
269
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
270
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
271
|
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
272
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## nth-check
|
|
276
|
+
|
|
277
|
+
Shipped in: cli.js
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
Copyright (c) Felix Böhm
|
|
281
|
+
All rights reserved.
|
|
282
|
+
|
|
283
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
284
|
+
|
|
285
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
286
|
+
|
|
287
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
288
|
+
|
|
289
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
290
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## uhyphen
|
|
294
|
+
|
|
295
|
+
Shipped in: cli.js
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
ISC License
|
|
299
|
+
|
|
300
|
+
Copyright (c) 2020, Andrea Giammarchi, @WebReflection
|
|
301
|
+
|
|
302
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
303
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
304
|
+
copyright notice and this permission notice appear in all copies.
|
|
305
|
+
|
|
306
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
307
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
308
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
309
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
310
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
311
|
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
312
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
313
|
+
```
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/** Shared by keyboard and fretboard blocks: which notes to show and how to label them. */
|
|
2
2
|
import type { BlockSource } from './block-source.js';
|
|
3
3
|
import { type NoteLabel, type NoteMarks, type NoteSet } from '../theory/note-set.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* `scale:`, `chord:` or `notes:`; a shorthand first line is tried as each, in that order. `root:`
|
|
6
|
+
* gives a list its intervals and degrees; a shorthand line with a root is read as a list first.
|
|
7
|
+
*/
|
|
5
8
|
export declare function noteSetOf(block: BlockSource): NoteSet;
|
|
6
9
|
/** `labels:`; `fingers` only where fingering was given (piano chords). */
|
|
7
10
|
export declare function labelField(block: BlockSource, fallback: NoteLabel, fingers?: boolean): NoteLabel;
|
|
@@ -28,6 +28,8 @@ export type DiagramRenderer = (doc: Document, block: BlockSource, options: Rende
|
|
|
28
28
|
export type DiagramLanguage = 'chord' | 'keyboard' | 'fretboard';
|
|
29
29
|
/** Keys a row's shared settings may hold, per language (plus `columns`, for the row itself). */
|
|
30
30
|
export declare const SHARED_KEYS: Record<DiagramLanguage, readonly string[]>;
|
|
31
|
+
/** root: in a chord block (or a row it expands into): it only applies to note lists. */
|
|
32
|
+
export declare const ROOT_FOR_LISTS_ONLY = "root only applies to lists of notes on fretboards and keyboards (notes: C E G with root: C): a chord has its own root";
|
|
31
33
|
/** Diagram languages and their renderers. */
|
|
32
34
|
export declare const DIAGRAMS: Record<DiagramLanguage, DiagramRenderer>;
|
|
33
35
|
/** Block languages (code fence names) and their renderers. */
|