@dsebastien/music-notation 0.4.0 → 0.5.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/README.md +37 -14
- package/dist/blocks/block-source.d.ts +5 -0
- package/dist/blocks/renderers.d.ts +3 -0
- package/dist/chord/guitar.d.ts +4 -0
- package/dist/chord/transitions.d.ts +46 -0
- package/dist/chord/triads.d.ts +43 -0
- package/dist/convert/chord-sheet.d.ts +2 -0
- package/dist/convert/text-tab.d.ts +5 -0
- package/dist/fretboard/fretboard.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1277 -24
- package/dist/index.js.map +16 -10
- package/dist/keyboard/keyboard.d.ts +2 -0
- package/dist/music-notation.css +224 -0
- package/dist/music-notation.publish.min.js +247 -13
- package/dist/music-notation.tab.min.js +535 -0
- package/dist/playback/controls.d.ts +22 -0
- package/dist/playback/player.d.ts +50 -0
- package/dist/publish/auto.d.ts +3 -0
- package/dist/publish/index.js +881 -24
- package/dist/publish/index.js.map +14 -10
- package/dist/tab/auto.d.ts +16 -0
- package/dist/tab/index.d.ts +97 -0
- package/dist/tab/index.js +1043 -0
- package/dist/tab/index.js.map +19 -0
- package/package.json +21 -2
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
/*! @dsebastien/music-notation 0.5.1 tab bundle | MIT | loads alphaTab (MPL-2.0) from jsDelivr */
|
|
2
|
+
(()=>{var j=(t,e)=>{for(let[a,r]of Object.entries(e))if(r!==void 0)t.setAttribute(a,String(r))};function C(t,e,a={},r=[]){let o=t.createElementNS("http://www.w3.org/2000/svg",e);j(o,a);for(let n of r)if(n)o.appendChild(n);return o}function k(t,e,a,r){let o=t.createElement(e);if(a)o.className=a;if(r!==void 0)o.textContent=r;return o}var q="1.8.4",F=(t=q)=>{let e=`https://cdn.jsdelivr.net/npm/@coderline/alphatab@${t}/dist`;return{script:`${e}/alphaTab.min.js`,font:`${e}/font/Bravura.woff2`,soundFont:`${e}/soundfont/sonivox.sf3`}},_=/^\s*(staves|file|tracks?)\s*:\s*(.*)$/i;function K(t,e){let a=e.split(/\r?\n/),r={staves:t,file:null,tracks:null,tex:"",texLine:0},o=0;for(;o<a.length;o++){let n=a[o];if(!n.trim()||/^\s*\/\//.test(n))continue;let s=_.exec(n);if(!s)break;let c=s[1].toLowerCase(),d=s[2].trim();if(c==="staves"){let i=d.toLowerCase();if(i!=="tab"&&i!=="score"&&i!=="both")throw Error(`staves: use tab, score or both, got "${d}"`);r.staves=i}else if(c==="file")r.file=d.replace(/^!?\[\[|\]\]$/g,"").split(/[|#]/)[0].trim()||null;else{let i=d.split(/[\s,]+/).filter(Boolean).map(Number);if(!i.length||i.some((u)=>!Number.isInteger(u)||u<1))throw Error(`tracks: use track numbers from 1, got "${d}"`);r.tracks=i}}while(o<a.length&&!a[o].trim())o++;if(r.texLine=o,r.tex=a.slice(o).join(`
|
|
3
|
+
`).trimEnd(),!r.file&&!r.tex)throw Error("Write the music in alphaTex, or give a file: [[Song.gp]]");return r}function Y(t,e){let a=t?.cause??t;for(let r of["lexerDiagnostics","parserDiagnostics","semanticDiagnostics"]){let o=a?.[r]?.items;if(!Array.isArray(o))continue;let n=o.find((s)=>s.severity===2&&s.message);if(n)return`${n.start?`line ${n.start.line+e}, column ${n.start.col}: `:""}${n.message}`}return t instanceof Error?t.message:String(t)}var J={tab:"Tab",score:"Score",both:"ScoreTab"};function L(t,e,a=1){let r=t.createElement("canvas");r.width=1,r.height=1;let o=r.getContext("2d",{willReadFrequently:!0});if(!o)return null;o.fillStyle="#000",o.fillStyle=e,o.fillRect(0,0,1,1);let n=o.getImageData(0,0,1,1).data;if(n.length<4)return null;return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${(n[3]/255*a).toFixed(3)})`}function Q(t){let e=t.ownerDocument,a=e.defaultView?.getComputedStyle(t).color||"",r=a&&L(e,a)||(/^rgba?\(/.test(a)?a:"rgba(0, 0, 0, 1)"),o=a&&L(e,a,0.6)||r;return{mainGlyphColor:r,secondaryGlyphColor:o,scoreInfoColor:r,staffLineColor:o,barSeparatorColor:r,barNumberColor:o}}var P=(t)=>{let e=t.defaultView??globalThis;return{map:(a)=>new e.Map(a),bytes:(a)=>{let r=new e.Uint8Array(a.length);return r.set(a),r}}},X={play:"M4 2.5v11l9-5.5z",pause:"M4 3h3v10H4zM9 3h3v10H9z",stop:"M4 4h8v8H4z",loop:"M3 8a5 5 0 0 1 8.5-3.5L13 6V2.5M13 8a5 5 0 0 1-8.5 3.5L3 10v3.5",metronome:"M6 2h4l3 12H3zM8 11l3-7",countIn:"M3 13h10M5 13V9M8 13V6M11 13V3",volume:"M2 6h3l4-3v10l-4-3H2zM11 5.5a3.5 3.5 0 0 1 0 5"};function E(t,e){let r=C(t,"svg",{class:`mn-play-icon${e==="play"||e==="pause"||e==="stop"?"":" mn-play-icon-loop"}`,viewBox:"0 0 16 16",width:12,height:12,"aria-hidden":"true"});return r.appendChild(C(t,"path",{d:X[e]})),r}var V=(t)=>{let e=Math.max(0,Math.round(t/1000));return`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`};function Z(t,e,a,r){let o=k(t,"div","mn-play mn-tab-bar");o.setAttribute("role","group"),o.setAttribute("aria-label","Playback");let n={loop:!1,metronome:!1,countIn:!1,speed:1,volume:1},s=null,c=null,d=()=>(s??=new Promise((l)=>{if(e.playerReady.on(()=>l(!0)),c=()=>l(!1),e.settings.player.playerMode=a.PlayerMode.EnabledSynthesizer,e.settings.player.enableCursor=!0,typeof r.soundFont==="string")e.settings.player.soundFont=r.soundFont;if(e.updateSettings(),r.soundFont instanceof Uint8Array)e.loadSoundFont(P(t).bytes(r.soundFont),!1)}).then((l)=>{if(l)e.isLooping=n.loop,e.metronomeVolume=n.metronome?1:0,e.countInVolume=n.countIn?1:0,e.playbackSpeed=n.speed,e.masterVolume=n.volume;return l}),s),i=(l,h,y)=>{let p=k(t,"button");return p.type="button",p.title=h,p.setAttribute("aria-label",h),p.appendChild(E(t,l)),p.addEventListener("click",y),o.appendChild(p),p},u=(l)=>{if(e.player)l()},f=(l,h,y)=>{let p=i(l,h,()=>{n[y]=!n[y],u(()=>{e.isLooping=n.loop,e.metronomeVolume=n.metronome?1:0,e.countInVolume=n.countIn?1:0}),p.classList.toggle("mn-on",n[y]),p.setAttribute("aria-pressed",String(n[y]))});p.setAttribute("aria-pressed","false")},m=i("play","Play",()=>{d().then((l)=>{if(l)e.playPause()})});i("stop","Stop",()=>u(()=>e.stop())),f("loop","Loop","loop"),f("metronome","Metronome","metronome"),f("countIn","Count-in","countIn");let b=(l,h,y,p,v,w,x="")=>{let T=k(t,"label","mn-play-field"),S=k(t,"span","mn-play-label");S.setAttribute("aria-hidden","true"),S.append(h);let A=k(t,"input");A.type="range",A.min=String(y),A.max=String(p),A.value=String(v),A.setAttribute("aria-label",l),T.title=`${l}: ${v}${x}`,A.addEventListener("input",()=>{w(Number(A.value)),T.title=`${l}: ${A.value}${x}`}),T.append(S,A),o.appendChild(T)};b("Speed","%",25,150,100,(l)=>{n.speed=l/100,u(()=>e.playbackSpeed=n.speed)},"%"),b("Volume",E(t,"volume"),0,100,100,(l)=>{n.volume=l/100,u(()=>e.masterVolume=n.volume)});let g=k(t,"span","mn-tab-time","");return o.appendChild(g),e.playerStateChanged.on((l)=>{let h=Number(l.state)===Number(a.synth.PlayerState.Playing);m.replaceChildren(E(t,h?"pause":"play")),m.title=h?"Pause":"Play",m.setAttribute("aria-label",m.title)}),e.playerPositionChanged.on((l)=>{g.textContent=`${V(l.currentTime)} / ${V(l.endTime)}`}),{bar:o,failed:(l)=>{c?.(),m.disabled=!0,m.title=`Can't play: ${l}`,m.setAttribute("aria-label",m.title)}}}function O(t,e,a,r){let o=a.ownerDocument,n=k(o,"div",`mn-block mn-block-${t} mn-tab`);a.appendChild(n);let s=null,c=!1,d=!1,i=()=>{},u=new Promise((m)=>{i=(b)=>{if(d)return;d=!0,m(b)}}),f=(m)=>{n.replaceChildren(k(o,"div","mn-error-message",`${t}: ${m}`)),n.classList.add("mn-error"),i({ok:!1,error:m})};if(!e.trim())n.classList.add("mn-empty"),i({ok:!0,error:null});else(async()=>{await Promise.resolve();let m=K(t,e),b=r.alphaTab;if(!b?.AlphaTabApi)throw Error("alphaTab isn't loaded");let g=k(o,"div","mn-tab-surface");n.appendChild(g);let{assets:l}=r,h=P(o),y={core:{useWorkers:Boolean(l.scriptFile),...l.scriptFile?{scriptFile:l.scriptFile}:{},smuflFontSources:h.map([[b.FontFileFormat.Woff2,l.font]]),logLevel:b.LogLevel.Warning},display:{staveProfile:J[m.staves],resources:Q(n)},player:{playerMode:b.PlayerMode.Disabled,enableUserInteraction:!0}},p=new b.AlphaTabApi(g,y);if(s=p,c){p.destroy();return}r.onApi?.(p);let v=null;p.renderFinished.on(()=>{if(d||c)return;if(r.player!==!1)v=Z(o,p,b,l),n.appendChild(v.bar),n.addEventListener("pointerdown",(x)=>{if(x.pointerType!=="touch"||v?.bar.contains(x.target))return;n.classList.toggle("mn-play-open")});i({ok:!0,error:null})}),p.error.on((x)=>{let T=Y(x,m.texLine);if(d)v?.failed(T);else f(T)});let w=m.tracks?.map((x)=>x-1);if(m.file){let x;try{x=r.resolveFile?await r.resolveFile(m.file):null}catch(S){throw Error(`Couldn't read "${m.file}": ${S instanceof Error?S.message:String(S)}`)}if(c)return;if(!x)throw Error(`Couldn't find the file "${m.file}"`);if(!p.load(h.bytes(x),w))throw Error(`Couldn't read "${m.file}": not a score file alphaTab knows`)}else p.tex(m.tex,w??"all")})().catch((m)=>{if(!c)f(m instanceof Error?m.message:String(m))});return{el:n,ready:u,get api(){return s},destroy(){c=!0;try{s?.destroy()}catch{}n.remove(),i({ok:!1,error:null})}}}var ee={guitar:25,piano:0};function te(t,e){return{play(a,{sound:r,volume:o,onEnd:n}){let s=e(),c=s?.player;if(!s||!c)throw Error("The soundfont player is not ready");let d=new t.midi.MidiFile,i=new t.midi.AlphaSynthMidiFileHandler(d,!0),u=(g)=>Math.round(g*d.division);i.addTempo(0,60),i.addProgramChange(0,0,0,ee[r]);let f=Number.isFinite(o)?Math.min(1,Math.max(0,o)):0.8;s.masterVolume=f;for(let g of a)i.addNote(0,u(g.time),Math.max(1,u(g.duration)),g.midi,100,0);let m=Math.max(...a.map((g)=>g.time+g.duration),0);s.playbackSpeed=1,c.playOneTimeMidiFile(d);let b=setTimeout(()=>n?.(),(m+0.2)*1000);return{stop(){clearTimeout(b),c.stop()}}}}}function R(t,e,a,r){let o=null,n=null,s=null,c=()=>{if(s)return s;n=k(a,"div","mn-tab-hidden"),n.setAttribute("aria-hidden","true"),a.body.appendChild(n);let i=P(a);o=new t.AlphaTabApi(n,{core:{useWorkers:Boolean(e.scriptFile),...e.scriptFile?{scriptFile:e.scriptFile}:{},smuflFontSources:i.map([[t.FontFileFormat.Woff2,e.font]])},player:{playerMode:t.PlayerMode.EnabledSynthesizer,...typeof e.soundFont==="string"?{soundFont:e.soundFont}:{}}});let u=o;if(s=new Promise((f)=>{u.soundFontLoaded.on(()=>f(!0)),u.error.on(()=>f(!1))}),e.soundFont instanceof Uint8Array)u.loadSoundFont(i.bytes(e.soundFont),!1);return u.tex("r"),s},d=te(t,()=>o);return{play(i,u){let f=null,m=!1;return c().then((b)=>{if(m)return;try{if(b){f=d.play(i,u);return}}catch{}if(r)f=r.play(i,u)}),{stop(){m=!0,f?.stop()}}},destroy(){try{o?.destroy()}catch{}n?.remove(),o=null,s=null}}}var I=`/* Music notation. Colors follow Obsidian's theme variables when present, with fallbacks for any page. */
|
|
4
|
+
.mn-block,
|
|
5
|
+
.mn-svg,
|
|
6
|
+
.mn-chart {
|
|
7
|
+
--mn-fg: var(--text-normal, currentColor);
|
|
8
|
+
--mn-muted: var(--text-muted, #8a8a8a);
|
|
9
|
+
--mn-faint: var(--background-modifier-border, #d0d0d0);
|
|
10
|
+
--mn-accent: var(--interactive-accent, #7c3aed);
|
|
11
|
+
--mn-bg: var(--background-primary, #fff);
|
|
12
|
+
--mn-on-accent: var(--text-on-accent, #fff);
|
|
13
|
+
/* Dark enough for white labels in light and dark themes. */
|
|
14
|
+
--mn-root: #c2410c;
|
|
15
|
+
/* A mode's characteristic notes: dark enough for white labels too. */
|
|
16
|
+
--mn-char: #047857;
|
|
17
|
+
/* Piano keys keep their real colors in every theme. */
|
|
18
|
+
--mn-key-white: #fafafa;
|
|
19
|
+
--mn-key-black: #222;
|
|
20
|
+
font-family: var(--font-interface, system-ui, sans-serif);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mn-block {
|
|
24
|
+
color: var(--mn-fg);
|
|
25
|
+
margin: 0.5em 0;
|
|
26
|
+
overflow-x: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mn-svg {
|
|
30
|
+
display: block;
|
|
31
|
+
max-width: 100%;
|
|
32
|
+
height: auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mn-svg text {
|
|
36
|
+
fill: var(--mn-fg);
|
|
37
|
+
font-size: 11px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mn-svg .mn-title {
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mn-svg .mn-string,
|
|
46
|
+
.mn-svg .mn-fret {
|
|
47
|
+
stroke: var(--mn-muted);
|
|
48
|
+
stroke-width: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mn-svg .mn-nut {
|
|
52
|
+
stroke: var(--mn-fg);
|
|
53
|
+
stroke-width: 4;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mn-svg .mn-dot,
|
|
57
|
+
.mn-svg .mn-barre {
|
|
58
|
+
fill: var(--mn-accent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mn-svg .mn-dot.mn-root {
|
|
62
|
+
fill: var(--mn-root);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mn-svg .mn-dot.mn-char {
|
|
66
|
+
fill: var(--mn-char);
|
|
67
|
+
/* A ring, so the mark doesn't rest on color alone. */
|
|
68
|
+
stroke: var(--mn-on-accent);
|
|
69
|
+
stroke-width: 2;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Playback: a compact strip at the bottom of the diagram, shown on hover, keyboard focus or a
|
|
73
|
+
tap. Host styles (Obsidian's buttons, selects and sliders) are reset inside it. */
|
|
74
|
+
.mn-playable {
|
|
75
|
+
position: relative;
|
|
76
|
+
display: inline-block;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mn-play {
|
|
81
|
+
position: absolute;
|
|
82
|
+
left: 2px;
|
|
83
|
+
right: 2px;
|
|
84
|
+
bottom: 2px;
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-wrap: wrap;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
gap: 2px 6px;
|
|
90
|
+
padding: 2px 4px;
|
|
91
|
+
font-size: 10px;
|
|
92
|
+
line-height: 1;
|
|
93
|
+
color: var(--mn-fg);
|
|
94
|
+
background: color-mix(in srgb, var(--mn-bg) 85%, transparent);
|
|
95
|
+
border: 1px solid var(--mn-faint);
|
|
96
|
+
border-radius: 6px;
|
|
97
|
+
opacity: 0;
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
transition: opacity 120ms ease;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mn-playable:hover .mn-play,
|
|
103
|
+
.mn-playable:focus-within .mn-play,
|
|
104
|
+
.mn-playable.mn-play-open .mn-play {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
pointer-events: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mn-play button,
|
|
110
|
+
.mn-play select {
|
|
111
|
+
all: unset;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
height: 18px;
|
|
117
|
+
min-width: 18px;
|
|
118
|
+
padding: 0 3px;
|
|
119
|
+
font-size: 10px;
|
|
120
|
+
color: inherit;
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.mn-play button:hover,
|
|
126
|
+
.mn-play select:hover,
|
|
127
|
+
.mn-play button:focus-visible,
|
|
128
|
+
.mn-play select:focus-visible {
|
|
129
|
+
background: color-mix(in srgb, var(--mn-fg) 12%, transparent);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mn-play button.mn-on {
|
|
133
|
+
background: var(--mn-accent);
|
|
134
|
+
color: var(--mn-on-accent);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.mn-play-icon {
|
|
138
|
+
fill: currentColor;
|
|
139
|
+
stroke: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mn-play-icon-loop,
|
|
143
|
+
.mn-play-icon-volume {
|
|
144
|
+
fill: none;
|
|
145
|
+
stroke: currentColor;
|
|
146
|
+
stroke-width: 1.6;
|
|
147
|
+
stroke-linecap: round;
|
|
148
|
+
stroke-linejoin: round;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mn-play-field {
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 2px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.mn-play-label {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
opacity: 0.8;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.mn-play input[type='range'] {
|
|
163
|
+
all: unset;
|
|
164
|
+
appearance: none;
|
|
165
|
+
width: 44px;
|
|
166
|
+
/* The input is the track (3px); the thumb is pulled up to its middle below. */
|
|
167
|
+
height: 3px;
|
|
168
|
+
margin: 0;
|
|
169
|
+
border-radius: 2px;
|
|
170
|
+
background: var(--mn-faint);
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mn-play input[type='range']::-webkit-slider-runnable-track {
|
|
175
|
+
height: 3px;
|
|
176
|
+
border: none;
|
|
177
|
+
background: transparent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.mn-play input[type='range']::-webkit-slider-thumb {
|
|
181
|
+
appearance: none;
|
|
182
|
+
width: 9px;
|
|
183
|
+
height: 9px;
|
|
184
|
+
/* Centered on the 3px track. Hosts may move thumbs (Obsidian: relative, top -6px). */
|
|
185
|
+
position: static;
|
|
186
|
+
top: 0;
|
|
187
|
+
margin-top: -3px;
|
|
188
|
+
border: none;
|
|
189
|
+
border-radius: 50%;
|
|
190
|
+
background: var(--mn-accent);
|
|
191
|
+
box-shadow: none;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Hosts ring a focused thumb (Obsidian): only for keyboard focus here, not after a click. */
|
|
195
|
+
.mn-play input[type='range']:focus:not(:focus-visible)::-webkit-slider-thumb {
|
|
196
|
+
box-shadow: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.mn-play input[type='range']::-moz-range-track {
|
|
200
|
+
height: 3px;
|
|
201
|
+
border: none;
|
|
202
|
+
border-radius: 2px;
|
|
203
|
+
background: var(--mn-faint);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.mn-play input[type='range']::-moz-range-thumb {
|
|
207
|
+
width: 9px;
|
|
208
|
+
height: 9px;
|
|
209
|
+
border: none;
|
|
210
|
+
border-radius: 50%;
|
|
211
|
+
background: var(--mn-accent);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.mn-playable [data-midi] {
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* A finger number or note name over a dot or key lets the click reach it. */
|
|
219
|
+
.mn-playable .mn-svg text {
|
|
220
|
+
pointer-events: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* The bar's empty space lets clicks through to the dots under it; its controls take them. */
|
|
224
|
+
.mn-playable:hover .mn-play,
|
|
225
|
+
.mn-playable:focus-within .mn-play,
|
|
226
|
+
.mn-playable.mn-play-open .mn-play {
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.mn-playable:hover .mn-play > *,
|
|
231
|
+
.mn-playable:focus-within .mn-play > *,
|
|
232
|
+
.mn-playable.mn-play-open .mn-play > * {
|
|
233
|
+
pointer-events: auto;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Touch screens: hover sticks after a tap, so only a tap opens the bar. */
|
|
237
|
+
@media (hover: none) {
|
|
238
|
+
.mn-playable:hover:not(.mn-play-open) .mn-play {
|
|
239
|
+
opacity: 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.mn-playable:hover:not(.mn-play-open) .mn-play > * {
|
|
243
|
+
pointer-events: none;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Tabs and scores: the player bar stays at the bottom of the screen while the score scrolls. */
|
|
248
|
+
.mn-tab {
|
|
249
|
+
position: relative;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.mn-tab .mn-tab-bar {
|
|
253
|
+
position: sticky;
|
|
254
|
+
left: auto;
|
|
255
|
+
right: auto;
|
|
256
|
+
bottom: 6px;
|
|
257
|
+
width: fit-content;
|
|
258
|
+
max-width: 100%;
|
|
259
|
+
margin: 4px auto 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mn-tab:hover .mn-tab-bar,
|
|
263
|
+
.mn-tab:focus-within .mn-tab-bar,
|
|
264
|
+
.mn-tab.mn-play-open .mn-tab-bar {
|
|
265
|
+
opacity: 1;
|
|
266
|
+
pointer-events: auto;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.mn-tab-time {
|
|
270
|
+
font-variant-numeric: tabular-nums;
|
|
271
|
+
opacity: 0.8;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.mn-tab-hidden {
|
|
275
|
+
position: absolute;
|
|
276
|
+
width: 1px;
|
|
277
|
+
height: 1px;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
left: -9999px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Chord transitions: a finger that stays (anchor) gets a ring, one that slides (guide) a dashed
|
|
283
|
+
ring, so the marks don't rest on color alone. */
|
|
284
|
+
.mn-svg .mn-dot.mn-anchor {
|
|
285
|
+
stroke: var(--mn-fg);
|
|
286
|
+
stroke-width: 3;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.mn-svg .mn-dot.mn-guide {
|
|
290
|
+
stroke: var(--mn-fg);
|
|
291
|
+
stroke-width: 2.5;
|
|
292
|
+
stroke-dasharray: 3 2;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* Notes that differ from a compared scale: outlined. */
|
|
296
|
+
.mn-svg .mn-dot.mn-diff,
|
|
297
|
+
.mn-svg .mn-key-white.mn-diff,
|
|
298
|
+
.mn-svg .mn-key-black.mn-diff {
|
|
299
|
+
stroke: var(--mn-fg);
|
|
300
|
+
stroke-width: 2.5;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* The compared scale's notes missing here: faint. */
|
|
304
|
+
.mn-svg .mn-ghost {
|
|
305
|
+
fill: none;
|
|
306
|
+
stroke: var(--mn-muted);
|
|
307
|
+
stroke-width: 1.5;
|
|
308
|
+
stroke-dasharray: 2 2;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.mn-svg .mn-key-white.mn-ghost,
|
|
312
|
+
.mn-svg .mn-key-black.mn-ghost {
|
|
313
|
+
fill: var(--mn-faint);
|
|
314
|
+
stroke-dasharray: none;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.mn-svg .mn-dot-text {
|
|
318
|
+
fill: var(--mn-on-accent);
|
|
319
|
+
font-size: 10px;
|
|
320
|
+
font-weight: 600;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.mn-svg .mn-open {
|
|
324
|
+
fill: none;
|
|
325
|
+
stroke: var(--mn-fg);
|
|
326
|
+
stroke-width: 1.5;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.mn-svg .mn-open.mn-root {
|
|
330
|
+
stroke: var(--mn-root);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.mn-svg .mn-muted,
|
|
334
|
+
.mn-svg .mn-base-fret,
|
|
335
|
+
.mn-svg .mn-fret-number,
|
|
336
|
+
.mn-svg .mn-string-name {
|
|
337
|
+
fill: var(--mn-muted);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.mn-svg .mn-inlay {
|
|
341
|
+
fill: var(--mn-faint);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.mn-svg .mn-key-white {
|
|
345
|
+
fill: var(--mn-key-white);
|
|
346
|
+
stroke: #888;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.mn-svg .mn-key-black {
|
|
350
|
+
fill: var(--mn-key-black);
|
|
351
|
+
stroke: var(--mn-key-black);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.mn-svg .mn-key-white.mn-on,
|
|
355
|
+
.mn-svg .mn-key-black.mn-on {
|
|
356
|
+
fill: var(--mn-accent);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.mn-svg .mn-key-white.mn-on.mn-root,
|
|
360
|
+
.mn-svg .mn-key-black.mn-on.mn-root {
|
|
361
|
+
fill: var(--mn-root);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.mn-svg .mn-key-white.mn-on.mn-char,
|
|
365
|
+
.mn-svg .mn-key-black.mn-on.mn-char {
|
|
366
|
+
fill: var(--mn-char);
|
|
367
|
+
stroke: var(--mn-fg);
|
|
368
|
+
stroke-width: 2;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.mn-svg .mn-key-label {
|
|
372
|
+
font-size: 10px;
|
|
373
|
+
fill: var(--mn-on-accent);
|
|
374
|
+
font-weight: 600;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* Several diagrams in one block: a row that wraps, or a grid of at most \`columns\` columns that
|
|
378
|
+
also wraps on narrow screens rather than shrinking diagrams to nothing. */
|
|
379
|
+
.mn-block .mn-row {
|
|
380
|
+
display: flex;
|
|
381
|
+
flex-wrap: wrap;
|
|
382
|
+
align-items: flex-start;
|
|
383
|
+
gap: 0.75em 1.25em;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.mn-block .mn-grid {
|
|
387
|
+
--mn-gap: 1.25em;
|
|
388
|
+
display: grid;
|
|
389
|
+
align-items: start;
|
|
390
|
+
gap: 0.75em var(--mn-gap);
|
|
391
|
+
grid-template-columns: repeat(
|
|
392
|
+
auto-fill,
|
|
393
|
+
minmax(
|
|
394
|
+
max(110px, calc((100% - (var(--mn-columns) - 1) * var(--mn-gap)) / var(--mn-columns))),
|
|
395
|
+
1fr
|
|
396
|
+
)
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.mn-block .mn-grid .mn-cell {
|
|
401
|
+
display: flex;
|
|
402
|
+
justify-content: center;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.mn-block .mn-cell {
|
|
406
|
+
min-width: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.mn-block .mn-cols-1 {
|
|
410
|
+
--mn-columns: 1;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.mn-block .mn-cols-2 {
|
|
414
|
+
--mn-columns: 2;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.mn-block .mn-cols-3 {
|
|
418
|
+
--mn-columns: 3;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.mn-block .mn-cols-4 {
|
|
422
|
+
--mn-columns: 4;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.mn-block .mn-cols-5 {
|
|
426
|
+
--mn-columns: 5;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.mn-block .mn-cols-6 {
|
|
430
|
+
--mn-columns: 6;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.mn-block .mn-cols-7 {
|
|
434
|
+
--mn-columns: 7;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.mn-block .mn-cols-8 {
|
|
438
|
+
--mn-columns: 8;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.mn-block .mn-cols-9 {
|
|
442
|
+
--mn-columns: 9;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.mn-block .mn-cols-10 {
|
|
446
|
+
--mn-columns: 10;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.mn-block .mn-cols-11 {
|
|
450
|
+
--mn-columns: 11;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.mn-block .mn-cols-12 {
|
|
454
|
+
--mn-columns: 12;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/* Chord charts */
|
|
458
|
+
.mn-chart {
|
|
459
|
+
line-height: 1.3;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.mn-chart-title {
|
|
463
|
+
font-size: 1.3em;
|
|
464
|
+
font-weight: 700;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.mn-chart-subtitle,
|
|
468
|
+
.mn-chart-meta {
|
|
469
|
+
color: var(--mn-muted);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.mn-chart-meta {
|
|
473
|
+
font-size: 0.9em;
|
|
474
|
+
margin-top: 0.2em;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.mn-section {
|
|
478
|
+
margin-top: 0.9em;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.mn-section-chorus {
|
|
482
|
+
border-left: 3px solid var(--mn-accent);
|
|
483
|
+
padding-left: 0.75em;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.mn-section-label {
|
|
487
|
+
font-weight: 600;
|
|
488
|
+
font-size: 0.85em;
|
|
489
|
+
color: var(--mn-muted);
|
|
490
|
+
text-transform: uppercase;
|
|
491
|
+
letter-spacing: 0.04em;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.mn-line {
|
|
495
|
+
display: flex;
|
|
496
|
+
flex-wrap: wrap;
|
|
497
|
+
align-items: flex-end;
|
|
498
|
+
min-height: 1.3em;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.mn-seg {
|
|
502
|
+
display: inline-flex;
|
|
503
|
+
flex-direction: column;
|
|
504
|
+
min-width: 0;
|
|
505
|
+
max-width: 100%;
|
|
506
|
+
white-space: pre-wrap;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.mn-chord {
|
|
510
|
+
color: var(--mn-accent);
|
|
511
|
+
font-weight: 700;
|
|
512
|
+
min-height: 1.3em;
|
|
513
|
+
padding-right: 0.4em;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.mn-chords-only .mn-seg {
|
|
517
|
+
margin-right: 0.6em;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.mn-comment {
|
|
521
|
+
font-style: italic;
|
|
522
|
+
color: var(--mn-muted);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.mn-pre {
|
|
526
|
+
font-family: var(--font-monospace, ui-monospace, monospace);
|
|
527
|
+
margin: 0;
|
|
528
|
+
white-space: pre;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.mn-error-message {
|
|
532
|
+
color: var(--text-error, #c92a2a);
|
|
533
|
+
font-size: 0.9em;
|
|
534
|
+
}
|
|
535
|
+
`;var oe=I,D="music-notation-styles";function G(t){if(t.getElementById(D))return;let e=t.createElement("style");e.id=D,e.textContent=oe,t.head.appendChild(e)}var re=(t)=>t.reduce((e,a)=>Math.max(e,a.time+a.duration),0),B=(t)=>440*Math.pow(2,(t-69)/12);function ae(t,e,a,r=Math.random){let o=new Float32Array(Math.round(e*a)),n=Math.max(2,Math.round(e/B(t))),s=new Float32Array(n);for(let i=0;i<n;i++)s[i]=r()*2-1;let c=0.996+Math.min(0.0035,0.00004*(90-t)),d=0;for(let i=0;i<o.length;i++){let u=(d+1)%n,f=s[d];s[d]=c*0.5*(f+s[u]),o[i]=f*0.5,d=u}return o}var H=new WeakMap;function ie(t){let e=H.get(t);if(e)return e;let a=t.AudioContext;if(!a)return null;let r=new a;return H.set(t,r),r}var se=4,z=[0,1,0.5,0.3,0.15,0.08,0.04];function U(t){let e=new Map,a=new WeakMap,r=(n,s)=>{let c=e.get(s);if(!c){let d=ae(s,n.sampleRate,se);c=n.createBuffer(1,d.length,n.sampleRate),c.getChannelData(0).set(d),e.set(s,c)}return c},o=(n)=>{let s=a.get(n);if(!s){let c=new Float32Array(z.length);s=n.createPeriodicWave(c,Float32Array.from(z)),a.set(n,s)}return s};return{play(n,{sound:s,volume:c,onEnd:d}){let i=ie(t);if(!i||!n.length)return{stop(){}};if(i.resume(),s==="guitar")for(let l of n)r(i,l.midi);let u=i.createGain();u.gain.value=Number.isFinite(c)?Math.min(1,Math.max(0,c)):0.8,u.connect(i.destination);let f=i.currentTime+0.05,m=n.map((l)=>{let h=f+l.time,y=h+l.duration,p=i.createGain();p.connect(u);let v;if(s==="guitar"){let w=i.createBufferSource();w.buffer=r(i,l.midi),v=w,p.gain.setValueAtTime(1,y)}else{let w=i.createOscillator();w.setPeriodicWave(o(i)),w.frequency.value=B(l.midi),v=w,p.gain.setValueAtTime(0,h),p.gain.linearRampToValueAtTime(0.35,h+0.005),p.gain.exponentialRampToValueAtTime(0.02,Math.max(h+0.01,y))}return p.gain.linearRampToValueAtTime(0,y+0.08),v.connect(p),v.start(h),v.stop(y+0.1),v}),b=()=>u.disconnect(),g=t.setTimeout(()=>{b(),d?.()},(re(n)+0.15)*1000);return{stop(){t.clearTimeout(g);for(let l of m)try{l.stop()}catch{}b()}}}}}var le="pre > code.language-tab, pre > code.language-score",M=new Map,N=null;function me(t){let e=t.defaultView;if(e.alphaTab)return Promise.resolve(e.alphaTab);return N??=new Promise((a,r)=>{let o=t.createElement("script");o.src=F().script,o.onload=()=>e.alphaTab?a(e.alphaTab):r(Error("alphaTab")),o.onerror=()=>{N=null,r(Error("Couldn't load alphaTab"))},t.head.appendChild(o)}),N}function W(t){for(let[a,{result:r,holder:o}]of M)if(!a.isConnected||!r.el.isConnected){if(r.destroy(),o.remove(),M.delete(a),a.isConnected)a.style.removeProperty("display")}let e=[...t.querySelectorAll(le)].filter((a)=>{let r=a.parentElement,o=M.get(r);if(!o)return r.dataset.mpRendered!=="pending";if(o.source===(a.textContent??""))return!1;return o.result.destroy(),o.holder.remove(),M.delete(r),!0});if(!e.length)return;for(let a of e)a.parentElement.dataset.mpRendered="pending";me(t).then((a)=>{let r=F(),o={scriptFile:null,font:r.font,soundFont:r.soundFont},n=t.defaultView;n.musicNotationSoundfontPlayer??=R(a,o,t,U(n));for(let s of e){let c=s.parentElement;if(!c.parentElement)continue;let d=s.classList.contains("language-score")?"score":"tab",i=s.textContent??"",u=t.createElement("div");u.className="mn-tab-holder",c.insertAdjacentElement("afterend",u);let f=O(d,i,u,{alphaTab:a,assets:o});M.set(c,{result:f,source:i,holder:u}),f.ready.then(({ok:m})=>{if(c.dataset.mpRendered=m?"done":"error",m&&f.el.isConnected)c.style.display="none"})}}).catch(()=>{for(let a of e)a.parentElement.dataset.mpRendered="error"})}if(!window.musicNotationTabLoaded){window.musicNotationTabLoaded=!0;let t=()=>{G(document),W(document);let e=!1;new MutationObserver(()=>{if(e)return;e=!0,requestAnimationFrame(()=>{e=!1,W(document)})}).observe(document.body,{childList:!0,subtree:!0,characterData:!0})};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",t);else t()}})();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type NotePlayer, type Sound } from './player.js';
|
|
2
|
+
export interface PlayOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Plays the notes: a player, or a function returning one at each play (null for the default),
|
|
5
|
+
* so a soundfont loaded later is used once it's there. The function gets the diagram's window
|
|
6
|
+
* (popouts have their own). The light synthesizer by default.
|
|
7
|
+
*/
|
|
8
|
+
player?: NotePlayer | ((win: Window) => NotePlayer | null | undefined);
|
|
9
|
+
/** Guitar or piano; by default the diagram's (piano for keyboards and piano chords). */
|
|
10
|
+
sound?: Sound;
|
|
11
|
+
/** 0 to 1, 0.8 by default. */
|
|
12
|
+
volume?: number;
|
|
13
|
+
/** Scales: notes per minute, 90 by default. */
|
|
14
|
+
bpm?: number;
|
|
15
|
+
/** Chords: milliseconds between strings, 40 by default. */
|
|
16
|
+
strum?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wraps each playable diagram in `el` (an SVG with notes to play) with its playback bar. Returns
|
|
20
|
+
* a function that stops whatever plays.
|
|
21
|
+
*/
|
|
22
|
+
export declare function attachPlayback(el: HTMLElement, options?: PlayOptions): () => void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hearing the diagrams (#23): what a chord, keyboard or fretboard plays, as timed notes, and a
|
|
3
|
+
* light synthesizer to play them (a plucked string for guitar, a simple piano), with no download.
|
|
4
|
+
* Apps can pass another NotePlayer (a soundfont one) for realistic sound.
|
|
5
|
+
*/
|
|
6
|
+
export type Sound = 'guitar' | 'piano';
|
|
7
|
+
export interface NoteEvent {
|
|
8
|
+
midi: number;
|
|
9
|
+
/** Seconds from the start. */
|
|
10
|
+
time: number;
|
|
11
|
+
/** Seconds. */
|
|
12
|
+
duration: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PlayHandle {
|
|
15
|
+
stop(): void;
|
|
16
|
+
}
|
|
17
|
+
export interface NotePlayer {
|
|
18
|
+
/** Plays the notes; `onEnd` runs once they're over (not after stop). */
|
|
19
|
+
play(events: NoteEvent[], options: {
|
|
20
|
+
sound: Sound;
|
|
21
|
+
volume: number;
|
|
22
|
+
onEnd?: () => void;
|
|
23
|
+
}): PlayHandle;
|
|
24
|
+
}
|
|
25
|
+
/** What a diagram plays: a chord strummed then ringing, or notes one after the other. */
|
|
26
|
+
export type PlayKind = 'chord' | 'scale';
|
|
27
|
+
export interface SequenceOptions {
|
|
28
|
+
/** Scales: notes per minute (one note per beat). */
|
|
29
|
+
bpm: number;
|
|
30
|
+
/** Chords: milliseconds between two strings of the strum. */
|
|
31
|
+
strum: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const DEFAULT_SEQUENCE: SequenceOptions;
|
|
34
|
+
/**
|
|
35
|
+
* The notes a diagram plays: a chord strums low to high and rings; a scale goes up and back down
|
|
36
|
+
* (the top note once), each note one beat long.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sequenceOf(kind: PlayKind, pitches: readonly number[], options?: SequenceOptions,
|
|
39
|
+
/** A scale's root (chroma): the run goes from the lowest root to the highest one. */
|
|
40
|
+
root?: number | null): NoteEvent[];
|
|
41
|
+
/** The end of a sequence, in seconds. */
|
|
42
|
+
export declare const lengthOf: (events: readonly NoteEvent[]) => number;
|
|
43
|
+
/**
|
|
44
|
+
* A plucked string (Karplus-Strong): a burst of noise through a delay line one period long,
|
|
45
|
+
* averaged as it loops, so the tone softens as it decays, like a string.
|
|
46
|
+
*/
|
|
47
|
+
export declare function pluckedString(midi: number, sampleRate: number, seconds: number, random?: () => number): Float32Array;
|
|
48
|
+
/** A simple piano tone: a few harmonics with a struck attack, the higher ones fading first. */
|
|
49
|
+
export declare function pianoTone(midi: number, sampleRate: number, seconds: number): Float32Array;
|
|
50
|
+
export declare function lightPlayer(win: Window): NotePlayer;
|
package/dist/publish/auto.d.ts
CHANGED
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as api from '../index.js';
|
|
8
8
|
import { lookupGuitarVoicing } from '../voicings/index.js';
|
|
9
|
+
import type { NotePlayer } from '../playback/player.js';
|
|
9
10
|
declare global {
|
|
10
11
|
interface Window {
|
|
11
12
|
musicNotationLoaded?: boolean;
|
|
12
13
|
musicNotationOptions?: unknown;
|
|
14
|
+
/** Set by the tab bundle once its soundfont is loaded: diagrams play through it. */
|
|
15
|
+
musicNotationSoundfontPlayer?: NotePlayer;
|
|
13
16
|
MusicNotation?: typeof api & {
|
|
14
17
|
lookupGuitarVoicing: typeof lookupGuitarVoicing;
|
|
15
18
|
stop: () => void;
|