@dsebastien/music-notation 0.9.0 → 0.10.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/dist/chord/generate.d.ts +11 -0
- package/dist/chord/guitar.d.ts +5 -0
- package/dist/convert/text-tab.d.ts +9 -4
- package/dist/index.js +505 -320
- package/dist/index.js.map +14 -14
- package/dist/music-notation.css +10 -0
- package/dist/music-notation.publish.min.js +33 -23
- package/dist/music-notation.tab.min.js +17 -4
- package/dist/playback/controls.d.ts +6 -0
- package/dist/publish/index.js +430 -312
- package/dist/publish/index.js.map +13 -13
- package/dist/render/dom.d.ts +5 -0
- package/dist/strum/pattern.d.ts +6 -0
- package/dist/strum/render.d.ts +1 -1
- package/dist/tab/index.d.ts +8 -2
- package/dist/tab/index.js +93 -12
- package/dist/tab/index.js.map +6 -6
- package/dist/tab/load.d.ts +10 -0
- package/dist/voicings/check.d.ts +7 -0
- package/dist/voicings/index.js +94 -6
- package/dist/voicings/index.js.map +7 -7
- package/package.json +1 -1
package/dist/chord/generate.d.ts
CHANGED
|
@@ -89,6 +89,17 @@ export declare function fingerVoicing(frets: readonly (number | null)[]): (strin
|
|
|
89
89
|
* `isBarreVoicing` (an "E shape" held with a full barre is the E-shape barre chord).
|
|
90
90
|
*/
|
|
91
91
|
export declare function voicingShape(frets: readonly (number | null)[], symbol: string, tuning?: readonly number[], _fingers?: readonly (string | null)[] | null): VoicingShape | null;
|
|
92
|
+
/**
|
|
93
|
+
* One voicing per shape: leaves out a voicing that is another one of the list with its highest
|
|
94
|
+
* strings muted (A x0222x and 57765x, copies of x02220 and 577655), then draws the rest up the neck (lowest
|
|
95
|
+
* fretted note; ties keep the list's order, the easiest first). `count` voicings are kept, the
|
|
96
|
+
* easiest ones, before they are put in neck order (#72).
|
|
97
|
+
*/
|
|
98
|
+
export declare function distinctShapes<T extends {
|
|
99
|
+
frets: readonly (number | null)[];
|
|
100
|
+
}>(voicings: readonly T[], count?: number): T[];
|
|
101
|
+
/** Whether standard-tuning frets are one of the known jazz grips, at any fret (#72). */
|
|
102
|
+
export declare function isJazzGrip(frets: readonly (number | null)[]): boolean;
|
|
92
103
|
/**
|
|
93
104
|
* Every playable voicing of a chord, easiest first; empty when the chord is unknown or nothing
|
|
94
105
|
* fits the options. See VoicingOptions for the filters.
|
package/dist/chord/guitar.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export interface GuitarDiagramOptions {
|
|
|
24
24
|
orientation?: Orientation;
|
|
25
25
|
/** Left-handed: mirrored (the low string on the right, or the nut on the right). */
|
|
26
26
|
hand?: Hand;
|
|
27
|
+
/**
|
|
28
|
+
* Fingers worked out for a voicing written without any (`fingerVoicing`): only its full
|
|
29
|
+
* barres are drawn from them (F 133211 keeps its bar); its dots stay without numbers (#73).
|
|
30
|
+
*/
|
|
31
|
+
barreFingers?: readonly (string | null)[] | null;
|
|
27
32
|
/** Text in each string's dot instead of its finger (intervals, note names); null for none. */
|
|
28
33
|
labels?: (string | null)[];
|
|
29
34
|
/** Chord transitions: fingers that stay (anchor) or slide (guide), per string. */
|
|
@@ -37,8 +37,9 @@ export interface Meter {
|
|
|
37
37
|
* 0.4 of a column and with plain note values, then within a column (a tab written a column off),
|
|
38
38
|
* then on a grid that falls on columns, with ties. A grid step is a column wide at least, and
|
|
39
39
|
* equal gaps get equal lengths. The bar runs from `pad` (the dashes every bar starts with) to
|
|
40
|
-
* its end, or `pad` columns less;
|
|
41
|
-
*
|
|
40
|
+
* its end, or `pad` columns less; from fewer dashes than `pad` to its end (a bar that starts with
|
|
41
|
+
* a rest); when the first beat comes later, from its start too (a rest first). Null when nothing
|
|
42
|
+
* fits (a sketch, not a rhythm).
|
|
42
43
|
*/
|
|
43
44
|
export declare function positionsOf(cols: number[], width: number, pad: number, meter?: Meter): number[] | null;
|
|
44
45
|
/** A bar's events: a beat (its index) or a rest (-1), and its length in sixteenths. */
|
|
@@ -50,9 +51,13 @@ export type Rhythm = {
|
|
|
50
51
|
* A bar's rhythm when no grid fits its columns (see positionsOf): the bar's most frequent gap
|
|
51
52
|
* between beats is an eighth (a sixteenth when eighths overrun the bar), other gaps a whole number
|
|
52
53
|
* of them (one at least), the last beat one, and rests fill the rest of the bar (4/4 unless
|
|
53
|
-
* `meter` says).
|
|
54
|
+
* `meter` says). Before eighths give way to sixteenths, the hammer-ons, pull-offs and slides
|
|
55
|
+
* (`legato`: the beats that lead on to the next one) take one eighth for both notes of the pair,
|
|
56
|
+
* a sixteenth each, as many pairs as the bar needs, first ones first (#71): the letter written
|
|
57
|
+
* between the two frets takes a column that isn't time. Every beat a sixteenth when even that is
|
|
58
|
+
* too long.
|
|
54
59
|
*/
|
|
55
|
-
export declare function sketchRhythmOf(cols: number[], meter?: Meter): Rhythm;
|
|
60
|
+
export declare function sketchRhythmOf(cols: number[], meter?: Meter, legato?: readonly number[]): Rhythm;
|
|
56
61
|
/**
|
|
57
62
|
* alphaTex for a plain-text tab; null when no tab lines are found. String lines are mostly dashes
|
|
58
63
|
* with a bar line or a name; one named line is enough, unnamed ones need three. A drum tab becomes
|