@dsebastien/music-notation 0.22.0 → 0.23.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.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/blocks/renderers.d.ts +8 -1
  3. package/dist/chord/generate.d.ts +2 -0
  4. package/dist/chord/words.d.ts +4 -0
  5. package/dist/export/image.d.ts +2 -0
  6. package/dist/fretboard/exercise.d.ts +0 -16
  7. package/dist/fretboard/positions.d.ts +0 -17
  8. package/dist/i18n/en/diagrams.d.ts +139 -0
  9. package/dist/i18n/en/index.d.ts +532 -0
  10. package/dist/i18n/en/parse.d.ts +249 -0
  11. package/dist/i18n/en/play.d.ts +82 -0
  12. package/dist/i18n/en/timed.d.ts +75 -0
  13. package/dist/i18n/fr/diagrams.d.ts +139 -0
  14. package/dist/i18n/fr/index.d.ts +7 -0
  15. package/dist/i18n/fr/parse.d.ts +249 -0
  16. package/dist/i18n/fr/play.d.ts +82 -0
  17. package/dist/i18n/fr/timed.d.ts +72 -0
  18. package/dist/i18n/index.d.ts +3 -0
  19. package/dist/i18n/language.d.ts +543 -0
  20. package/dist/i18n/messages.d.ts +11 -0
  21. package/dist/i18n/page.d.ts +7 -0
  22. package/dist/i18n/translate.d.ts +21 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.js +2111 -525
  25. package/dist/index.js.map +66 -52
  26. package/dist/keyboard/scale-fingering.d.ts +1 -1
  27. package/dist/music-notation.css +25 -0
  28. package/dist/music-notation.publish.min.js +62 -37
  29. package/dist/music-notation.tab.min.js +32 -7
  30. package/dist/picking/pattern.d.ts +0 -7
  31. package/dist/playback/bar-parts.d.ts +4 -0
  32. package/dist/playback/controls.d.ts +23 -2
  33. package/dist/playback/copy-image.d.ts +6 -5
  34. package/dist/playback/engine.d.ts +34 -0
  35. package/dist/publish/auto.d.ts +2 -0
  36. package/dist/publish/index.js +2080 -527
  37. package/dist/publish/index.js.map +66 -52
  38. package/dist/tab/auto.d.ts +2 -0
  39. package/dist/tab/follow-scroll.d.ts +65 -0
  40. package/dist/tab/index.d.ts +54 -2
  41. package/dist/tab/index.js +1586 -76
  42. package/dist/tab/index.js.map +24 -9
  43. package/dist/tab/note-names.d.ts +50 -0
  44. package/dist/voicings/index.js +1323 -79
  45. package/dist/voicings/index.js.map +23 -10
  46. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- /*! @dsebastien/music-notation 0.22.0 tab bundle | MIT | loads alphaTab (MPL-2.0) from jsDelivr */
2
- (()=>{var pt=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],ht=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],ge={C:0,D:2,E:4,F:5,G:7,A:9,B:11};function U(e){let n=/^([A-Ga-g])([#♯b♭]*)$/.exec(e.trim());if(!n)return null;let t=ge[n[1].toUpperCase()];for(let r of n[2])t+=r==="#"||r==="♯"?1:-1;return(t%12+12)%12}function te(e){let n=/^([A-Ga-g][#♯b♭]*)(-?\d)$/.exec(e.trim());if(!n)return null;let t=U(n[1]);if(t===null)return null;let r=ge[n[1][0].toUpperCase()],o=Math.round((t-r)/12);return(Number(n[2])+1)*12+t-o*12}var gt=(e,n=!1)=>(n?ht:pt)[((Math.round(e)||0)%12+12)%12];var be=(e,n=!1)=>`${gt(e,n)}${Math.floor(e/12)-1}`;var bt="http://www.w3.org/2000/svg",yt=(e,n)=>{for(let[t,r]of Object.entries(n))if(r!==void 0)e.setAttribute(t,String(r))};function ne(e,n,t={},r=[]){let o=e.createElementNS(bt,n);yt(o,t);for(let s of r)if(s)o.appendChild(s);return o}function L(e,n,t,r){let o=e.createElement(n);if(t)o.className=t;if(r!==void 0)o.textContent=r;return o}var jn=`mn-name-${Math.random().toString(36).slice(2,8)}-`;var vt=new Map(Object.entries({standard:"E2 A2 D3 G3 B3 E4","drop d":"D2 A2 D3 G3 B3 E4","drop c":"C2 G2 C3 F3 A3 D4","drop b":"B1 F#2 B2 E3 G#3 C#4","drop a":"A1 E2 A2 D3 F#3 B3","double drop d":"D2 A2 D3 G3 B3 D4",dadgad:"D2 A2 D3 G3 A3 D4","open g":"D2 G2 D3 G3 B3 D4","open d":"D2 A2 D3 F#3 A3 D4","open e":"E2 B2 E3 G#3 B3 E4","open c":"C2 G2 C3 G3 C4 E4","open a":"E2 A2 E3 A3 C#4 E4","half step down":"Eb2 Ab2 Db3 Gb3 Bb3 Eb4","whole step down":"D2 G2 C3 F3 A3 D4","modal c6":"C2 A2 C3 G3 C4 E4",c6:"C2 A2 C3 G3 C4 E4",bass:"E1 A1 D2 G2",ukulele:"G4 C4 E4 A4"}));function q(e){let n=e.trim(),t=vt.get(n.toLowerCase().replace(/\s*\(.*\)$/,""));if(t)return q(t);let r=n.split(/[\s,]+/).filter(Boolean);if(r.length>1&&r.every((a)=>te(a)!==null))return r.map((a)=>te(a));let o=r.length>1?r:n.match(/[A-G][#♯b♭]?|[a-g][#♯♭]?/g)??[];if(o.length<2||o.join("")!==r.join(""))return null;let s=[];for(let a of o){let l=U(a);if(l===null)return null;let i=s[s.length-1];if(i===void 0){let u=[28,40,52].map((m)=>m-m%12+l);s.push(u.reduce((m,c)=>Math.abs(c-40)<Math.abs(m-40)?c:m))}else{let u=i-i%12+l;while(u<=i)u+=12;s.push(u)}}return s}var xt=/^\s*([A-Ga-g][#b]?|[1-8](?=\s*[|:]))?\s*[|:]?/,wt=/^[-0-9xX|:hpbrsvt/\\~^().*<>\s]*$/,kt=/^\s*([A-Za-z][A-Za-z0-9. -]{0,14}?)\s*[|:]([-xXoOgfdb#@*+|:\s]*)$/,Tt=new Map(Object.entries({hihat:"h hh hat hihat hihats","hihat-open":"oh openhat openhihat","hihat-foot":"hf fh hp ph pedal hihatfoot hihatpedal",crash:"c c1 cc cr cy cym crash crash1 cymbal",crash2:"c2 cr2 crash2",ride:"r rd rc ride",splash:"sp spl splash",china:"ch cn chi china",cowbell:"cb cow cowbell",snare:"s sd sn sr snare snaredrum",tom1:"t t1 ht tom1 hightom hitom",tom2:"t2 mt tom2 midtom",tom3:"t3 lt tom3 lowtom",floor:"f ft fl t4 tom4 floor floortom",kick:"b bd bs k kd bass kick bassdrum kickdrum"}).flatMap(([e,n])=>n.split(" ").map((t)=>[t,e])));function Mt(e,n){let t=n==="#";switch(e){case"hihat":return n==="o"||n==="O"?"HiHatOpen":"HiHatClosed";case"hihat-open":return"HiHatOpen";case"hihat-foot":return"PedalHiHatHit";case"crash":return t?"CrashHighChoke":"CrashHighHit";case"crash2":return t?"CrashMediumChoke":"CrashMediumHit";case"ride":return t?"RideChoke":"RideMiddle";case"splash":return t?"SplashChoke":"SplashHit";case"china":return t?"ChinaChoke":"ChinaHit";case"cowbell":return"CowbellMediumHit";case"snare":return"SnareHit";case"tom1":return"HighTomHit";case"tom2":return"MidTomHit";case"tom3":return"LowTomHit";case"floor":return"VeryLowTomHit";case"kick":return"KickHit"}}var St=(e)=>e==="X"||e==="O"?["ac"]:e==="g"?["g"]:[],At=/[^-0-9xXoOgfdbhprsvt/\\~^().*<>#@+|:\s]|<(?!\d)/,Et=/^\s*(?:[xX]\s*\d{1,3}|\d{1,3}\s*[xX])\s*$/;function Ct(e){let n=e.lastIndexOf("|");if(n<0)return{line:e,text:null};let t=e.slice(n+1),r=t.trim();if(!r)return{line:e,text:null};return At.test(r)||Et.test(r)||/^\s/.test(t)&&!r.includes("--")?{line:e.slice(0,n+1),text:r}:{line:e,text:null}}function Lt(e){let{line:n,text:t}=Ct(e.trimEnd()),r=null,o=xt.exec(n),s=n.slice(o[0].length);if(wt.test(s)&&(n.match(/-/g)?.length??0)>=4&&(n.includes("|")||/^\s*[A-Ga-g][#b]?\s*[-|:]/.test(n)))r={name:o[1]??null,body:s,offset:o[0].length,barred:/[|:]$/.test(o[0])};let a=null,l=kt.exec(n),i=l?l[1].toLowerCase().replace(/[ .-]/g,""):"",u=Tt.get(i);if(l&&u&&(l[2].match(/[^\s|:]/g)?.length??0)>=4)a={drum:u,name:i,body:l[2],lettered:/^[A-Ga-g]$/.test(l[1])};return r||a?{string:r,drum:a,text:t}:null}var Ce=(e)=>[...new Set(e.map((n)=>n.text).filter((n)=>n!==null))];function Nt(e){let n=[],t=0;for(let r=2;r<e.length-1;r++){let[o,s]=[e[t].string.name,e[t+1].string.name];if(o!==null&&e[r].string.name===o&&e[r+1].string.name===s&&r-t>=2)n.push(e.slice(t,r)),t=r}return n.push(e.slice(t)),n}function Ft(e){let n=[],t=[];for(let r of e){if(t.some((o)=>o.drum.name===r.drum.name))n.push(t),t=[];t.push(r)}return n.push(t),n}var Pt=/^[\sPpMm.\-_|=~]*$/,Ot=/P\.?M/i;function Dt(e){if(!Pt.test(e)||!Ot.test(e))return[];let n=[];for(let t=0;t<e.length;t++){let r=e[t];if((r==="P"||r==="p")&&/^\.?[Mm]/.test(e.slice(t+1,t+3)))n.push([t,t]);else if(r!==" "&&n.length)n[n.length-1][1]=t}return n}function ye(e,n=null){return Nt(e).flatMap((t,r)=>{let o=t.map((u)=>u.string.name);if(t.length<3&&o.some((u)=>u===null))return[];let s=t.map((u)=>u.string.body),a=t[0].string.offset,l=new Set;if(r===0&&n!==null)for(let[u,m]of Dt(n))for(let c=Math.max(u,a);c<=m;c++)l.add(c-a);let i=t.some((u)=>!u.string.barred);return[{kind:"strings",names:o,lines:s,texts:Ce(t),muted:l,openStart:i}]})}function ve(e,n){if(!e.length)return[];if(e.every((o)=>o.drum)&&e.some((o)=>!o.string||!o.drum.lettered||/[xXoOgfdb#@*+]/.test(o.drum.body)))return Ft(e).map((o)=>({kind:"drums",drums:o.map((s)=>s.drum.drum),lines:o.map((s)=>s.drum.body),texts:Ce(o)}));if(e.every((o)=>o.string))return ye(e,n);let t=[],r=[];for(let o of[...e,null])if(o?.string)r.push(o);else{if(r.length)t.push(...ye(r,t.length?null:n));r=[]}return t}function Rt(e){let n=[],t=[],r=null,o=null;for(let s of e.split(/\r?\n/)){let a=Lt(s);if(a){if(!t.length)r=o;t.push(a)}else n.push(...ve(t,r)),t=[];o=s}return n.push(...ve(t,r)),n}function xe(e,n){let t=Math.max(...e.map((i)=>i.length)),r=e.map((i)=>i.padEnd(t,"-")),o=[],s=[],a=!1,l=0;for(let i=0;i<t;i++){if(r.every((d)=>d[i]==="|"||d[i]===":")){if(a)o.push({beats:s,start:l,end:i});s=[],a=!1,l=i+1;continue}if(r.some((d)=>d[i]!==" "))a=!0;let{beat:u,skip:m,at:c}=n(r,i);if(u.length)s.push({notes:u,col:c??i});i+=m}if(a)o.push({beats:s,start:l,end:t});return o}var I=(e)=>e!==void 0&&e>="0"&&e<="9",we=(e,n)=>(e==="1"||e==="2")&&I(n)&&Number(e+n)<=24;function $t(e){let n=new Map,t=new Map,r=new Set,o=(s)=>{let a=s,l=e[a]==="(";if(l)a++;if(!I(e[a]))return{fret:null,next:s};let i=we(e[a],e[a+1])?2:1,u=Number(e.slice(a,a+i));for(let m=0;m<i;m++)r.add(a+m);if(a+=i,l&&e[a]===")")a++;return{fret:u,next:a}};for(let s=0;s<e.length;){if(!I(e[s])||r.has(s)){s++;continue}let a=we(e[s],e[s+1])?2:1,l=Number(e.slice(s,s+a));n.set(s,{fret:l,width:a});let i=[],u=e[s-1],m=s+a;if(u==="<"&&e[m]===">")i.push("nh"),m++;else if((u==="/"||u==="\\")&&!/[\d)>]/.test(e[s-2]??"-"))i.push(u==="/"?"sib":"sia");if(e[m]==="b"||e[m]==="^"){let h=o(m+1);m=h.next;let g=[0,(h.fret!==null&&h.fret>l?Math.min(h.fret-l,4):2)*2];if(e[m]==="r"){let f=o(m+1);m=f.next;let b=f.fret===null?0:(f.fret-l)*2;g.push(Math.min(g[1],Math.max(0,b)))}i.push(`b (${g.join(" ")})`)}if(e[m]==="~"||e[m]==="v"){i.push("v");while(e[m]==="~"||e[m]==="v")m++}let c=e[m],d=I(e[m+1])||e[m+1]==="("&&I(e[m+2]);if((c==="h"||c==="p")&&d)i.push("h");else if(c==="/"||c==="\\"||c==="s"){if(d)i.push("sl");else if(c!=="s")i.push(c==="/"?"sou":"sod")}if(i.length)t.set(s,i);s+=a}return{frets:n,effects:t}}var Ht=(e,n,t=[])=>(r,o)=>{let s=[],a=new Set,l=o,i=!1,u=(m,c)=>{let d=r[m][c],h=n.has(c)?["pm"]:[];if(d==="x"||d==="X"){s.push({tex:`x.${t[m]??m+1}`,effects:h}),a.add(m);return}let p=e[m].frets.get(c);if(!p)return;if(p.width===2&&c===o)i=!0;if(r[m][c-1]==="<")l=Math.min(l,c-1);s.push({tex:`${p.fret}.${t[m]??m+1}`,effects:[...e[m].effects.get(c)??[],...h],string:t[m]??m+1}),a.add(m)};if(r.forEach((m,c)=>u(c,o)),i)r.forEach((m,c)=>a.has(c)||u(c,o+1));return{beat:s,skip:i?1:0,at:l}},Y={3:[64,59,55],4:[43,38,33,28],5:[43,38,33,28,23],6:[64,59,55,50,45,40],7:[64,59,55,50,45,40,35]},ke=[64,59,55,50,45,40,35,30],re={names:["E","A","D","G","B","E"],midis:[40,45,50,55,59,64]},Bt=["E A D G","B E A D G"],oe=(e)=>e[0].toUpperCase()+e.slice(1);function se(e){let n=e.length;if(e.every((t)=>t!==null&&/^\d$/.test(t)))return e.every((t)=>ke[Number(t)-1])?e.map((t)=>ke[Number(t)-1]):null;if(e.every((t)=>t!==null&&/^[A-Ga-g]/.test(t))){let t=[...e].reverse(),r=t.map(oe).join(" ");if(Bt.includes(r))return q(r).map((a)=>a-12).reverse();let o=[...re.names.keys()].filter((a)=>t.every((l,i)=>re.names[a+i]===oe(l)));if(o.length){let a=o.length>1&&t[0]==="e"?o.at(-1):o[0];return re.midis.slice(a,a+n).reverse()}if(n===1){let a=U(oe(e[0]));return a===null?null:[48+(a-48+120)%12]}let s=q(r);if(s)return s.reverse()}return Y[n]??null}function zt(e){let n=[...Y[6]],t=n.indexOf(e);if(t<0)t=n.reduce((r,o,s)=>Math.abs(o-e)<Math.abs(n[r]-e)?s:r,0),n[t]=e;return{tuning:n,string:t+1}}function Ut(e){if(e.length===1){let{tuning:r,string:o}=zt(e[0]);return{tuning:r,strings:[o]}}let n=Y[6];if(e.length>5)return null;let t=e.map((r)=>n.indexOf(r));if(t[0]<0||t.some((r,o)=>r!==t[0]+o))return null;return{tuning:[...n],strings:t.map((r)=>r+1)}}var It=(e)=>(n,t)=>{let r=[];return n.forEach((o,s)=>{let a=o[t];if(!/[xXoOgfdb#@*+]/.test(a))return;let l=Mt(e[s],a);if(!r.some((i)=>i.tex===l))r.push({tex:l,effects:St(a)})}),{beat:r,skip:0}},Le=[[24,1,!0],[16,1,!1],[12,2,!0],[8,2,!1],[6,4,!0],[4,4,!1],[3,8,!0],[2,8,!1],[1,16,!1]];function Te(e){let n=[];for(let t=e;t>0;){let[r,o,s]=Le.find(([a])=>a<=t);n.push({duration:o,dotted:s}),t-=r}return n}var H={ts:[4,4],length:16,beat:4,grids:[1,2,4,8,16]},Me={ts:[3,4],length:12,beat:4,grids:[1,3,6,12]},Gt={ts:[6,8],length:12,beat:6,grids:[1,2,6,12]},Vt={ts:[12,8],length:24,beat:6,grids:[1,2,4,12,24]};function jt(e,n){let t=new Map;for(let o=1;o<e.length;o++){let s=e[o]-e[o-1],a=n[o]-n[o-1];if((t.get(s)??a)!==a)return!1;t.set(s,a)}let r=[...t].sort((o,s)=>o[0]-s[0]);return r.every(([,o],s)=>s===0||o>=r[s-1][1])}var _t=new Set(Le.map(([e])=>e));function Wt(e,n,[t,r],o,s,a){let l=r/n;if(l<1||s&&!Number.isInteger(l))return null;let i=[],u=0;for(let m of e){let c=(m-t)/l,d=Math.round(c),h=Math.abs(c-d)*l;if(d<0||d>=n||h>o+0.000000001||i.length&&d*(a/n)<=i.at(-1))return null;u=Math.max(u,h),i.push(d*(a/n))}if(!s&&i.some((m,c)=>!_t.has((i[c+1]??a)-m)))return null;return jt(e,i)?{at:i,error:u}:null}function ae(e,n,t,r=H){if(!e.length)return[];let o=[[t,n-t],[t,n]];for(let s=1;s<t;s++)o.push([s,n-s]);if(e[0]>t)o.push([0,n]);for(let[s,a]of[[0.4,!1],[1,!1],[0.4,!0]])for(let l of r.grids){let i=o.map((u)=>Wt(e,l,u,s,a,r.length)).filter((u)=>u!==null);if(i.length)return i.reduce((u,m)=>m.error<u.error?m:u).at}return null}function X(e,n,t=n.length){let r=[],{beat:o,length:s}=n;for(let a=e;a<t;){let l=s===4*o&&a%(2*o)===0&&a<=s/2?[2*o]:[],u=(a%2?[1]:a%o?[2,1]:[...l,o,2,1]).find((m)=>m<=t-a);r.push({beat:-1,sixteenths:u}),a+=u}return r}function qt(e,n=H,t=[]){let r=e.slice(1).map((a,l)=>a-e[l]),o=new Map;for(let a of r)o.set(a,(o.get(a)??0)+1);let s=[...o].reduce((a,l)=>!a||l[1]>a[1]||l[1]===a[1]&&l[0]<a[0]?l:a,null)?.[0];for(let a of[2,1]){let l=e.map((u,m)=>a*(m<r.length?Math.max(1,Math.round(r[m]/s)):1)),i=l.reduce((u,m)=>u+m,0);if(a===2)for(let u of t){if(i<=n.length)break;if(u+1>=l.length||l[u]!==2)continue;let m=Math.max(1,l[u+1]-1);i-=1+l[u+1]-m,l[u]=1,l[u+1]=m}if(i>n.length)continue;return[...l.map((u,m)=>({beat:m,sixteenths:u})),...X(i,n)]}return e.map((a,l)=>({beat:l,sixteenths:1}))}var Kt=new Set(["h","sl"]),Xt=(e)=>e.flatMap((n,t)=>n.notes.some((r)=>r.effects.some((o)=>Kt.has(o)))?[t]:[]);function Yt(e,n,t){let r=t.length,o=e.part==="whole"?e.width:n,s=e.part==="end"?n-e.width:0,a=e.beats.map((m)=>m.col+s);if(e.part==="start"&&a.length){let m=ae([...a,e.width],o,e.pad,t);if(m){let c=m.pop(),d=m[0]>0?[{beat:-1,sixteenths:m[0]}]:[];return m.forEach((h,p)=>d.push({beat:p,sixteenths:(m[p+1]??c)-h})),[...d,...X(c,t)]}}let l=ae(a,o,e.pad,t);if(!l){let m=qt(e.beats.map((h)=>h.col),t,Xt(e.beats));if(e.part!=="end")return m;let c=m.filter((h)=>h.beat>=0),d=c.reduce((h,p)=>h+p.sixteenths,0);return e.pickup?c:[...X(0,t,r-d),...c]}let i=l[0],u=i===0||e.pickup?[]:e.part==="end"?X(0,t,i):[{beat:-1,sixteenths:i}];return l.forEach((m,c)=>u.push({beat:c,sixteenths:(l[c+1]??r)-m})),u}var Zt=(e)=>e.reduce((n,t)=>t.beats.length?Math.min(n,t.beats[0].col-t.start):n,3);function Se(e,n,t,r){let o=Math.max(...e.map((s)=>s.length));return{bars:n,pad:Zt(n),texts:t,openStart:r&&n[0]?.start===0,openEnd:n.at(-1)?.end===o}}function Jt(e){let n=[];for(let t of e)t.bars.forEach((r,o)=>{if((o>0||!t.openStart)&&(o<t.bars.length-1||!t.openEnd)&&r.beats.length)n.push(r.end-r.start)});if(n.length<2)return null;return n.sort((t,r)=>t-r),n[n.length>>1]}function Ne(e){let n=new Map;for(let r of e)n.set(r,(n.get(r)??0)+1);let t;for(let[r,o]of n)if(!t||o>t.count||o===t.count&&r<t.value)t={value:r,count:o};return t}function Qt(e,n){if(n===null)return H;let t=[];for(let m of e)m.bars.forEach((c,d)=>{let h=(d>0||!m.openStart)&&(d<m.bars.length-1||!m.openEnd),p=c.end-c.start;if(h&&c.beats.length&&Math.abs(p-n)<=1)t.push({bar:c,pad:m.pad})});let r=new Map;for(let{bar:m}of t)for(let c=1;c<m.beats.length;c++){let d=m.beats[c].col-m.beats[c-1].col;r.set(d,(r.get(d)??0)+1)}let o=Math.max(0,...r.values()),s=Math.min(...[...r].filter(([,m])=>m*2>=o).map(([m])=>m));if(t.length<2||!Number.isFinite(s))return H;let a=[],l=0,i=0;for(let{bar:m,pad:c}of t){let d=m.beats.map((b)=>(b.col-m.start-c)/s);if(d.some((b)=>Math.abs(b-Math.round(b))*s>0.40000000100000005)){a.push(0);continue}let h=d.map(Math.round),p=Math.max(Math.ceil((m.end-m.start-c)/s-0.5),h.at(-1)+1);if(a.push(p),p!==6)continue;let g=m.beats.reduce((b,y)=>y.notes.reduce((x,A)=>Math.max(x,A.string??0),b),0),f=h.filter((b,y)=>m.beats[y].notes.some((x)=>x.string===g));for(let b of[h,f.length<h.length?f:[]])if(b.some((y)=>y!==0&&y%2===0)&&b.every((y)=>y%2===0))l++;else if(b.includes(3)&&b.every((y)=>y%3===0))i++}let u=Ne(a);if(u.count*3<t.length*2)return H;if(u.value===3)return Me;if(u.value===6)return l>i?Me:Gt;return u.value===12?Vt:H}function en(e,n){let t=(s)=>n!==null&&s<=n*2/3,r=[],o=null;return e.forEach((s,a)=>{let l=r.length,i=e[a+1];s.bars.forEach((m,c)=>{let d=m.beats.map((f)=>({notes:f.notes,col:f.col-m.start})),h={beats:d,width:m.end-m.start,pad:s.pad,part:"whole",pickup:!1,text:null},p=c===0&&o!==null;if(o&&c===0){let f=o.width-s.pad;h={...o,beats:[...o.beats,...d.map((b)=>({notes:b.notes,col:b.col+f}))],width:o.width+h.width-s.pad},o=null}if(c===s.bars.length-1&&t(h.width)){let f=i?.bars[0],b=f?h.width+f.end-f.start-i.pad:0;if(f&&(s.openEnd||t(f.end-f.start)&&(i.openStart||b<=n*1.25))){if(h.beats.length||!s.openEnd)o=h;return}if(s.openEnd&&!p){if(!h.beats.length)return;h.part="start"}}let g=!r.length;if(c===0&&!p&&h.part==="whole"&&t(h.width)&&h.beats.length){if(g||s.openStart)h.part="end",h.pickup=g}r.push(h)});let u=o??(r.length>l?r.at(-1):null);if(s.texts.length&&u){let m=s.texts.join(" / ");u.text=u.text?`${u.text} / ${m}`:m}}),r}function tn(e,n){return e.flatMap((t)=>{if(t.part!=="whole"||t.beats.length<2)return[t];let r=t.beats.map((c)=>c.col);if(ae(r,t.width,t.pad,n))return[t];let o=r.slice(1).map((c,d)=>c-r[d]),s=Ne(o).value,a=o.reduce((c,d)=>c+Math.max(1,Math.round(d/s)),1),l=n.length/2,i=s*l;if(a<=l||t.width-t.pad<i*1.5)return[t];let u=Math.floor((r.at(-1)-t.pad)/i)+1,m=Array.from({length:u},()=>[]);for(let c of t.beats){let d=Math.min(u-1,Math.max(0,Math.floor((c.col-t.pad)/i)));while(d<u-1&&c.col>=t.pad+(d+1)*i)d++;while(d>0&&c.col<t.pad+d*i)d--;m[d].push({notes:c.notes,col:c.col-d*i})}return m.map((c,d)=>({beats:c,width:t.pad+i,pad:t.pad,part:"whole",pickup:!1,text:d===u-1?t.text:null}))})}var nn=(e)=>`"${e.replace(/[\\"]/g,(n)=>`\\${n}`)}"`,K=(e,n)=>n.length?`${e}{${n.join(" ")}}`:e;function rn(e,n){if(!e.length)return K("r",n);if(e.length===1)return K(e[0].tex,[...e[0].effects,...n]);return K(`(${e.map((t)=>K(t.tex,t.effects)).join(" ")})`,n)}var Ae=new Set(["h","sl","sou","sod"]);function on(e,n){if(n===1)return[e];let t=[e.map((r)=>({...r,effects:r.effects.filter((o)=>!Ae.has(o))}))];for(let r=1;r<n;r++)t.push(e.filter((o)=>o.string!==void 0).map((o)=>({tex:`-.${o.string}`,effects:o.effects.filter((s)=>s==="pm"||r===n-1&&Ae.has(s))})));return t}function Ee(e,n){let t=0;return e.map(({beats:o,rhythm:s,text:a,pickup:l})=>{let i=[];if(!o.length)for(let c of n===H?[{duration:1,dotted:!1}]:Te(n.length))i.push({notes:[],...c});for(let{beat:c,sixteenths:d}of s){let h=Te(d),p=on(c>=0?o[c]:[],h.length);h.forEach((g,f)=>i.push({notes:p[f],...g}))}let u=i.length-1;while(u>0&&!i[u].notes.length)u--;if(!i[u].notes.length)u=i.length-1;let m=i.map((c,d)=>{let h=c.dotted?["d"]:[];if(a&&d===u)h.push(`txt ${nn(a)}`);let p=c.duration===t?"":`:${c.duration} `;return t=c.duration,p+rn(c.notes,h)}).join(" ");return l?`\\ac ${m}`:m}).join(` |
3
- `)}function Fe(e){let n=Rt(e),t=n[0];if(!t)return null;let r=t.kind==="strings"?se(t.names):null,o=r?Ut(r):null;if(o)r=o.tuning;let s=[];if(t.kind==="drums"){for(let d of n)if(d.kind==="drums")s.push(Se(d.lines,xe(d.lines,It(d.drums)),d.texts,!1))}else{let d=JSON.stringify(se(t.names)),h=o?.strings??[];for(let p of n){if(p.kind!=="strings"||JSON.stringify(se(p.names))!==d)continue;let g=Ht(p.lines.map($t),p.muted,h);s.push(Se(p.lines,xe(p.lines,g),p.texts,p.openStart))}}let a=Jt(s),l=Qt(s,a),i=tn(en(s,a),l).map((d)=>({beats:d.beats.map((h)=>h.notes),rhythm:Yt(d,a??0,l),text:d.text,pickup:d.pickup}));if(!i.length)return null;let u=l===H?[]:[`\\ts ${l.ts.join(" ")}`];if(t.kind==="drums")return["\\instrument percussion","\\articulation defaults",...u,Ee(i,l)].join(`
4
- `);let m=r?.join(" ")===Y[6].join(" ");return[...r&&!m?[`\\tuning (${r.map((d)=>be(d)).join(" ")})`]:[],...u,Ee(i,l)].join(`
5
- `)}var sn={play:"M4 2.5v11l9-5.5z",pause:"M4 3h3v10H4zM9 3h3v10H9z",stop:"M4 4h8v8H4z",all:"M1.5 2.5v11l6.5-5.5zM8 2.5v11l6.5-5.5z",loop:"M3 8a5 5 0 0 1 8.5-3.5L13 6V2.5M13 8a5 5 0 0 1-8.5 3.5L3 10v3.5",count:"M5.5 14h5L9 2.5H7zM8 11.5l4.5-7",click:"M3 5v6M8 5v6M13 5v6",copy:"M2.5 3.5h11v9h-11zM2.5 11l3.5-3.5 3 3 2-2 2.5 2.5M10.5 6.5h.01",full:"M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10",exit:"M6 2.5V6H2.5M13.5 6H10V2.5M10 13.5V10h3.5M2.5 10H6v3.5"},an=new Set(["loop","count","click","copy","full","exit"]);function G(e,n){let t=ne(e,"svg",{class:`mn-play-icon mn-play-icon-${n}${an.has(n)?" mn-play-icon-line":""}`,viewBox:"0 0 16 16",width:12,height:12,"aria-hidden":"true"});return t.appendChild(ne(e,"path",{d:sn[n]})),t}function Pe(e,n,t){let r=L(e,"div",`mn-play mn-play-static ${n}`);return r.addEventListener("mousedown",(o)=>o.stopPropagation()),r.setAttribute("role","group"),r.setAttribute("aria-label",t),r}function B(e,n,t,r){let o=L(e,"button",n);return o.type="button",o.appendChild(G(e,r)),o.title=t,o.setAttribute("aria-label",t),o}function Z(e,n,t,r,o,s){let a=B(e,n,t,r),l=()=>{a.setAttribute("aria-pressed",String(o)),a.classList.toggle("mn-on",o)};return a.addEventListener("click",()=>{o=!o,s(o),l()}),l(),a}var ie=0.8;function Oe(e){let n=e;if(typeof e==="function")try{n=e()}catch{n=void 0}return typeof n==="number"&&Number.isFinite(n)?Math.min(1,Math.max(0,n)):ie}var ln=Symbol.for("@dsebastien/music-notation/volume"),mn=globalThis,De=mn[ln]??=new Set,Re=(e)=>typeof e==="number"&&Number.isFinite(e)?Math.min(1,Math.max(0,e)):null;function $e(e,n,t){let r=Re(t),o=()=>{let s=Re(e());if(s===null||s===r)return;r=s;for(let a of n())a.setVolume?.(s)};return De.add(o),()=>{De.delete(o)}}var cn=new Set(["PageUp","PageDown","Home","End","ArrowUp","ArrowDown"]);function un(e){let n=e.ownerDocument.defaultView;if(!n)return"";for(let t=e.parentElement;t;t=t.parentElement){let r=n.getComputedStyle(t).backgroundColor;if(r&&r!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(r))return r}return""}function He(e,n,t,r=()=>{},o={}){let s=o.redraws!==!1,a=e.defaultView,l=B(e,"mn-tab-full","Full screen","full");l.classList.add("mn-play-full");let i=!1,u=!1,m=!1,c=null,d=null,h=!1,p="",g=(k)=>{if(m===k)return;m=k,r(k)},f=()=>{n.classList.toggle("mn-fullscreen",i),l.classList.toggle("mn-on",i),l.setAttribute("aria-pressed",String(i)),l.title=i?"Exit full screen":"Full screen",l.replaceChildren(G(e,i?"exit":"full"))},b=()=>{if(i)return;if(i=!0,c={x:a?.scrollX??0,y:a?.scrollY??0,background:n.style.backgroundColor},!h)p=n.style.minHeight;h=!1,d=e.createElement("div"),d.className="mn-fullscreen-place",d.style.height=`${n.offsetHeight}px`;let k=a?.getComputedStyle(n);if(k)d.style.marginTop=k.marginTop,d.style.marginBottom=k.marginBottom;n.before(d);let M=un(n);if(M)n.style.backgroundColor=M;f(),t.tabIndex=0,t.focus({preventScroll:!0}),g(!0),o.changed?.(!0);try{n.requestFullscreen?.().catch(()=>{})}catch{}},y=(k=!0)=>{if(!i)return;if(i=!1,g(!1),f(),n.style.backgroundColor=c?.background??"",d){if(s)n.style.minHeight=d.style.height,h=!0;d.remove(),d=null}if(t.removeAttribute("tabindex"),t.scrollTop=0,u&&e.fullscreenElement===n)e.exitFullscreen?.().catch(()=>{});if(u=!1,c&&a)a.scrollTo(c.x,c.y);if(c=null,o.changed?.(!1),k)l.focus({preventScroll:!0})};l.addEventListener("click",()=>i?y():b()),n.addEventListener("keydown",(k)=>{if(!i||k.key!=="Escape")return;k.stopPropagation(),k.preventDefault(),y()});let x=()=>{if(i)g(!1)};t.addEventListener("wheel",x,{passive:!0}),t.addEventListener("touchmove",x,{passive:!0}),t.addEventListener("keydown",(k)=>{if(cn.has(k.key))x()});let A=(k)=>{if(!i||k.key!==" "||k.ctrlKey||k.metaKey||k.altKey)return;if(!n.isConnected){y(!1);return}if(k.target?.closest("input:not([type=range]), textarea, select, [contenteditable=true]"))return;if(k.preventDefault(),k.stopPropagation(),k.type!=="keydown"||k.repeat)return;n.querySelector(".mn-play .mn-play-toggle")?.click()};e.addEventListener("keydown",A,!0),e.addEventListener("keyup",A,!0);let F=()=>{if(e.fullscreenElement===n)u=!0;else if(u)y()};return e.addEventListener("fullscreenchange",F),f(),{button:l,active:()=>i,playing:()=>{if(i)g(!0)},drawn:()=>{if(i||!h)return;h=!1,n.style.minHeight=p},destroy:()=>{y(!1),e.removeEventListener("fullscreenchange",F),e.removeEventListener("keydown",A,!0),e.removeEventListener("keyup",A,!0)}}}function Be(e){if(!e||typeof e!=="object")return!0;return e.fullScreen!==!1}var ze=[1,1.25,1.5,1.75,2,2.5,3];function Ue(e,n){let t=null,r=!1,o=(s)=>{t=s,e(ze[s],!0)};return{enter(){r=!1,o(0)},leave(){t=null,r=!1,e(1,!1)},drawn(){if(t===null)return;if(r){t=null;return}if(n()){if(t+1<ze.length)o(t+1);else t=null;return}if(t>0)r=!0,o(t-1);else t=null}}}var Ie=0.25,Ge=1.5,z=5,Q=(e)=>Math.min(Ge,Math.max(Ie,e));function Ve(e,n,t){let r=t;for(let o of e){if(o.start>n)break;for(let s of o.tempoChanges)if(s.tick<=n)r=s.tempo}return r!==null&&Number.isFinite(r)&&r>0?r:t}function je(e,n){return Q(e/n)}var J=(e,n)=>Math.round(e*n);function le(e,n,t,r){if(t==="bpm"&&r)return je(J(e,r)+n,r);let o=Math.round(e*100),s=n>0?Math.floor(o/z)*z+z:Math.ceil(o/z)*z-z;return Q(s/100)}function dn(e,n,t){let r=`${Math.round(e*100)} %`;if(!t)return{value:String(Math.round(e*100)),unit:"%",other:""};let o=`${J(e,t)} BPM`;return n==="bpm"?{value:String(J(e,t)),unit:"BPM",other:r}:{value:String(Math.round(e*100)),unit:"%",other:o}}function fn(e,n,t){let r=Number(e.replace(",",".").replace(/[^\d.]/g,""));if(!e.trim()||!Number.isFinite(r)||r<=0)return null;return n==="bpm"&&t?je(r,t):Q(r/100)}function _e(e,n){let t=1,r=n.unit??"bpm",o=L(e,"span","mn-tempo");o.setAttribute("role","group"),o.setAttribute("aria-label","Tempo");let s=(f,b,y)=>{let x=L(e,"button",f,b);return x.type="button",x.setAttribute("aria-label",y),x.title=y,x},a=s("mn-tempo-down","−","Slower"),l=s("mn-tempo-up","+","Faster"),i=L(e,"input","mn-tempo-value");i.type="text",i.inputMode="numeric",i.size=3,i.autocomplete="off";let u=s("mn-tempo-unit","BPM","Show the speed in percent"),m=s("mn-tempo-other","","Back to 100 %"),c=!1;i.addEventListener("input",()=>c=!0);let d=()=>n.tempo()?r:"percent",h=()=>{let f=n.tempo(),b=dn(t,d(),f);if(!c)i.value=b.value;i.setAttribute("aria-label",b.unit==="BPM"?"Tempo in BPM":"Speed in percent"),u.textContent=b.unit,u.hidden=!f;let y=d()==="bpm"?"percent":"BPM";u.setAttribute("aria-label",`Show the speed in ${y}`),u.title=`Show the speed in ${y}`,m.textContent=b.other?`· ${b.other}`:"",m.hidden=!b.other,m.disabled=t===1,o.title=f?`Tempo: ${J(t,f)} BPM, ${Math.round(t*100)} % of ${Math.round(f)} BPM`:`Speed: ${Math.round(t*100)} %`,a.disabled=t<=Ie,l.disabled=t>=Ge},p=(f)=>{c=!1,t=Q(f),n.set(t),h()};a.addEventListener("click",()=>p(le(t,-1,d(),n.tempo()))),l.addEventListener("click",()=>p(le(t,1,d(),n.tempo()))),m.addEventListener("click",()=>p(1)),u.addEventListener("click",()=>{r=d()==="bpm"?"percent":"bpm",n.unitChanged?.(r),h()});let g=()=>{let f=fn(i.value,d(),n.tempo());if(c=!1,f===null)h();else p(f)};return i.addEventListener("change",g),i.addEventListener("keydown",(f)=>{if(f.key==="Enter")f.preventDefault(),g(),i.select();else if(f.key==="Escape")f.stopPropagation(),c=!1,i.blur(),h();else if(f.key==="ArrowUp"||f.key==="ArrowDown")f.preventDefault(),p(le(t,f.key==="ArrowUp"?1:-1,d(),n.tempo())),i.select()}),i.addEventListener("blur",()=>{c=!1,h()}),o.append(a,i,u,l,m),h(),{field:o,speed:()=>t,refresh:h}}function qe(e){if(!e||typeof e!=="object"||!("play"in e))return;let n=e.play;if(!n||typeof n!=="object"||!("instruments"in n))return;let t=n.instruments;return typeof t==="string"&&t.trim()?t.trim():void 0}function Ke(e){let n=new Set,t=!1;for(let r of e.tracks)if(r.isPercussion)t=!0;else n.add(r.playbackInfo.program);return{programs:[...n].sort((r,o)=>r-o),drums:t}}function pn(e,n){let t=[];for(let r of n.programs){let o=e.programs[String(r)];if(!o?.file)return null;t.push(o.file)}if(n.drums){if(!e.drums?.file)return null;t.push(e.drums.file)}else if(e.click?.file&&n.click!==!1)t.push(e.click.file);return t.length?t:null}var We=new WeakMap,hn=(e)=>typeof e==="object"&&e!==null&&("programs"in e)&&typeof e.programs==="object"&&e.programs!==null;async function Xe(e,n,t){let r=We.get(t);if(!r)We.set(t,r=new Map);let o=r.get(e);if(!o)r.set(e,o={index:null,files:new Map});let s=async(m)=>{try{if(typeof e==="function")return await e(m);let c=await t.fetch(`${e.replace(/\/+$/,"")}/${m}`);return c.ok?new Uint8Array(await c.arrayBuffer()):null}catch{return null}},a=(m)=>{let c=o.files.get(m);if(!c)c=s(m),o.files.set(m,c),c.then((d)=>{if(!d)o.files.delete(m)});return c};o.index??=s("index.json").then((m)=>{if(!m)return null;try{let c=JSON.parse(new TextDecoder().decode(m));return hn(c)?c:null}catch{return null}});let l=await o.index;if(!l)return o.index=null,null;let i=pn(l,n);if(!i)return null;let u=await Promise.all(i.map(a));return u.every((m)=>m!==null)?u:null}var gn="1.9.0",_=(e=gn)=>{let n=`https://cdn.jsdelivr.net/npm/@coderline/alphatab@${e}/dist`;return{script:`${n}/alphaTab.min.js`,font:`${n}/font/Bravura.woff2`,soundFont:`${n}/soundfont/sonivox.sf3`}};async function ce(e,n,t,r,o=!1){let s=n.defaultView,a=ee(n),l=null;if(t.instruments&&s)l=await Xe(t.instruments,r,s);let i=l?"instruments":"whole";if(!l)if(typeof t.soundFont==="string"){try{let c=await s?.fetch(t.soundFont);l=c?.ok?[new Uint8Array(await c.arrayBuffer())]:null}catch{l=null}if(!l)throw Error(`Couldn't load the soundfont (${t.soundFont})`)}else l=[t.soundFont];let u=l,m=0;return await new Promise((c)=>{e.soundFontLoaded.on(()=>{if(++m>=u.length)c()}),setTimeout(c,8000),u.forEach((d,h)=>e.loadSoundFont(a.bytes(d),o||h>0))}),i}var bn=/^\s*(staves|file|tracks?)\s*:\s*(.*)$/i;function yn(e,n){let t=n.split(/\r?\n/),r={staves:e,stavesWritten:!1,file:null,tracks:null,tex:"",texLine:0,fromText:!1},o=0;for(;o<t.length;o++){let a=t[o];if(!a.trim()||/^\s*\/\//.test(a))continue;let l=bn.exec(a);if(!l)break;let i=l[1].toLowerCase(),u=l[2].trim();if(i==="staves"){let m=u.toLowerCase();if(m!=="tab"&&m!=="score"&&m!=="both")throw Error(`staves: use tab, score or both, got "${u}"`);r.staves=m,r.stavesWritten=!0}else if(i==="file")r.file=u.replace(/^!?\[\[|\]\]$/g,"").split(/[|#]/)[0].trim()||null;else{let m=u.split(/[\s,]+/).filter(Boolean).map(Number);if(!m.length||m.some((c)=>!Number.isInteger(c)||c<1))throw Error(`tracks: use track numbers from 1, got "${u}"`);r.tracks=m}}while(o<t.length&&!t[o].trim())o++;if(r.texLine=o,r.tex=t.slice(o).join(`
6
- `).trimEnd(),!r.file&&!r.tex)throw Error("Write the music in alphaTex, or give a file: [[Song.gp]]");let s=r.file?null:Fe(r.tex);if(s!==null)r.tex=s,r.fromText=!0;return r}function Ye(e,n){let t=e?.cause??e;for(let r of["lexerDiagnostics","parserDiagnostics","semanticDiagnostics"]){let o=t?.[r]?.items;if(!Array.isArray(o))continue;let s=o.find((a)=>a.severity===2&&a.message);if(s)return`${s.start&&n!==null?`line ${s.start.line+n}, column ${s.start.col}: `:""}${s.message}`}return e instanceof Error?e.message:String(e)}var vn=0;function Ze(e,n){for(let t of n.tracks)for(let r of t.staves){if(r.isPercussion)for(let s of r.bars??[])s.clef=vn;let o=!r.isPercussion&&r.tuning.length>0;if(e==="both"){r.showStandardNotation=!0,r.showTablature=o;continue}r.showSlash=!1,r.showNumbered=!1,r.showTablature=e==="tab"&&o,r.showStandardNotation=!r.showTablature}}var xn=5;function wn(e,n){if(n!==null&&/\bdy\b|\\showdynamics/i.test(n))return;if(!e.tracks.some((r)=>r.staves.some((o)=>o.bars.some((s)=>s.voices.some((a)=>a.beats.some((l)=>!l.isRest&&l.dynamics!==xn))))))e.stylesheet.hideDynamics=!0}var kn="rendered by alphaTab";function Tn(e,n){e.renderer?.partialRenderFinished?.on((r)=>{for(let o of n.querySelectorAll(".at-surface > div")){if(o.layoutResultId!==r.id)continue;let s=typeof r.renderResult==="string"&&r.renderResult.includes(kn);o.style.visibility=s?"hidden":""}})}function Je(e,n,t=1){let r=e.createElement("canvas");r.width=1,r.height=1;let o=r.getContext("2d",{willReadFrequently:!0});if(!o)return null;o.fillStyle="#000",o.fillStyle=n,o.fillRect(0,0,1,1);let s=o.getImageData(0,0,1,1).data;if(s.length<4)return null;return`rgba(${s[0]}, ${s[1]}, ${s[2]}, ${(s[3]/255*t).toFixed(3)})`}function Mn(e){let n=e.ownerDocument,t=n.defaultView?.getComputedStyle(e).color||"",r=t&&Je(n,t)||(/^rgba?\(/.test(t)?t:"rgba(0, 0, 0, 1)"),o=t&&Je(n,t,0.6)||r;return{mainGlyphColor:r,secondaryGlyphColor:o,scoreInfoColor:r,staffLineColor:o,barSeparatorColor:r,barNumberColor:o}}var ee=(e)=>{let n=e.defaultView??globalThis;return{map:(t)=>new n.Map(t),bytes:(t)=>{let r=new n.Uint8Array(t.length);return r.set(t),r}}},Qe=(e)=>{let n=Math.max(0,Math.round(e/1000));return`${Math.floor(n/60)}:${String(n%60).padStart(2,"0")}`};function Sn(e,n,t,r,o,s={}){let a=Pe(e,"mn-tab-bar","Playback"),l={loop:!1,metronome:!1,countIn:!1,speed:1},i=()=>Oe(o),u=()=>{},m=null,c=null,d=()=>(m??=new Promise((w)=>{if(c=()=>w(!1),n.settings.player.playerMode=t.PlayerMode.EnabledSynthesizer,n.settings.player.enableCursor=!0,!r.instruments){if(n.playerReady.on(()=>w(!0)),typeof r.soundFont==="string")n.settings.player.soundFont=r.soundFont;if(n.updateSettings(),r.soundFont instanceof Uint8Array)n.loadSoundFont(ee(e).bytes(r.soundFont),!1);return}let v=!1,N=!1,T=()=>{if(v&&N)w(!0)};n.playerReady.on(()=>{v=!0,T()}),n.updateSettings();let S=n.score?Ke(n.score):{programs:[],drums:!1};ce(n,e,r,S).then(()=>{N=!0,T()},(C)=>{w(!1),u(C instanceof Error?C.message:String(C))})}).then((w)=>{if(w)n.isLooping=l.loop,n.metronomeVolume=l.metronome?1:0,n.countInVolume=l.countIn?1:0,n.playbackSpeed=l.speed,n.masterVolume=i();return w}),m),h=(w)=>{if(n.player)w()},p=B(e,"mn-play-toggle","Play","play");p.addEventListener("click",()=>{d().then((w)=>{if(w)n.playPause()})}),u=(w)=>{p.disabled=!0,p.title=`Can't play: ${w}`,p.setAttribute("aria-label",p.title)};let g=B(e,"mn-tab-stop","Stop","stop");g.addEventListener("click",()=>h(()=>n.stop()));let f=()=>h(()=>{n.isLooping=l.loop,n.metronomeVolume=l.metronome?1:0,n.countInVolume=l.countIn?1:0}),b=Z(e,"mn-tab-loop","Loop","loop",!1,(w)=>{l.loop=w,f()}),y=Z(e,"mn-tab-click","Metronome","click",!1,(w)=>{l.metronome=w,f()}),x=Z(e,"mn-tab-count","Count-in","count",!1,(w)=>{l.countIn=w,f()}),A=n.score?.tempo??null,F=_e(e,{...s.tempoUnit?{unit:s.tempoUnit}:{},tempo:()=>A,set:(w)=>{l.speed=w,h(()=>n.playbackSpeed=l.speed)},...s.onTempoUnit?{unitChanged:s.onTempoUnit}:{}}),k=L(e,"span","mn-tab-time","");a.append(p,g,b,y,x,F.field,k);let M=$e(i,()=>[{stop(){},setVolume:(w)=>h(()=>n.masterVolume=w)}],i());return n.playerStateChanged.on((w)=>{let v=Number(w.state)===Number(t.synth.PlayerState.Playing);p.replaceChildren(G(e,v?"pause":"play")),p.title=v?"Pause":"Play",p.setAttribute("aria-label",p.title)}),n.playerPositionChanged.on((w)=>{k.textContent=`${Qe(w.currentTime)} / ${Qe(w.endTime)}`;let v=Ve(n.tickCache?.masterBars??[],w.currentTick,n.score?.tempo??null);if(v!==A)A=v,F.refresh()}),{bar:a,speed:()=>l.speed,destroy:M,failed:(w)=>{c?.(),u(w)}}}function An(e,n){return e.tracks.some((t,r)=>(!n||n.includes(r+1))&&t.staves.some((o)=>!o.isPercussion&&o.tuning.length>0))}var En=[{staves:"tab",label:"Tab",what:"tablature"},{staves:"score",label:"Score",what:"standard notation"},{staves:"both",label:"Both",what:"standard notation and tablature"}];function Cn(e,n,t,r){let o=L(e,"span","mn-tab-views");o.setAttribute("role","group"),o.setAttribute("aria-label","View");let s=n.staves,a=r?L(e,"button","mn-tab-keep","Keep this view"):null,l=En.map(({staves:u,label:m,what:c})=>{let d=L(e,"button","mn-tab-view",m);d.type="button",d.dataset.staves=u;let h=u!==n.staves?"":n.written?" (this block's staves: line)":" (the default: the block has no staves: line)";return d.title=`Draw as ${c}${h}`,d.addEventListener("click",()=>{if(u===s)return;s=u,i(),t(u)}),o.appendChild(d),d}),i=()=>{for(let u of l){let m=u.dataset.staves===s;u.classList.toggle("mn-on",m),u.setAttribute("aria-pressed",String(m))}if(a)a.hidden=s===n.staves,a.title=`Write staves: ${s} at the top of the block`};if(a&&r)a.type="button",a.addEventListener("click",()=>r(s)),o.appendChild(a);return i(),o}function ue(e,n,t,r){let o=t.ownerDocument,s=L(o,"div",`mn-block mn-block-${e} mn-tab`);t.appendChild(s);let a=null,l=()=>1,i=()=>{},u=!1,m=!1,c=()=>{},d=new Promise((p)=>{c=(g)=>{if(m)return;m=!0,p(g)}}),h=(p)=>{s.replaceChildren(L(o,"div","mn-error-message",`${e}: ${p}`)),s.classList.add("mn-error"),c({ok:!1,error:p})};if(!n.trim())s.classList.add("mn-empty"),c({ok:!0,error:null});else(async()=>{await Promise.resolve();let p=yn(e,n),g={staves:p.stavesWritten?p.staves:r.defaultStaves??p.staves,written:p.stavesWritten},f=g.staves,b=!1,y=r.alphaTab;if(!y?.AlphaTabApi)throw Error("alphaTab isn't loaded");let x=L(o,"div","mn-tab-surface");s.appendChild(x);let{assets:A}=r,F=ee(o),k={core:{useWorkers:Boolean(A.scriptFile),...A.scriptFile?{scriptFile:A.scriptFile}:{},smuflFontSources:F.map([[y.FontFileFormat.Woff2,A.font]]),logLevel:y.LogLevel.Warning,enableLazyLoading:!1},display:{staveProfile:"Default",resources:Mn(s)},player:{playerMode:y.PlayerMode.Disabled,enableSeekToClick:!0,enablePlaybackRangeSelection:!0,scrollMode:y.ScrollMode.Off}},M=new y.AlphaTabApi(x,k);if(a=M,M.settings.player.scrollElement=x,u){M.destroy();return}r.onApi?.(M);let w=[];M.scoreLoaded.on((T)=>{w=T.tracks.flatMap((S)=>S.staves.map((C)=>({showSlash:C.showSlash,showNumbered:C.showNumbered}))),Ze(f,T),b=An(T,p.tracks),wn(T,p.file?null:p.tex)}),Tn(M,x);let v=null;M.renderFinished.on(()=>{if(m||u)return;if(r.player!==!1){if(v=Sn(o,M,y,A,r.volume,r),i=v.destroy,l=v.speed,s.appendChild(v.bar),r.views!==!1&&b)v.bar.appendChild(Cn(o,g,(T)=>{f=T;let S=M.score;if(u||!S)return;S.tracks.flatMap((R)=>R.staves).forEach((R,E)=>Object.assign(R,w[E])),Ze(T,S),M.render()},r.onKeepView));if(r.fullScreen!==!1){let T=null,S=Ue((E,D)=>{let P=M.settings.display;if(u||!P)return;T??={scale:P.scale,fill:P.lastSystemFillThreshold},P.scale=D?E:T.scale,P.lastSystemFillThreshold=D?0:T.fill,M.updateSettings(),M.render()},()=>x.scrollHeight<=x.clientHeight+1),C=He(o,s,x,(E)=>{M.settings.player.scrollMode=E?y.ScrollMode.OffScreen:y.ScrollMode.Off,M.updateSettings()},{changed:(E)=>E?S.enter():S.leave()});M.postRenderFinished.on(()=>{let E=x.querySelector(".at-surface");if(E&&C.active()){let D=Math.max(0,...[...E.children].map((P)=>{let O=P;return O.offsetTop+O.offsetHeight}));if(D>E.offsetHeight)E.style.height=`${D}px`}S.drawn()}),M.playerStateChanged.on((E)=>{if(Number(E.state)===Number(y.synth.PlayerState.Playing))C.playing()}),M.renderFinished.on(()=>C.drawn()),v.bar.appendChild(C.button);let R=i;i=()=>{C.destroy(),R()}}s.addEventListener("pointerdown",(T)=>{if(T.pointerType!=="touch"||v?.bar.contains(T.target))return;s.classList.toggle("mn-play-open")})}c({ok:!0,error:null})}),M.error.on((T)=>{let S=p.fromText?`Couldn't draw this text tab: ${Ye(T,null)}`:Ye(T,p.texLine);if(m)v?.failed(S);else h(S)});let N=p.tracks?.map((T)=>T-1);if(p.file){let T;try{T=r.resolveFile?await r.resolveFile(p.file):null}catch(C){throw Error(`Couldn't read "${p.file}": ${C instanceof Error?C.message:String(C)}`,{cause:C})}if(u)return;if(!T)throw Error(`Couldn't find the file "${p.file}"`);if(!M.load(F.bytes(T),N))throw Error(`Couldn't read "${p.file}": not a score file alphaTab knows`)}else M.tex(p.tex,N??"all")})().catch((p)=>{if(!u)h(p instanceof Error?p.message:String(p))});return{el:s,ready:d,get api(){return a},speed:()=>l(),destroy(){u=!0,i();try{a?.destroy()}catch{}s.remove(),c({ok:!1,error:null})}}}var V={guitar:25,piano:0},j={channel:1,program:28},me={channel:9,key:33},Ln=0.5;function Nn(e,n){return{reportsStart:!0,play(t,{sound:r,volume:o,onEnd:s,onStart:a}){let l=n(),i=l?.player;if(!l||!i)throw Error("The soundfont player is not ready");let u=new e.midi.MidiFile,m=new e.midi.AlphaSynthMidiFileHandler(u,!0),c=(f)=>Math.round(f*u.division);if(m.addTempo(0,60),m.addProgramChange(0,0,0,V[r]),r==="guitar"&&t.some((f)=>f.kind==="muted"))m.addProgramChange(0,0,j.channel,j.program);if(t.some((f)=>f.kind==="click"))m.addProgramChange(0,0,me.channel,0);let d=Number.isFinite(o)?Math.min(1,Math.max(0,o)):0.8;l.masterVolume=d;for(let f of t){let b=f.velocity===void 0||!Number.isFinite(f.velocity)?100:Math.round(Math.min(127,Math.max(1,f.velocity))),y=f.kind==="click"?me.channel:f.kind==="muted"&&r==="guitar"?j.channel:0;m.addNote(0,c(f.time),Math.max(1,c(f.duration)),f.kind==="click"?me.key:f.midi,b,y)}let h=Math.max(...t.map((f)=>f.time+f.duration),0);m.addControlChange(0,c(h+Ln),0,e.midi.ControllerType.HoldPedal,0),l.playbackSpeed=1,i.playOneTimeMidiFile(u);let p=!1;queueMicrotask(()=>{if(!p)a?.()});let g=setTimeout(()=>s?.(),(h+0.2)*1000);return{stop(){p=!0,clearTimeout(g),i.stop()},setVolume(f){if(p||!Number.isFinite(f))return;l.masterVolume=Math.min(1,Math.max(0,f))}}}}}function de(e,n,t,r){let o=null,s=null,a=null,l=new Set,i=new Map,u=!n.instruments,m=(p)=>p==="guitar"?[V.guitar,j.program]:[V[p]],c=(p="guitar")=>{if(a)return a;s=L(t,"div","mn-tab-hidden"),s.setAttribute("aria-hidden","true"),t.body.appendChild(s);let g=ee(t);o=new e.AlphaTabApi(s,{core:{useWorkers:Boolean(n.scriptFile),...n.scriptFile?{scriptFile:n.scriptFile}:{},smuflFontSources:g.map([[e.FontFileFormat.Woff2,n.font]])},player:{playerMode:e.PlayerMode.EnabledSynthesizer,enableCursor:!1,scrollMode:e.ScrollMode.Off,...typeof n.soundFont==="string"&&!n.instruments?{soundFont:n.soundFont}:{}}});let f=o;if(a=new Promise((b)=>{let y=!1,x=!f.playerReady,A=()=>{if(y&&x)b(!0)},F=()=>{y=!0,A(),setTimeout(()=>{x=!0,A()},4000)};if(f.playerReady?.on(()=>{x=!0,A()}),f.error.on(()=>b(!1)),n.instruments)ce(f,t,n,{programs:m(p),drums:!1}).then((k)=>{if(k==="whole")u=!0;else l.add(p);F()},()=>b(!1));else f.soundFontLoaded.on(F)}),n.soundFont instanceof Uint8Array&&!n.instruments)f.loadSoundFont(g.bytes(n.soundFont),!1);return f.tex(`\\track "Guitar" \\instrument ${V.guitar} r \\track "Piano" \\instrument ${V.piano} r \\track "Muted" \\instrument ${j.program} r`),a},d=async(p)=>{if(!await c(p))return!1;if(u||l.has(p)||!o)return!0;let g=o,f=i.get(p);if(!f)f=ce(g,t,n,{programs:m(p),drums:!1,click:!1},!0).then((b)=>{if(b==="whole")u=!0;else l.add(p);return!0},()=>!1),i.set(p,f);return f},h=Nn(e,()=>o);return{reportsStart:!0,play(p,g){let f=null,b=!1,y=g.volume;return d(g.sound).then((x)=>{if(b)return;try{if(x){f=h.play(p,{...g,volume:y});return}}catch{}if(!r)return;if(f=r.play(p,{...g,volume:y}),!r.reportsStart)g.onStart?.()}),{stop(){b=!0,f?.stop()},setVolume(x){y=x,f?.setVolume?.(x)}}},destroy(){try{o?.destroy()}catch{}s?.remove(),o=null,a=null,l.clear(),i.clear(),u=!n.instruments}}}function et(e=()=>_().script){let n=null;return(t)=>{let r=t.defaultView;if(r.alphaTab)return Promise.resolve(r.alphaTab);return n??=new Promise((o,s)=>{let a=t.createElement("script");a.src=e();let l=r.define?.amd?r.define:void 0;if(l)r.define=void 0;let i=(u)=>{if(l&&r.define===void 0)r.define=l;if(u===null&&r.alphaTab){o(r.alphaTab);return}n=null,a.remove(),s(Error(u??"alphaTab's script didn't define alphaTab"))};a.onload=()=>i(null),a.onerror=()=>i("Couldn't load alphaTab"),t.head.appendChild(a)}),n}}var tt=`/* Music notation. Colors follow Obsidian's theme variables when present, with fallbacks for any page. */
1
+ /*! @dsebastien/music-notation 0.23.0 tab bundle | MIT | loads alphaTab (MPL-2.0) from jsDelivr */
2
+ (()=>{var on=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],rn=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],Ve={C:0,D:2,E:4,F:5,G:7,A:9,B:11};function ne(e){let t=/^([A-Ga-g])([#♯b♭]*)$/.exec(e.trim());if(!t)return null;let n=Ve[t[1].toUpperCase()];for(let o of t[2])n+=o==="#"||o==="♯"?1:-1;return(n%12+12)%12}function Te(e){let t=/^([A-Ga-g][#♯b♭]*)(-?\d)$/.exec(e.trim());if(!t)return null;let n=ne(t[1]);if(n===null)return null;let o=Ve[t[1][0].toUpperCase()],r=Math.round((n-o)/12);return(Number(t[2])+1)*12+n-r*12}var Ae=(e,t=!1)=>(t?rn:on)[((Math.round(e)||0)%12+12)%12];var qe=(e,t=!1)=>`${Ae(e,t)}${Math.floor(e/12)-1}`;var We={"render.layout.orientation":'Unknown orientation "{text}": use vertical or horizontal',"render.layout.hand":'Unknown hand "{text}": use left or right',"render.rootMark.invalid":'root-mark: write color or shape, got "{text}"',"render.rootListsOnly":"root only applies to lists of notes on fretboards and keyboards (notes: C E G with root: C): a chord has its own root","render.unknownChord":`Didn't recognize "{written}": try {suggestions}`,"render.tuning":'Unknown tuning "{text}"',"render.yesNo":'{key} must be yes or no, got "{text}"',"render.hand.left":"left hand","render.hand.right":"right hand","render.positions.exerciseOne":"exercise plays one position: write position: 1 (not positions:)","render.positions.needsSet":"positions needs a scale or a chord: e.g. A minor pentatonic or arpeggio: Am7","render.positions.arpeggioCaged":"Arpeggios use CAGED shapes, not 3nps: leave shape out","render.positions.range":"positions: use all, or numbers from 1 to {count} for {title}","render.positions.fromMinor":" (from {root}m)","render.positions.arpeggioTitle":"{title} arpeggio","render.positions.shapeTitle":"{name}, {shape} shape","render.positions.npsTitle":"{name}, 3nps {n}{from}","render.positions.boxTitle":"{name}, box {n}{from}","render.fingering.handTitle":"{title}, {hand}","render.voicings.notBoth":"Use triads or voicings, not both","render.voicings.fretted":"voicings are for guitar and other fretted instruments","render.voicings.noFrets":'voicings finds the frets itself: remove "{value}"',"render.voicings.needsChord":"voicings needs a chord: e.g. A Major","render.voicings.instrument":'Unknown instrument "{instrument}": use guitar, or give a tuning',"render.voicings.maxStrings":"voicings works on up to {max} strings","render.voicings.count":"voicings: use all, or a number from 1 to {max}","render.voicings.area":'area: use open, or frets like 5-9 (up to 24), got "{area}"',"render.voicings.rootString":"root-string: use a string number from 1 (the highest) to {count}","render.voicings.inversion":'inversion: use 0 (root), 1, 2, 3 or any, got "{inversion}"',"render.voicings.manyStringsAny":"On {count} strings, inversion: any needs six strings or fewer: add e.g. strings: 1-6","render.voicings.wideArea":"a wide area","render.voicings.oneWidening":"On {count} strings, use one of {list} at a time","render.noVoicing.gaps":"strings {strings} aren't next to each other: add gaps: yes","render.noVoicing.rootString":"root-string {string} isn't among strings {strings}","render.noVoicing.inversion":"{symbol} has {notes} notes: inversion goes up to {max}","render.noVoicing.bass":"No voicing of {chord} has its bass on string {string}: try another root-string","render.noVoicing.none":"No playable voicing of {chord} fits: widen the area, allow open strings or add stretch: yes","render.triads.noFrets":'triads finds the frets itself: remove "{value}"',"render.triads.fretted":"triads are for guitar and other fretted instruments: give a tuning","render.triads.strings":"triads: give three strings next to each other, e.g. 1-3 or 2-4","render.triads.inversion":'inversion: use 0 (root position), 1, 2 or any, got "{inversion}"',"render.triads.keyInversion":"With a key, pick one inversion: 0, 1 or 2","render.triads.key":'Unknown key "{text}": use e.g. key: G major or key: E minor',"render.triads.needsChord":"triads needs a chord (e.g. G) or a key (key: G major)","render.triads.notTriad":"{symbol} isn't a triad (three notes): try voicings: all","render.triads.none":"No triad fits on these strings: try another string set","render.transitions.needsFrom":"Add the chord you hold: from: C (with its frets: from: C x32010)","render.transitions.fretted":"Transitions are for guitar and other fretted instruments: give a tuning","render.transitions.notBoth":"Use from and to, or progression, not both","render.transitions.refused":`"{key}" can't be used with {with}`,"render.transitions.maxStrings":"Transitions work on up to {max} strings","render.transitions.twoChords":"progression: give two chords or more, e.g. G D Em C","render.transitions.maxChords":"progression: at most {max} chords","render.transitions.noVoicings":"No playable voicings for this progression","render.transitions.needsTo":"Add the next chord: to: D","render.transitions.noHeld":"No playable voicing of {chord}: add its frets","render.transitions.stringCount":'"{frets}" has {have} strings, the tuning {count}',"render.transitions.count":"count: use a number from 1 to {max}","render.transitions.noTarget":"No playable voicing of {chord}","render.modes.none":'"{value}" has no modes: use e.g. modes: C major',"render.modes.refused":`"{key}" can't be used with modes: only {allowed}`,"render.row.notShared":`"{key}" can't be shared: move it to a diagram. Shared settings: {allowed}`,"render.row.columns":'columns must be a whole number from 1 to 12, got "{text}"',"render.row.needsDiagram":'Add a diagram after the shared settings: a "---" line, then the diagram',"render.row.max":"At most {max} diagrams per block, found {found}","render.row.columnsShared":'"columns" goes in the shared settings, before the first "---"',"render.row.ownRow":'"{key}" draws its own row: use it in a block of its own',"render.row.exercise":"exercise draws a tab under one diagram: use it in a block of its own","render.row.diagram":"diagram {n}: {message}","render.row.sharedHint":' (shared settings before the first "---" may only hold: {allowed})',"fretboard.capo":"Capo {fret}","fretboard.title":"Fretboard: {title}","fretboard.note.open":"{note} open","fretboard.note.fret":"{note} at fret {fret}","fretboard.note.root":" (root)","fretboard.string":"String {n} ({name}): {notes}.","fretboard.pick.open":"String {string}, open","fretboard.pick.fret":"String {string}, fret {fret}","fretboard.exercise.direction":'exercise: use up, down or up-down, got "{text}"',"fretboard.exercise.rhythm":'rhythm: use 8ths, triplets or 16ths, got "{text}"',"fretboard.exercise.scale":'Unknown scale "{text}"',"fretboard.exercise.chord":'Unknown chord "{text}"',"fretboard.exercise.needsSet":"An exercise needs a scale or an arpeggio: e.g. scale: A minor or arpeggio: Am7","fretboard.exercise.arpeggioCaged":"Arpeggios use CAGED shapes: position 1 to 5, or shape: E, D, C, A or G (not 3nps)","fretboard.exercise.positions":"{title} has {count} {system} positions: use position 1 to {count}","fretboard.exercise.tuning":'Unknown tuning "{text}"',"fretboard.exercise.capo":"capo: use a fret from 1 to 12 (0 for none), got {text}","fretboard.positions.numbering":'numbering: use minor (positions from the relative minor), got "{text}"',"fretboard.positions.numberingPentatonic":"numbering: minor is for major pentatonic positions (e.g. A major pentatonic), not {title}","fretboard.positions.numberingCaged":"numbering: minor numbers boxes and 3nps positions, not CAGED shapes","fretboard.positions.position":'position must be a whole number from 1, got "{text}"',"fretboard.positions.shape":'Unknown shape "{text}": use C, A, G, E, D or 3nps',"keyboard.fingering.finger":'fingering: fingers go from 1 (thumb) to 5 (little finger), got "{text}"',"keyboard.fingering.autoNeedsScale":"fingering: auto goes with a major or minor scale (scale: G major): write one finger per note, e.g. fingering: 1 2 3 4 5","keyboard.fingering.autoUnknown":"fingering: auto knows the major, natural minor, harmonic minor and melodic minor scales: write the fingers for {scale}, root to root, e.g. fingering: 1 2 3 1 2 3 4 5","keyboard.piano.shell":"Shell voicings need a third and a seventh or sixth (C7, Cmaj7, Cm7, C6): {symbol} has none","keyboard.piano.rootless":"Rootless voicings are for major, minor, dominant (sus4 too) and half-diminished seventh or sixth chords and major or minor triads (Cmaj7, Cm7, C7, C7sus4, Cm7b5, C6, C, Cm): not {symbol}","keyboard.piano.octave":'octave: use a number from 0 to 8, got "{text}"',"keyboard.piano.inversion":'inversion: use 0 (root position), 1, 2 or 3, got "{text}"',"keyboard.piano.slashInversion":"{symbol} already says its bass: leave inversion out","keyboard.piano.inversionStyle":"inversion goes with close or open voicings, not {style}","keyboard.piano.inversionMax":"{symbol} has {notes} notes: inversion goes up to {max}","keyboard.piano.open":"Open voicings need three notes or more: {symbol} has {notes}","keyboard.piano.offKeys":"octave {octave} puts {symbol} off the piano's keys: try octave 3 or 4","keyboard.piano.inversionWord":'inversion: use root, first, second, third (or 0 to 3), got "{text}"',"keyboard.piano.octaveMiddle":`octave: use a number from 0 to 8 (4 is middle C's), got "{text}"`,"keyboard.piano.voicing":'voicing: use close, open, shell, shell R-7, rootless A or rootless B, got "{text}"',"keyboard.piano.key":'Unknown key "{text}": use e.g. key: C minor or key: Eb',"keyboard.piano.resolvesTo":'resolves-to: write a chord, e.g. resolves-to: Cm, got "{text}"',"keyboard.piano.hands":'hands: use left+right, left or right, got "{text}"',"keyboard.title":"Keyboard: {title}","keyboard.hand":"{hand}: {keys}","keyboard.handMark.left":"LH","keyboard.handMark.right":"RH","keyboard.whiteKey":"White key {n}","keyboard.blackKey":"Black key {n}","keyboard.lit.root":"root","keyboard.lit.finger":"finger {finger}","keyboard.lit.keys":"Keys: {keys}.","circle.label":"Circle of fifths, {key}: {signature}{accidentals}; chords: {chords}","circle.or":"or","circle.mode.major":"major","circle.mode.minor":"minor","circle.mode.ionian":"ionian","circle.mode.dorian":"dorian","circle.mode.phrygian":"phrygian","circle.mode.lydian":"lydian","circle.mode.mixolydian":"mixolydian","circle.mode.aeolian":"aeolian","circle.mode.locrian":"locrian","circle.key":'Unknown key "{text}": use e.g. key: G, key: Em or key: D dorian',"circle.mode":'Unknown mode "{text}": use major, minor, dorian, phrygian, lydian, mixolydian or locrian',"circle.modeTwice":"key: {key} already says {mode}: leave out mode or write the key's note alone","circle.chords":'chords: use triads or sevenths, got "{text}"',"circle.dominant":'dominant: use major (V, from the harmonic minor) or minor (v), got "{text}"',"keyboard.piano.unknownChord":'Unknown chord "{symbol}"'};var Ke={"blocks.source.expected":'Expected "key: value", got "{line}"',"blocks.source.strings":"strings: use string numbers from 1 (the highest) to {count}, e.g. 1-4","blocks.caption.fingeringChordOnly":"caption: fingering is for chord blocks: use formula or none here","blocks.caption.useAll":'caption: use fingering (the fingering in words), formula (notes and intervals), fingering, formula (both) or none, got "{written}"',"blocks.caption.useFormula":'caption: use formula (notes and intervals) or none, got "{written}"',"blocks.noteSet.chordOrArpeggio":"Use chord or arpeggio, not both","blocks.noteSet.invalidRoot":'Invalid root "{root}": use a note name, e.g. root: C',"blocks.noteSet.notAList":'"{head}" is not a list of notes: use e.g. notes: C Eb G',"blocks.noteSet.addNotesForRoot":"Add the notes for the root: e.g. notes: C Eb G","blocks.noteSet.addRoot":"Add a root note: C {scale}","blocks.noteSet.addSource":'Add "scale:", "chord:" or "notes:"',"blocks.noteSet.rootListsOnlyScale":"root only applies to lists of notes (notes: C E G): a scale has its own root","blocks.noteSet.rootListsOnlyChord":"root only applies to lists of notes (notes: C E G): a chord has its own root","blocks.noteSet.unknownLabelsFingers":'Unknown labels "{value}": use notes, degrees, intervals, fingers or none',"blocks.noteSet.unknownLabels":'Unknown labels "{value}": use notes, degrees, intervals or none',"blocks.noteSet.invalidNotes":'Invalid notes "{notes}"',"blocks.noteSet.unknownScale":'Unknown scale "{scale}"',"blocks.noteSet.unknownChord":'Unknown chord "{chord}"',"blocks.noteSet.notAScaleChordOrList":'"{head}" is not a scale, chord or list of notes',"blocks.noteSet.highlightNeedsIntervals":"highlight needs a scale, a chord or a root: a list of notes has no intervals (add e.g. root: C)","blocks.noteSet.notInSet":`"{label}" isn't in {title}: use its intervals (R, b3, 5…)`,"theory.key.needsSharps":"{name} needs {count} sharps: write {write}","theory.key.needsFlats":"{name} needs {count} flats: write {write}","theory.key.noSignature":"no ♯ or ♭","theory.harmonize.unknownScale":'Unknown scale "{text}": use e.g. key: G major, key: A harmonic minor or key: D dorian',"theory.harmonize.sevenNotes":"harmonize needs a scale of 7 notes: {name} has {count}","theory.harmonize.noNamedChord":"not a named chord","theory.harmonize.noFifth":"no perfect fifth","theory.harmonize.noFourthOrSecond":"no perfect fourth or major second","blocks.progression.yesNo":'{key} must be yes or no, got "{text}"',"blocks.progression.majorMinorKeys":'Progression keys are major or minor: write key: {tonic} major or key: {tonic} minor, got "{text}"',"blocks.progression.unknownKey":'Unknown key "{text}": use e.g. key: G, key: Em or key: F# minor',"blocks.progression.unread":`Didn't read "{token}": write roman numerals (I V vi IV, bVII, V7, V/V, I6, V65), Nashville numbers (1 5 6m 4) or chords (G D Em C)`,"blocks.progression.harmonizeKind":'harmonize: write triads, sevenths, sus or power, got "{kind}"',"blocks.progression.harmonizeNothing":"harmonize: write triads, sevenths, sus or power, got nothing","blocks.progression.harmonizeNoChords":"harmonize draws the chords of the scale: leave out the chords ({written})","blocks.progression.addScale":"Add the scale: e.g. key: A harmonic minor","blocks.progression.transposeWhole":"transpose must be a whole number of semitones, e.g. transpose: -2","blocks.progression.addChords":"Add the chords: e.g. I V vi IV with key: G, 1 5 6m 4, or G D Em C","blocks.progression.addKey":"Add the key: e.g. key: G or key: E minor","blocks.progression.unknownTuning":'Unknown tuning "{text}"',"blocks.progression.tempo":'tempo: write beats a minute from {min} to {max}, got "{text}"',"blocks.progression.strum":"strum: write beats, bar, arpeggio or a strumming pattern (D DU UDU): {reason}","blocks.progression.key":"Key: {name}","blocks.progression.blues":"(blues)","blocks.progression.orKeys":"(or {list})","blocks.progression.leftOut":"Left out: {list}","blocks.progression.leftOutDegree":"degree {degree} ({note}), {reason}","blocks.progression.unknownInstrument":'Unknown instrument "{instrument}": use guitar or piano',"blocks.progression.numerals":'numerals: use roman, nashville or none, got "{style}"',"blocks.progression.voiceLeadingPiano":"voice-leading is for piano: add instrument: piano","blocks.progression.pianoOnly":"{key} is for piano chords: add instrument: piano","blocks.progression.voiceLeadingHands":"voice-leading goes with hands: left+right (a left-hand bass under each chord), not left or right alone","blocks.progression.voiceLeadingOrKey":"Use voice-leading or {key}, not both","blocks.progression.addChordsAfterShared":'Add the chords after the shared settings, after a "---" line',"blocks.progression.maxChords":"At most {max} chords per block, found {count}","theory.chord.suggest":"{root}, {root}m, {root}7 or {spelled} {quality}","blocks.render.maxStrings":"At most {max} strings","blocks.render.invalidRange":'Invalid range "{text}": use e.g. C3-B4',"blocks.render.maxKeys":"At most {max} keys: give a smaller range, e.g. range: C3-B5","blocks.render.wholeFrom1":'{what} must be a whole number from 1, got "{text}"',"blocks.render.unrecognized":`Didn't recognize "{written}": try {suggestions}`,"blocks.render.rootForListsOnly":"root only applies to lists of notes on fretboards and keyboards (notes: C E G with root: C): a chord has its own root","blocks.chord.capoNotPiano":"capo is for guitar and other fretted instruments, not piano","blocks.chord.pitchesGivenKeys":"{given} goes with a chord symbol: pitches are already the keys to play","blocks.chord.autoNeedsSymbol":"fingering: auto goes with a chord symbol: write the fingers, e.g. 1 3 5","blocks.chord.invalidPitches":'Invalid pitches "{text}"',"blocks.chord.autoCovers":"fingering: auto covers triads and four-note chords (sevenths, sixths) in close position, and rootless and shell voicings one hand can reach: write the fingers, e.g. fingering: 1 2 3 4 5","blocks.chord.addSymbolOrPitches":'Add a chord symbol or "pitches:"',"blocks.chord.unknownInstrument":'Unknown instrument "{instrument}": use guitar or piano, or give a tuning',"blocks.chord.invalidFrets":'Invalid frets "{text}": use e.g. x02220',"blocks.chord.nutAtCapo":"With frets-from: nut, every sounding fret is at the capo ({capo}) or above: write x for strings behind it","blocks.chord.capoMaxFret":"With capo {capo}, frets go up to {max}","blocks.chord.fingersCount":'"{text}" has {fingers} fingers for {strings} strings',"blocks.chord.noVoicing":'No voicing {n} found for "{symbol}": add "frets:"',"blocks.chord.addFretsFor":'Add "frets:" for {symbol} (e.g. frets: x02220)',"blocks.chord.addSymbolAndFrets":'Add a chord symbol and "frets:"',"blocks.chord.positionAboveLowest":"position {base} is above the lowest fretted note (fret {fret})","blocks.chord.tuningStrings":"The tuning has {tuning} strings, the frets {frets}","blocks.chord.soundsTitle":"{sounding} ({shape} shape)","blocks.chord.captionFormulaChord":"caption: formula needs a chord the library knows: add its symbol (e.g. symbol: A)","blocks.chord.captionFormulaSet":"caption: formula needs a chord or a scale the library knows: add chord: or scale:","blocks.chord.soundsTitleNeedsChord":"sounds: title needs a chord the library knows: add its symbol (e.g. symbol: A)","blocks.chord.soundsNeedsCapo":"sounds goes with a capo: add e.g. capo: 2","blocks.chord.soundsYesNeedsChord":"sounds: yes needs a chord the library knows: add its symbol (e.g. symbol: A), or write the chord: sounds: B","blocks.chord.soundsMismatch":"With capo {capo}, {shape} sounds {sounding}, not {value}: write sounds: {sounding} (or sounds: yes)","blocks.chord.unknownLabels":'Unknown labels "{text}": use fingers, intervals, notes or none',"blocks.chord.labelsNeedChord":"labels: {value} needs a chord the library knows","blocks.keyboard.autoBothAlone":"fingering: auto both draws two keyboards: put it in a block of its own, not in a --- row","blocks.keyboard.fingersCount":"fingering has {fingers} fingers: {title} needs {needed}, one per note from the root up to the root above","blocks.keyboard.fingersForNotes":"fingering has {fingers} fingers for {notes} notes: one finger per note, in the order written","blocks.keyboard.keyTwice":"A key is listed twice: one finger per key","blocks.keyboard.pastRange":"The fingered notes go past the range: widen range: or leave it out","blocks.keyboard.handTitleLeft":"{title}, left hand","blocks.keyboard.handTitleRight":"{title}, right hand","blocks.fretboard.invalidFrets":'Invalid frets "{text}": use e.g. 5-8',"blocks.fretboard.maxFret":"Frets go up to {max}","blocks.fretboard.nutStartsAtCapo":"With frets-from: nut, frets start at the capo ({capo}) or above: e.g. frets: {capo}-{example}","blocks.fretboard.numberingNeedsPosition":"numbering goes with a position: e.g. position: 1 or positions: all","blocks.fretboard.positionsNeedSet":"Positions need a scale or a chord: e.g. scale: A minor or arpeggio: Am7","blocks.fretboard.arpeggioCaged":"Arpeggios use CAGED shapes: position 1 to 5, or shape: E, D, C, A or G (not 3nps)","blocks.fretboard.positionCount":"{title} has {count} {named} positions: use position 1 to {count}","blocks.fretboard.positionNotFit":"{title}, position {n} doesn't fit in frets {from}-{to}: widen frets: or leave it out","blocks.fretboard.rhythmNeedsExercise":"rhythm goes with exercise: e.g. exercise: up-down","blocks.fretboard.exerciseNeedsPosition":"exercise plays one position: add position: 1 (or shape: E)","blocks.fretboard.invalidTempo":'Invalid tempo "{text}": use beats a minute from 20 to 240, e.g. tempo: 80',"blocks.fretboard.arpeggioTitle":"{name} arpeggio","blocks.fretboard.fromMinor":" (from {minor}m)","blocks.fretboard.shapeTitle":"{name}, {shape} shape","blocks.fretboard.threeNpsTitle":"{name}, 3nps {n}{from}","blocks.fretboard.boxTitle":"{name}, box {n}{from}","blocks.scalesFor.both":"Use scales-for (chords) or scales-for-notes, not both","blocks.scalesFor.findsItself":'{key} finds the scale itself: remove "{what}"',"blocks.scalesFor.addChords":"Add the chords: e.g. scales-for: G D Em C","blocks.scalesFor.addNotes":"Add the notes: e.g. scales-for-notes: C D E G A","blocks.scalesFor.unreadChords":`Didn't read the chords "{text}": use chord symbols, e.g. scales-for: G D Em C`,"blocks.scalesFor.unreadNotes":`Didn't read the notes "{text}": use note names, e.g. scales-for-notes: C D E G A`,"blocks.scalesFor.outside":", {notes} outside","blocks.scalesFor.bluesTitle":"{tonic} blues scale for {listed} (or {pentatonic}, {mixolydian})","blocks.scalesFor.title":"{name} for {listed}{outside}","chord.capo.fret":'capo: use a fret from 1 to {max}, got "{text}"',"chord.capo.fretsFrom":'frets-from: use capo (the default) or nut, got "{text}"',"theory.naming.write":"naming: write letters, solfege or german","theory.naming.writeDirective":"naming: write {letters}, {solfege} or {german}","chord.words.ordinalFirst":"1st","chord.words.ordinalSt":"{n}st","chord.words.ordinalNd":"{n}nd","chord.words.ordinalRd":"{n}rd","chord.words.ordinalTh":"{n}th","chord.words.listAnd":"{head} and {last}","chord.words.guitarIndex":"Index","chord.words.guitarMiddle":"Middle","chord.words.guitarRing":"Ring","chord.words.guitarPinky":"Pinky","chord.words.guitarThumb":"Thumb","chord.words.guitarFinger":"Finger {finger}","chord.words.pianoThumb":"thumb","chord.words.pianoIndex":"index finger","chord.words.pianoMiddle":"middle finger","chord.words.pianoRing":"ring finger","chord.words.pianoLittle":"little finger","chord.words.pianoFinger":"finger {finger}","chord.words.lowName":"low {name}","chord.words.highName":"high {name}","chord.words.stringNamed":"the {name} string","chord.words.stringsNamed":"the {names} strings","chord.words.stringNumberedNote":"the {n} string ({note})","chord.words.stringNumbered":"the {n} string","chord.words.capoFrom":"Capo on the {fret} fret: frets count from the capo.","chord.words.capoNut":"Capo on the {fret} fret.","chord.words.allMuted":"Every string is muted: no note sounds.","chord.words.strumSix":"Strum all six strings.","chord.words.strumAll":"Strum every string.","chord.words.strumFrom":"Strum from {from}.","chord.words.strumFromTo":"Strum from {from} to {to}.","chord.words.press":"Press {string} at the {fret} fret.","chord.words.fingerOn":"{finger} on {strings}, {fret} fret.","chord.words.fingerBars":"{finger} bars the {fret} fret, strings {from} to {to}.","chord.words.fingerAlsoOn":"{finger} also on {string}, {fret} fret.","chord.words.muteOne":"Mute {list}: let a fretting finger touch it lightly.","chord.words.mutePlural":"Mute {list}: let a fretting finger touch them lightly.","chord.words.groupRingOpenOne":"The {list} string rings open.","chord.words.groupRingOpenPlural":"The {list} strings ring open.","chord.words.groupRingCapoOne":"The {list} string rings at the capo.","chord.words.groupRingCapoPlural":"The {list} strings ring at the capo.","chord.words.ringOpenOne":"{list} rings open.","chord.words.ringOpenPlural":"{list} ring open.","chord.words.ringCapoOne":"{list} rings at the capo.","chord.words.ringCapoPlural":"{list} ring at the capo.","chord.words.pianoFingerOn":"{finger} on {key}","chord.words.pianoAlsoPlay":"{fingered}, and also play {list}","chord.words.sentence":"{text}.","chord.words.play":"Play {list}.","chord.words.leftHand":"Left hand: {part}.","chord.words.rightHand":"Right hand: {part}.","chord.transition.fingerIndex":"index finger","chord.transition.fingerMiddle":"middle finger","chord.transition.fingerRing":"ring finger","chord.transition.fingerPinky":"pinky","chord.transition.fingerThumb":"thumb","chord.transition.fingerOther":"finger","chord.transition.keep":"Keep your {finger} on {string}'s {fret} fret.","chord.transition.slide":"Slide your {finger} along {string} from fret {from} to {to}.","chord.transition.moveUp":"Move your hand up {shift} frets.","chord.transition.moveDown":"Move your hand down {shift} frets.","chord.transition.lift":"Lift all your fingers together and place them as one shape.","chord.guitar.capoCaption":"Capo {capo}","chord.guitar.capoCaptionSounds":"Capo {capo}, sounds {sounds}","chord.guitar.diagram":"Chord diagram","chord.guitar.diagramTitled":"{title} chord diagram","chord.guitar.rootOnString":"The root is on string {list}.","chord.guitar.rootOnStrings":"The root is on strings {list}.","chord.triads.rootPosition":"root position","chord.triads.firstInversion":"1st inversion","chord.triads.secondInversion":"2nd inversion","theory.formula.chord":"{written} ({root} {words}{bass}): {notes}.","theory.formula.inTheBass":", {bass} in the bass","theory.formula.formula":"Formula {formula}.","theory.formula.alsoWritten":"Also written {list}.","theory.formula.scale":"{title}: {notes}.","theory.formula.steps":"Steps {steps}.","chords.chart.chorus":"Chorus","chords.chart.bridge":"Bridge","chords.chart.tab":"Tab","chords.chart.grid":"Grid","chords.chart.key":"Key {key}","chords.chart.capo":"Capo {capo}","chords.chart.tempo":"{bpm} BPM","chords.chart.transposed":"Transposed {amount}","chords.chart.sounds":"{title} (sounds {sounding})","chords.chart.moreNotDrawn":"{count} more chords not drawn (at most {max})","chords.chart.missing":"No diagram for {names}: give the shape with {how}","chords.chart.howPiano":"{syntax} (semitones above the root, e.g. keys 0 4 7)","chords.chart.howGuitar":"{syntax} (one fret per string, x for a muted one)","chords.define.needsName":"{syntax} needs a chord name: e.g. {example}","chords.define.baseFret":"{at}: base-fret takes one whole number from 1 to 24, e.g. base-fret 3","chords.define.frets":"{at}: frets takes one value per string (2 to {max}): a fret from 0 to 24, or x for a muted string, e.g. frets x 0 2 2 1 0","chords.define.keys":"{at}: keys takes semitones above the root, from 0 to {max}, e.g. keys 0 4 7","chords.define.copy":"{at}: {word} takes the name of one chord, e.g. {word} Am","chords.define.unknown":'{at}: unknown "{word}": use base-fret, frets, fingers, keys, copy, display or diagram',"chords.define.fingersCount":"{at}: fingers has {fingers} values for {strings} strings: give one per string (0 for none)","chords.define.reaches":"{at}: the shape reaches fret {top}: frets go up to {max}","chords.directive.diagrams":"{at}: use on, off, top or bottom","chord.shape.open":"Open","chord.shape.caged":"{letter} shape","chord.shape.cagedStrings":"{letter} shape (strings {strings})","chord.shape.power":"Power chord","chord.shape.triad":"Triad","chord.shape.shell":"Shell","chord.shape.drop":"Drop {n} (strings {strings})","chord.shape.hendrix":"Hendrix chord","chord.shape.openBass":"Open bass","chord.shape.openStrings":"Open strings","chord.shape.strings":"Strings {strings}","blocks.function.tonic":"tonic","blocks.function.subdominant":"subdominant","blocks.function.dominant":"dominant","blocks.function.secondaryDominant":"secondary dominant","blocks.function.neapolitan":"neapolitan","blocks.function.borrowed":"borrowed","blocks.function.chromatic":"chromatic","blocks.function.tonicization":"tonicization","blocks.function.passing":"passing","theory.marks.characteristic":", characteristic notes: {notes}","theory.marks.different":", different from the compared scale: {notes}","theory.marks.chordTones":", chord tones: {notes}"};var _e={"playback.bar":"Playback","playback.diagram":"Diagram","playback.place":"({n} of {total})","playback.playItem":"Play {name}","playback.playAll":"Play all in turn","playback.play":"Play","playback.stop":"Stop","playback.loop":"Loop","playback.countIn":"Count-in","playback.click":"Click","playback.sound":"Sound","playback.guitar":"Guitar","playback.piano":"Piano","playback.tempo":"Tempo (BPM)","playback.unit.bpm":"BPM","playback.unit.ms":"ms","playback.strum":"Strum (ms between strings)","playback.dotted":"counts dotted quarters","playback.strumPattern.bar":"Play the strumming pattern","playback.picking.bar":"Play the picking pattern","playback.progression.bar":"Play the chords in time","playback.progression.play":"Play in time","playback.strumChoice":"Strum","playback.strum.beats":"On the beats","playback.strum.bar":"Once a bar","playback.strum.arpeggio":"Arpeggio","playback.strum.pattern":"Pattern","playback.copy.button":"Copy as image","playback.copy.hint":"Shift+click copies the whole block","playback.copy.bar":"Image","playback.copy.copied":"Copied","playback.copy.refused":"Allow clipboard access for this page, then try again.","playback.copy.unsupported":"This browser can't copy images: use a recent Chrome, Edge, Safari or Firefox.","playback.copy.failed":"The image couldn't be made.","playback.full.enter":"Full screen","playback.full.exit":"Exit full screen","playback.redraw.sounds":"{heading} (sounds {chord})","playback.redraw.guitar":"{name}, drawn for guitar","playback.redraw.piano":"{name}, drawn for piano","playback.engine.invalid":'engine: use generaluser, sonivox or light, got "{value}"',"tab.source.staves":'staves: use tab, score or both, got "{value}"',"tab.source.layout":'layout: use page or line, got "{value}"',"tab.source.names":'names: use on or off, got "{value}"',"tab.source.tracks":'tracks: use track numbers from 1, got "{value}"',"tab.source.empty":"Write the music in alphaTex, or give a file: {example}","tab.sound.loadFailed":"Couldn't load the soundfont ({url})","tab.error.at":"line {line}, column {column}: ","tab.error.textTab":"Couldn't draw this text tab: {message}","tab.error.fileRead":`Couldn't read "{file}": {message}`,"tab.error.fileMissing":`Couldn't find the file "{file}"`,"tab.error.fileUnknown":`Couldn't read "{file}": not a score file alphaTab knows`,"tab.player.cantPlay":"Can't play: {message}","tab.player.metronome":"Metronome","tab.player.pause":"Pause","tab.names":"Note names","tab.follow":"Follow the music","tab.followPaused":"Follow the music (paused while you scroll: Play or click to follow again)","tab.view.group":"View","tab.view.tab":"Tab","tab.view.score":"Score","tab.view.both":"Both","tab.view.whatTab":"tablature","tab.view.whatScore":"standard notation","tab.view.whatBoth":"standard notation and tablature","tab.view.drawAs":"Draw as {what}","tab.view.drawAsWritten":"Draw as {what} (this block's staves: line)","tab.view.drawAsDefault":"Draw as {what} (the default: the block has no staves: line)","tab.view.keep":"Keep this view","tab.view.keepTitle":"Write staves: {staves} at the top of the block","tab.tempo.group":"Tempo","tab.tempo.slower":"Slower","tab.tempo.faster":"Faster","tab.tempo.toPercent":"Show the speed in percent","tab.tempo.toBpm":"Show the speed in BPM","tab.tempo.reset":"Back to 100 %","tab.tempo.inBpm":"Tempo in BPM","tab.tempo.inPercent":"Speed in percent","tab.tempo.title":"Tempo: {bpm} BPM, {percent} % of {tempo} BPM","tab.tempo.speedTitle":"Speed: {percent} %"};var Ye={"strum.time.invalid":'Invalid time "{text}": use e.g. time: 4/4, 3/4 or 6/8',"strum.swing.invalid":'Invalid swing "{text}": write swing: yes (a triplet swing, a shuffle), no, or a percentage from 50 (straight) to 75, e.g. swing: 60%',"strum.subdivision.invalid":'Invalid subdivision "{text}": use 8ths, 16ths or triplets',"strum.triplets.quarterBeat68":"Triplets need a quarter-note beat (time: 4/4, 3/4…); for a 6/8 feel use time: 6/8 with 8ths","strum.triplets.quarterBeat":"Triplets need a quarter-note beat (time: 4/4, 3/4…); for this time use 8ths or 16ths","strum.subdivision.tooLong":"8ths are longer than a beat of x/{unit}: use subdivision: 16ths","strum.chord.notRecognizedTry":`Didn't recognize the chord "{chord}": try {suggestions}`,"strum.chord.empty":'Empty chord "[]": write the chord inside, e.g. [G]',"strum.chord.notRecognized":`Didn't recognize the chord "{chord}"`,"strum.line.bracketMissing":'Missing "]" after "{text}": write e.g. [G]',"strum.line.barInGhost":"A bar line inside ( ): close the ghost strums first","strum.line.accentAndGhost":"A strum is either accented (D>) or a ghost strum ((D)), not both","strum.line.ghostNested":"Ghost strums can't be nested: write (U), not ((U))","strum.line.parenUnopened":'")" without "(": write a ghost strum as (U)',"strum.help":"write D or ↓ (down), U or ↑ (up), X (muted), - (no strum), > after a strum for an accent, (U) for a ghost strum, [G] for a chord change","strum.line.notUnderstood":`Didn't understand "{char}" in "{line}": {help}`,"strum.line.accentNeedsStrum":"An accent needs a strum: write D> or U>","strum.line.ghostNoRests":"Write ghost strums as (D) or (U), without rests inside","strum.line.parenUnclosed":'Missing ")" in "{line}": write a ghost strum as (U)',"strum.line.chordEndsPattern":"The chord [{chord}] ends the pattern: put it before a strum or a -","strum.pattern.chordLineAlone":"A chord line needs a pattern line under it, e.g. D - D U - U D U","strum.pattern.missing":"Write a strumming pattern, e.g. D - D U - U D U (or D DU UDU)","strum.key.unknown":'Unknown key "{key}": use time, subdivision, swing, chord, tempo, tuning, title or pattern',"strum.swing.withTriplets":"Triplets and swing are two ways to write a shuffle: keep subdivision: triplets (D - U on each beat), or write 8ths with swing: yes","strum.swing.compound":"{time} already has three {unit} a beat: remove swing: (it swings 8ths or 16ths in 4/4, 3/4, 2/4…)","strum.swing.oneSlot":"Swing plays pairs of slots inside a beat, and a beat of {time} in {subdivision} has one slot: write subdivision: 16ths, or time: 4/4","strum.tempo.invalid":'Invalid tempo "{text}": use beats a minute from {min} to {max}, e.g. tempo: 90',"strum.bars.tooMany":"At most {max} bars in one pattern: split it into several blocks","strum.chord.pastEnd":"The chord {chord} is past the end of its pattern line: move it over a strum","strum.count.bar.one":"{n} bar","strum.count.bar.other":"{n} bars","strum.count.slot.one":"{n} slot","strum.count.slot.other":"{n} slots","strum.count.barsAndSlots":"{bars} and {slots}","strum.count.spill":'{time} in {subdivision} has {perBar} slots a bar, but "{written}" takes {slots} ({count}): put a | where each bar ends{orTime}',"strum.count.spillOrTime":", or write {time}","strum.count.mismatch":'{time} in {subdivision} has {perBar} slots a bar, but "{written}" has {n}: fill each bar with - (no strum){alternatives}',"strum.count.alternative.first":" or write {item}","strum.count.alternative.next":", {item}","strum.count.alternative.last":" or {item}","strum.note.one":"Read as {read}, then {n} beat with no strum: write a symbol for every slot (- for no strum) to place the strums yourself.","strum.note.other":"Read as {read}, then {n} beats with no strum: write a symbol for every slot (- for no strum) to place the strums yourself.","strum.feel.swing":"Swing","strum.feel.swingPercent":"Swing {percent}%","strum.feel.swing16":"16th swing","strum.feel.swing16Percent":"16th swing {percent}%","strum.name":"Strumming pattern {written}, {time}, {subdivision}{feel}","strum.name.titled":"{title}: strumming pattern {written}, {time}, {subdivision}{feel}","strum.name.feel":", {feel}","strum.tuning.unknown":'Unknown tuning "{tuning}": use e.g. tuning: standard, drop d, ukulele or E2 A2 D3 G3 B3 E4',"strum.tuning.tooManyStrings":"At most 12 strings","strum.tuning.unknownGiven":'Unknown tuning "{tuning}"',"picking.help":"write p (the thumb on the bass), p' (the alternate bass), i, m, a (strings 3, 2, 1), a string number from 1 (the highest), - for a rest, + between notes picked together (p+a)","picking.token.notUnderstood":`Didn't understand "{token}": {help}`,"picking.string.missing":"String {n} doesn't exist: strings go from 1 (the highest) to {strings}","picking.bar.slots":"A bar of {time} in {subdivision} has {perBar} slots, found {found}{between}: add notes or rests (-) so each bar has {perBar}, or change time:","picking.bar.betweenBarLines":" between bar lines","picking.key.unknown":'Unknown key "{key}": use time, subdivision, swing, chord, chords, tempo, tuning, title or pattern',"picking.swing.pairs":"Swing plays pairs of 8ths or 16ths inside a beat: remove swing:, or write time: 4/4 with 8ths","picking.tempo.invalid":'Invalid tempo "{text}": use beats a minute from {min} to {max}, e.g. tempo: 80',"picking.pattern.twice":"Write the pattern once: as pattern: or as pattern lines, not both","picking.pattern.missing":"Write a pattern: a line such as p i m a p i m a, or pattern: travis, alternate bass or 1-2-3-4","picking.chords.tooMany":"At most {max} chords, found {found}","picking.tuning.unknown":'Unknown tuning "{tuning}": use e.g. tuning: standard, drop d, open g or E2 A2 D3 G3 B3 E4',"picking.name":"Picking pattern {written}, {time}, {subdivision}{over}","picking.name.titled":"{title}: picking pattern {written}, {time}, {subdivision}{over}","picking.name.over":", over {chords}","picking.voicing.none":"No playable voicing of {chord} for this tuning","export.image.title":"Music notation"};var Xe={...Ke,...We,...Ye,..._e};var Ze={"render.layout.orientation":"Orientation inconnue « {text} » : utilisez vertical ou horizontal","render.layout.hand":"Main inconnue « {text} » : utilisez left ou right","render.rootMark.invalid":"root-mark : écrivez color ou shape, reçu « {text} »","render.rootListsOnly":"root ne s'applique qu'aux listes de notes sur les manches et les claviers (notes: C E G avec root: C) : un accord a sa propre fondamentale","render.unknownChord":"« {written} » n'est pas reconnu : essayez {suggestions}","render.tuning":"Accordage inconnu « {text} »","render.yesNo":"{key} doit valoir yes ou no, reçu « {text} »","render.hand.left":"main gauche","render.hand.right":"main droite","render.positions.exerciseOne":"exercise joue une seule position : écrivez position: 1 (et non positions:)","render.positions.needsSet":"positions demande une gamme ou un accord : par exemple A minor pentatonic ou arpeggio: Am7","render.positions.arpeggioCaged":"Les arpèges utilisent les formes CAGED, pas 3nps : retirez shape","render.positions.range":"positions : utilisez all, ou des nombres de 1 à {count} pour {title}","render.positions.fromMinor":" (depuis {root}m)","render.positions.arpeggioTitle":"Arpège de {title}","render.positions.shapeTitle":"{name}, forme {shape}","render.positions.npsTitle":"{name}, 3nps {n}{from}","render.positions.boxTitle":"{name}, position {n}{from}","render.fingering.handTitle":"{title}, {hand}","render.voicings.notBoth":"Utilisez triads ou voicings, pas les deux","render.voicings.fretted":"voicings sert à la guitare et aux autres instruments à frettes","render.voicings.noFrets":"voicings trouve seul les cases : retirez « {value} »","render.voicings.needsChord":"voicings demande un accord : par exemple A Major","render.voicings.instrument":"Instrument inconnu « {instrument} » : utilisez guitar, ou donnez un accordage","render.voicings.maxStrings":"voicings fonctionne jusqu'à {max} cordes","render.voicings.count":"voicings : utilisez all, ou un nombre de 1 à {max}","render.voicings.area":"area : utilisez open, ou des cases comme 5-9 (jusqu'à 24), reçu « {area} »","render.voicings.rootString":"root-string : utilisez un numéro de corde de 1 (la plus aiguë) à {count}","render.voicings.inversion":"inversion : utilisez 0 (fondamentale), 1, 2, 3 ou any, reçu « {inversion} »","render.voicings.manyStringsAny":"Sur {count} cordes, inversion: any demande six cordes ou moins : ajoutez par exemple strings: 1-6","render.voicings.wideArea":"une zone large","render.voicings.oneWidening":"Sur {count} cordes, utilisez un seul élargissement à la fois parmi {list}","render.noVoicing.gaps":"Les cordes {strings} ne sont pas côte à côte : ajoutez gaps: yes","render.noVoicing.rootString":"root-string {string} ne fait pas partie des cordes {strings}","render.noVoicing.inversion":"{symbol} a {notes} notes : inversion va jusqu'à {max}","render.noVoicing.bass":"Aucun voicing de {chord} n'a sa basse sur la corde {string} : essayez une autre root-string","render.noVoicing.none":"Aucun voicing jouable de {chord} ne convient : élargissez la zone, autorisez les cordes à vide ou ajoutez stretch: yes","render.triads.noFrets":"triads trouve seul les cases : retirez « {value} »","render.triads.fretted":"triads sert à la guitare et aux autres instruments à frettes : donnez un accordage","render.triads.strings":"triads : donnez trois cordes côte à côte, par exemple 1-3 ou 2-4","render.triads.inversion":"inversion : utilisez 0 (position fondamentale), 1, 2 ou any, reçu « {inversion} »","render.triads.keyInversion":"Avec une tonalité, choisissez un seul renversement : 0, 1 ou 2","render.triads.key":"Tonalité inconnue « {text} » : utilisez par exemple key: G major ou key: E minor","render.triads.needsChord":"triads demande un accord (par exemple G) ou une tonalité (key: G major)","render.triads.notTriad":"{symbol} n'est pas une triade (trois notes) : essayez voicings: all","render.triads.none":"Aucune triade ne tient sur ces cordes : essayez un autre groupe de cordes","render.transitions.needsFrom":"Ajoutez l'accord que vous tenez : from: C (avec ses cases : from: C x32010)","render.transitions.fretted":"Les transitions servent à la guitare et aux autres instruments à frettes : donnez un accordage","render.transitions.notBoth":"Utilisez from et to, ou progression, pas les deux","render.transitions.refused":"« {key} » ne peut pas s'utiliser avec {with}","render.transitions.maxStrings":"Les transitions fonctionnent jusqu'à {max} cordes","render.transitions.twoChords":"progression : donnez au moins deux accords, par exemple G D Em C","render.transitions.maxChords":"progression : {max} accords au plus","render.transitions.noVoicings":"Aucun voicing jouable pour cette progression","render.transitions.needsTo":"Ajoutez l'accord suivant : to: D","render.transitions.noHeld":"Aucun voicing jouable de {chord} : ajoutez ses cases","render.transitions.stringCount":"« {frets} » compte {have} cordes, l'accordage {count}","render.transitions.count":"count : utilisez un nombre de 1 à {max}","render.transitions.noTarget":"Aucun voicing jouable de {chord}","render.modes.none":"« {value} » n'a pas de modes : utilisez par exemple modes: C major","render.modes.refused":"« {key} » ne peut pas s'utiliser avec modes : seulement {allowed}","render.row.notShared":"« {key} » ne peut pas être partagé : déplacez-le dans un diagramme. Réglages partagés : {allowed}","render.row.columns":"columns doit être un nombre entier de 1 à 12, reçu « {text} »","render.row.needsDiagram":"Ajoutez un diagramme après les réglages partagés : une ligne « --- », puis le diagramme","render.row.max":"{max} diagrammes au plus par bloc, {found} trouvés","render.row.columnsShared":"« columns » va dans les réglages partagés, avant le premier « --- »","render.row.ownRow":"« {key} » dessine sa propre rangée : utilisez-le dans un bloc à part","render.row.exercise":"exercise dessine une tablature sous un seul diagramme : utilisez-le dans un bloc à part","render.row.diagram":"diagramme {n} : {message}","render.row.sharedHint":" (les réglages partagés avant le premier « --- » ne peuvent contenir que : {allowed})","fretboard.capo":"Capodastre {fret}","fretboard.title":"Manche : {title}","fretboard.note.open":"{note} à vide","fretboard.note.fret":"{note} case {fret}","fretboard.note.root":" (fondamentale)","fretboard.string":"Corde {n} ({name}) : {notes}.","fretboard.pick.open":"Corde {string}, à vide","fretboard.pick.fret":"Corde {string}, case {fret}","fretboard.exercise.direction":"exercise : utilisez up, down ou up-down, reçu « {text} »","fretboard.exercise.rhythm":"rhythm : utilisez 8ths, triplets ou 16ths, reçu « {text} »","fretboard.exercise.scale":"Gamme inconnue « {text} »","fretboard.exercise.chord":"Accord inconnu « {text} »","fretboard.exercise.needsSet":"Un exercice demande une gamme ou un arpège : par exemple scale: A minor ou arpeggio: Am7","fretboard.exercise.arpeggioCaged":"Les arpèges utilisent les formes CAGED : position 1 à 5, ou shape: E, D, C, A ou G (pas 3nps)","fretboard.exercise.positions":"{title} a {count} positions {system} : utilisez position 1 à {count}","fretboard.exercise.tuning":"Accordage inconnu « {text} »","fretboard.exercise.capo":"capo : utilisez une case de 1 à 12 (0 pour aucun), reçu {text}","fretboard.positions.numbering":"numbering : utilisez minor (positions depuis le relatif mineur), reçu « {text} »","fretboard.positions.numberingPentatonic":"numbering: minor sert aux positions de la pentatonique majeure (par exemple A major pentatonic), pas à {title}","fretboard.positions.numberingCaged":"numbering: minor numérote les positions en boîtes et 3nps, pas les formes CAGED","fretboard.positions.position":"position doit être un nombre entier à partir de 1, reçu « {text} »","fretboard.positions.shape":"Forme inconnue « {text} » : utilisez C, A, G, E, D ou 3nps","keyboard.fingering.finger":"fingering : les doigts vont de 1 (pouce) à 5 (auriculaire), reçu « {text} »","keyboard.fingering.autoNeedsScale":"fingering: auto va avec une gamme majeure ou mineure (scale: G major) : écrivez un doigt par note, par exemple fingering: 1 2 3 4 5","keyboard.fingering.autoUnknown":"fingering: auto connaît les gammes majeures, mineures naturelles, mineures harmoniques et mineures mélodiques : écrivez les doigts pour {scale}, de la fondamentale à la fondamentale, par exemple fingering: 1 2 3 1 2 3 4 5","keyboard.piano.shell":"Les voicings shell demandent une tierce et une septième ou une sixte (C7, Cmaj7, Cm7, C6) : {symbol} n'en a pas","keyboard.piano.rootless":"Les voicings rootless servent aux accords de septième ou de sixte majeurs, mineurs, de dominante (sus4 aussi) et demi-diminués, et aux triades majeures ou mineures (Cmaj7, Cm7, C7, C7sus4, Cm7b5, C6, C, Cm) : pas à {symbol}","keyboard.piano.octave":"octave : utilisez un nombre de 0 à 8, reçu « {text} »","keyboard.piano.inversion":"inversion : utilisez 0 (position fondamentale), 1, 2 ou 3, reçu « {text} »","keyboard.piano.slashInversion":"{symbol} indique déjà sa basse : retirez inversion","keyboard.piano.inversionStyle":"inversion va avec les voicings close ou open, pas {style}","keyboard.piano.inversionMax":"{symbol} a {notes} notes : inversion va jusqu'à {max}","keyboard.piano.open":"Les voicings open demandent trois notes ou plus : {symbol} en a {notes}","keyboard.piano.offKeys":"octave {octave} place {symbol} hors du clavier du piano : essayez octave 3 ou 4","keyboard.piano.inversionWord":"inversion : utilisez root, first, second, third (ou 0 à 3), reçu « {text} »","keyboard.piano.octaveMiddle":"octave : utilisez un nombre de 0 à 8 (4 est celle du do central), reçu « {text} »","keyboard.piano.voicing":"voicing : utilisez close, open, shell, shell R-7, rootless A ou rootless B, reçu « {text} »","keyboard.piano.key":"Tonalité inconnue « {text} » : utilisez par exemple key: C minor ou key: Eb","keyboard.piano.resolvesTo":"resolves-to : écrivez un accord, par exemple resolves-to: Cm, reçu « {text} »","keyboard.piano.hands":"hands : utilisez left+right, left ou right, reçu « {text} »","keyboard.title":"Clavier : {title}","keyboard.hand":"{hand} : {keys}","keyboard.handMark.left":"MG","keyboard.handMark.right":"MD","keyboard.whiteKey":"Touche blanche {n}","keyboard.blackKey":"Touche noire {n}","keyboard.lit.root":"fondamentale","keyboard.lit.finger":"doigt {finger}","keyboard.lit.keys":"Touches : {keys}.","circle.label":"Cycle des quintes, {key} : {signature}{accidentals} ; accords : {chords}","circle.or":"ou","circle.mode.major":"majeur","circle.mode.minor":"mineur","circle.mode.ionian":"ionien","circle.mode.dorian":"dorien","circle.mode.phrygian":"phrygien","circle.mode.lydian":"lydien","circle.mode.mixolydian":"mixolydien","circle.mode.aeolian":"éolien","circle.mode.locrian":"locrien","circle.key":"Tonalité inconnue « {text} » : utilisez par exemple key: G, key: Em ou key: D dorian","circle.mode":"Mode inconnu « {text} » : utilisez major, minor, dorian, phrygian, lydian, mixolydian ou locrian","circle.modeTwice":"key: {key} indique déjà {mode} : retirez mode ou écrivez seulement la note de la tonalité","circle.chords":"chords : utilisez triads ou sevenths, reçu « {text} »","circle.dominant":"dominant : utilisez major (V, issu du mineur harmonique) ou minor (v), reçu « {text} »","keyboard.piano.unknownChord":"Accord inconnu « {symbol} »"};var Je={"blocks.source.expected":'Attendu "clé: valeur", reçu "{line}"',"blocks.source.strings":"strings: utilisez des numéros de corde de 1 (la plus aiguë) à {count}, par ex. 1-4","blocks.caption.fingeringChordOnly":"caption: fingering ne sert qu'aux blocs d'accord : utilisez formula ou none ici","blocks.caption.useAll":'caption: utilisez fingering (le doigté en toutes lettres), formula (notes et intervalles), fingering, formula (les deux) ou none, reçu "{written}"',"blocks.caption.useFormula":'caption: utilisez formula (notes et intervalles) ou none, reçu "{written}"',"blocks.noteSet.chordOrArpeggio":"Utilisez chord ou arpeggio, pas les deux","blocks.noteSet.invalidRoot":'Fondamentale "{root}" invalide : utilisez un nom de note, par ex. root: C',"blocks.noteSet.notAList":`"{head}" n'est pas une liste de notes : utilisez par ex. notes: C Eb G`,"blocks.noteSet.addNotesForRoot":"Ajoutez les notes de la fondamentale : par ex. notes: C Eb G","blocks.noteSet.addRoot":"Ajoutez une fondamentale : C {scale}","blocks.noteSet.addSource":'Ajoutez "scale:", "chord:" ou "notes:"',"blocks.noteSet.rootListsOnlyScale":"root ne s'applique qu'aux listes de notes (notes: C E G) : une gamme a sa propre fondamentale","blocks.noteSet.rootListsOnlyChord":"root ne s'applique qu'aux listes de notes (notes: C E G) : un accord a sa propre fondamentale","blocks.noteSet.unknownLabelsFingers":'labels "{value}" inconnu : utilisez notes, degrees, intervals, fingers ou none',"blocks.noteSet.unknownLabels":'labels "{value}" inconnu : utilisez notes, degrees, intervals ou none',"blocks.noteSet.invalidNotes":'Notes "{notes}" invalides',"blocks.noteSet.unknownScale":'Gamme "{scale}" inconnue',"blocks.noteSet.unknownChord":'Accord "{chord}" inconnu',"blocks.noteSet.notAScaleChordOrList":`"{head}" n'est ni une gamme, ni un accord, ni une liste de notes`,"blocks.noteSet.highlightNeedsIntervals":"highlight demande une gamme, un accord ou une fondamentale : une liste de notes n'a pas d'intervalles (ajoutez par ex. root: C)","blocks.noteSet.notInSet":`"{label}" n'est pas dans {title} : utilisez ses intervalles (R, b3, 5…)`,"theory.key.needsSharps":"{name} demande {count} dièses : écrivez {write}","theory.key.needsFlats":"{name} demande {count} bémols : écrivez {write}","theory.key.noSignature":"sans ♯ ni ♭","theory.harmonize.unknownScale":'Gamme "{text}" inconnue : utilisez par ex. key: G major, key: A harmonic minor ou key: D dorian',"theory.harmonize.sevenNotes":"harmonize demande une gamme de 7 notes : {name} en a {count}","theory.harmonize.noNamedChord":"pas un accord nommé","theory.harmonize.noFifth":"pas de quinte juste","theory.harmonize.noFourthOrSecond":"pas de quarte juste ni de seconde majeure","blocks.progression.yesNo":'{key} doit valoir yes ou no, reçu "{text}"',"blocks.progression.majorMinorKeys":`Les tonalités d'une progression sont majeures ou mineures : écrivez key: {tonic} major ou key: {tonic} minor, reçu "{text}"`,"blocks.progression.unknownKey":'Tonalité "{text}" inconnue : utilisez par ex. key: G, key: Em ou key: F# minor',"blocks.progression.unread":`"{token}" n'est pas compris : écrivez des chiffres romains (I V vi IV, bVII, V7, V/V, I6, V65), des chiffres Nashville (1 5 6m 4) ou des accords (G D Em C)`,"blocks.progression.harmonizeKind":'harmonize : écrivez triads, sevenths, sus ou power, reçu "{kind}"',"blocks.progression.harmonizeNothing":"harmonize : écrivez triads, sevenths, sus ou power, rien reçu","blocks.progression.harmonizeNoChords":"harmonize dessine les accords de la gamme : retirez les accords ({written})","blocks.progression.addScale":"Ajoutez la gamme : par ex. key: A harmonic minor","blocks.progression.transposeWhole":"transpose doit être un nombre entier de demi-tons, par ex. transpose: -2","blocks.progression.addChords":"Ajoutez les accords : par ex. I V vi IV avec key: G, 1 5 6m 4, ou G D Em C","blocks.progression.addKey":"Ajoutez la tonalité : par ex. key: G ou key: E minor","blocks.progression.unknownTuning":'Accordage "{text}" inconnu',"blocks.progression.tempo":'tempo: écrivez un nombre de temps par minute de {min} à {max}, reçu "{text}"',"blocks.progression.strum":"strum: écrivez beats, bar, arpeggio ou un rythme de grattage (D DU UDU) : {reason}","blocks.progression.key":"Tonalité : {name}","blocks.progression.blues":"(blues)","blocks.progression.orKeys":"(ou {list})","blocks.progression.leftOut":"Écartés : {list}","blocks.progression.leftOutDegree":"degré {degree} ({note}), {reason}","blocks.progression.unknownInstrument":'Instrument "{instrument}" inconnu : utilisez guitar ou piano',"blocks.progression.numerals":'numerals: utilisez roman, nashville ou none, reçu "{style}"',"blocks.progression.voiceLeadingPiano":"voice-leading ne sert qu'au piano : ajoutez instrument: piano","blocks.progression.pianoOnly":"{key} ne sert qu'aux accords de piano : ajoutez instrument: piano","blocks.progression.voiceLeadingHands":"voice-leading va avec hands: left+right (une basse à la main gauche sous chaque accord), pas avec une seule main","blocks.progression.voiceLeadingOrKey":"Utilisez voice-leading ou {key}, pas les deux","blocks.progression.addChordsAfterShared":'Ajoutez les accords après les réglages communs, après une ligne "---"',"blocks.progression.maxChords":"Au plus {max} accords par bloc, {count} trouvés","theory.chord.suggest":"{root}, {root}m, {root}7 ou {spelled} {quality}","blocks.render.maxStrings":"Au plus {max} cordes","blocks.render.invalidRange":'Étendue "{text}" invalide : utilisez par ex. C3-B4',"blocks.render.maxKeys":"Au plus {max} touches : donnez une étendue plus petite, par ex. range: C3-B5","blocks.render.wholeFrom1":'{what} doit être un nombre entier à partir de 1, reçu "{text}"',"blocks.render.unrecognized":`"{written}" n'est pas reconnu : essayez {suggestions}`,"blocks.render.rootForListsOnly":"root ne s'applique qu'aux listes de notes sur les manches et les claviers (notes: C E G avec root: C) : un accord a sa propre fondamentale","blocks.chord.capoNotPiano":"capo ne sert qu'à la guitare et aux autres instruments à frettes, pas au piano","blocks.chord.pitchesGivenKeys":"{given} va avec un symbole d'accord : pitches donne déjà les touches à jouer","blocks.chord.autoNeedsSymbol":"fingering: auto va avec un symbole d'accord : écrivez les doigts, par ex. 1 3 5","blocks.chord.invalidPitches":'Hauteurs "{text}" invalides',"blocks.chord.autoCovers":"fingering: auto couvre les accords de trois sons et de quatre sons (septièmes, sixtes) en position serrée, ainsi que les voicings sans fondamentale et « shell » qu'une main peut atteindre : écrivez les doigts, par ex. fingering: 1 2 3 4 5","blocks.chord.addSymbolOrPitches":`Ajoutez un symbole d'accord ou "pitches:"`,"blocks.chord.unknownInstrument":'Instrument "{instrument}" inconnu : utilisez guitar ou piano, ou donnez un accordage',"blocks.chord.invalidFrets":'Cases "{text}" invalides : utilisez par ex. x02220',"blocks.chord.nutAtCapo":"Avec frets-from: nut, chaque case jouée est au capodastre ({capo}) ou au-delà : écrivez x pour les cordes en deçà","blocks.chord.capoMaxFret":"Avec un capodastre en {capo}, les cases vont jusqu'à {max}","blocks.chord.fingersCount":'"{text}" donne {fingers} doigts pour {strings} cordes',"blocks.chord.noVoicing":'Aucun voicing {n} trouvé pour "{symbol}" : ajoutez "frets:"',"blocks.chord.addFretsFor":'Ajoutez "frets:" pour {symbol} (par ex. frets: x02220)',"blocks.chord.addSymbolAndFrets":`Ajoutez un symbole d'accord et "frets:"`,"blocks.chord.positionAboveLowest":"position {base} est au-dessus de la note frettée la plus grave (case {fret})","blocks.chord.tuningStrings":"L'accordage a {tuning} cordes, les cases {frets}","blocks.chord.soundsTitle":"{sounding} (forme {shape})","blocks.chord.captionFormulaChord":"caption: formula demande un accord que la bibliothèque connaît : ajoutez son symbole (par ex. symbol: A)","blocks.chord.captionFormulaSet":"caption: formula demande un accord ou une gamme que la bibliothèque connaît : ajoutez chord: ou scale:","blocks.chord.soundsTitleNeedsChord":"sounds: title demande un accord que la bibliothèque connaît : ajoutez son symbole (par ex. symbol: A)","blocks.chord.soundsNeedsCapo":"sounds va avec un capodastre : ajoutez par ex. capo: 2","blocks.chord.soundsYesNeedsChord":"sounds: yes demande un accord que la bibliothèque connaît : ajoutez son symbole (par ex. symbol: A), ou écrivez l'accord : sounds: B","blocks.chord.soundsMismatch":"Avec un capodastre en {capo}, {shape} sonne {sounding}, pas {value} : écrivez sounds: {sounding} (ou sounds: yes)","blocks.chord.unknownLabels":'labels "{text}" inconnu : utilisez fingers, intervals, notes ou none',"blocks.chord.labelsNeedChord":"labels: {value} demande un accord que la bibliothèque connaît","blocks.keyboard.autoBothAlone":"fingering: auto both dessine deux claviers : mettez-le dans un bloc à part, pas dans une rangée séparée par ---","blocks.keyboard.fingersCount":"fingering donne {fingers} doigts : {title} en demande {needed}, un par note de la fondamentale à la fondamentale supérieure","blocks.keyboard.fingersForNotes":"fingering donne {fingers} doigts pour {notes} notes : un doigt par note, dans l'ordre écrit","blocks.keyboard.keyTwice":"Une touche est citée deux fois : un doigt par touche","blocks.keyboard.pastRange":"Les notes doigtées dépassent l'étendue : élargissez range: ou retirez-le","blocks.keyboard.handTitleLeft":"{title}, main gauche","blocks.keyboard.handTitleRight":"{title}, main droite","blocks.fretboard.invalidFrets":'Cases "{text}" invalides : utilisez par ex. 5-8',"blocks.fretboard.maxFret":"Les cases vont jusqu'à {max}","blocks.fretboard.nutStartsAtCapo":"Avec frets-from: nut, les cases commencent au capodastre ({capo}) ou au-delà : par ex. frets: {capo}-{example}","blocks.fretboard.numberingNeedsPosition":"numbering va avec une position : par ex. position: 1 ou positions: all","blocks.fretboard.positionsNeedSet":"Les positions demandent une gamme ou un accord : par ex. scale: A minor ou arpeggio: Am7","blocks.fretboard.arpeggioCaged":"Les arpèges utilisent les formes CAGED : position 1 à 5, ou shape: E, D, C, A ou G (pas 3nps)","blocks.fretboard.positionCount":"{title} a {count} positions {named} : utilisez position 1 à {count}","blocks.fretboard.positionNotFit":"{title}, la position {n} ne tient pas dans les cases {from}-{to} : élargissez frets: ou retirez-le","blocks.fretboard.rhythmNeedsExercise":"rhythm va avec exercise : par ex. exercise: up-down","blocks.fretboard.exerciseNeedsPosition":"exercise joue une position : ajoutez position: 1 (ou shape: E)","blocks.fretboard.invalidTempo":'Tempo "{text}" invalide : utilisez un nombre de temps par minute de 20 à 240, par ex. tempo: 80',"blocks.fretboard.arpeggioTitle":"{name} (arpège)","blocks.fretboard.fromMinor":" (depuis {minor}m)","blocks.fretboard.shapeTitle":"{name}, forme {shape}","blocks.fretboard.threeNpsTitle":"{name}, 3nps {n}{from}","blocks.fretboard.boxTitle":"{name}, boîte {n}{from}","blocks.scalesFor.both":"Utilisez scales-for (accords) ou scales-for-notes, pas les deux","blocks.scalesFor.findsItself":'{key} trouve la gamme seul : retirez "{what}"',"blocks.scalesFor.addChords":"Ajoutez les accords : par ex. scales-for: G D Em C","blocks.scalesFor.addNotes":"Ajoutez les notes : par ex. scales-for-notes: C D E G A","blocks.scalesFor.unreadChords":`Accords "{text}" non compris : utilisez des symboles d'accord, par ex. scales-for: G D Em C`,"blocks.scalesFor.unreadNotes":'Notes "{text}" non comprises : utilisez des noms de notes, par ex. scales-for-notes: C D E G A',"blocks.scalesFor.outside":", {notes} en dehors","blocks.scalesFor.bluesTitle":"Gamme blues de {tonic} pour {listed} (ou {pentatonic}, {mixolydian})","blocks.scalesFor.title":"{name} pour {listed}{outside}","chord.capo.fret":'capo: utilisez une case de 1 à {max}, reçu "{text}"',"chord.capo.fretsFrom":'frets-from: utilisez capo (par défaut) ou nut, reçu "{text}"',"theory.naming.write":"naming: écrivez letters, solfege ou german","theory.naming.writeDirective":"naming: écrivez {letters}, {solfege} ou {german}","chord.words.ordinalFirst":"1re","chord.words.ordinalSt":"{n}e","chord.words.ordinalNd":"{n}e","chord.words.ordinalRd":"{n}e","chord.words.ordinalTh":"{n}e","chord.words.listAnd":"{head} et {last}","chord.words.guitarIndex":"Index","chord.words.guitarMiddle":"Majeur","chord.words.guitarRing":"Annulaire","chord.words.guitarPinky":"Auriculaire","chord.words.guitarThumb":"Pouce","chord.words.guitarFinger":"Doigt {finger}","chord.words.pianoThumb":"pouce","chord.words.pianoIndex":"index","chord.words.pianoMiddle":"majeur","chord.words.pianoRing":"annulaire","chord.words.pianoLittle":"auriculaire","chord.words.pianoFinger":"doigt {finger}","chord.words.lowName":"{name} grave","chord.words.highName":"{name} aiguë","chord.words.stringNamed":"la corde {name}","chord.words.stringsNamed":"les cordes {names}","chord.words.stringNumberedNote":"la {n} corde ({note})","chord.words.stringNumbered":"la {n} corde","chord.words.capoFrom":"Capodastre sur la {fret} case : les cases se comptent à partir du capodastre.","chord.words.capoNut":"Capodastre sur la {fret} case.","chord.words.allMuted":"Toutes les cordes sont étouffées : aucune note ne sonne.","chord.words.strumSix":"Grattez les six cordes.","chord.words.strumAll":"Grattez toutes les cordes.","chord.words.strumFrom":"Grattez à partir de {from}.","chord.words.strumFromTo":"Grattez de {from} à {to}.","chord.words.press":"Appuyez sur {string}, à la {fret} case.","chord.words.fingerOn":"{finger} sur {strings}, {fret} case.","chord.words.fingerBars":"{finger} fait le barré à la {fret} case, cordes {from} à {to}.","chord.words.fingerAlsoOn":"{finger} aussi sur {string}, {fret} case.","chord.words.muteOne":"Étouffez {list} : effleurez-la avec un doigt de la main qui frette.","chord.words.mutePlural":"Étouffez {list} : effleurez-les avec un doigt de la main qui frette.","chord.words.groupRingOpenOne":"La corde {list} sonne à vide.","chord.words.groupRingOpenPlural":"Les cordes {list} sonnent à vide.","chord.words.groupRingCapoOne":"La corde {list} sonne au capodastre.","chord.words.groupRingCapoPlural":"Les cordes {list} sonnent au capodastre.","chord.words.ringOpenOne":"{list} sonne à vide.","chord.words.ringOpenPlural":"{list} sonnent à vide.","chord.words.ringCapoOne":"{list} sonne au capodastre.","chord.words.ringCapoPlural":"{list} sonnent au capodastre.","chord.words.pianoFingerOn":"{finger} sur {key}","chord.words.pianoAlsoPlay":"{fingered}, et jouez aussi {list}","chord.words.sentence":"{text}.","chord.words.play":"Jouez {list}.","chord.words.leftHand":"Main gauche : {part}.","chord.words.rightHand":"Main droite : {part}.","chord.transition.fingerIndex":"l'index","chord.transition.fingerMiddle":"le majeur","chord.transition.fingerRing":"l'annulaire","chord.transition.fingerPinky":"l'auriculaire","chord.transition.fingerThumb":"le pouce","chord.transition.fingerOther":"le doigt","chord.transition.keep":"Gardez {finger} sur la {fret} case de {string}.","chord.transition.slide":"Faites glisser {finger} le long de {string}, de la case {from} à la case {to}.","chord.transition.moveUp":"Déplacez la main de {shift} cases vers le haut.","chord.transition.moveDown":"Déplacez la main de {shift} cases vers le bas.","chord.transition.lift":"Levez tous les doigts ensemble et posez-les d'un bloc.","chord.guitar.capoCaption":"Capodastre {capo}","chord.guitar.capoCaptionSounds":"Capodastre {capo}, sonne {sounds}","chord.guitar.diagram":"Diagramme d'accord","chord.guitar.diagramTitled":"Diagramme de l'accord {title}","chord.guitar.rootOnString":"La fondamentale est sur la corde {list}.","chord.guitar.rootOnStrings":"La fondamentale est sur les cordes {list}.","chord.triads.rootPosition":"état fondamental","chord.triads.firstInversion":"1er renversement","chord.triads.secondInversion":"2e renversement","theory.formula.chord":"{written} ({root} {words}{bass}) : {notes}.","theory.formula.inTheBass":", {bass} à la basse","theory.formula.formula":"Formule {formula}.","theory.formula.alsoWritten":"S'écrit aussi {list}.","theory.formula.scale":"{title} : {notes}.","theory.formula.steps":"Écarts {steps}.","chords.chart.chorus":"Refrain","chords.chart.bridge":"Pont","chords.chart.tab":"Tablature","chords.chart.grid":"Grille d'accords","chords.chart.key":"Tonalité {key}","chords.chart.capo":"Capodastre {capo}","chords.chart.tempo":"{bpm} BPM","chords.chart.transposed":"Transposé de {amount}","chords.chart.sounds":"{title} (sonne {sounding})","chords.chart.moreNotDrawn":"{count} accords de plus non dessinés (au plus {max})","chords.chart.missing":"Pas de diagramme pour {names} : donnez la forme avec {how}","chords.chart.howPiano":"{syntax} (demi-tons au-dessus de la fondamentale, par ex. keys 0 4 7)","chords.chart.howGuitar":"{syntax} (une case par corde, x pour une corde étouffée)","chords.define.needsName":"{syntax} demande un nom d'accord : par ex. {example}","chords.define.baseFret":"{at} : base-fret prend un nombre entier de 1 à 24, par ex. base-fret 3","chords.define.frets":"{at} : frets prend une valeur par corde (de 2 à {max}) : une case de 0 à 24, ou x pour une corde étouffée, par ex. frets x 0 2 2 1 0","chords.define.keys":"{at} : keys prend des demi-tons au-dessus de la fondamentale, de 0 à {max}, par ex. keys 0 4 7","chords.define.copy":"{at} : {word} prend le nom d'un seul accord, par ex. {word} Am","chords.define.unknown":'{at} : "{word}" est inconnu : utilisez base-fret, frets, fingers, keys, copy, display ou diagram',"chords.define.fingersCount":"{at} : fingers a {fingers} valeurs pour {strings} cordes : donnez-en une par corde (0 pour aucune)","chords.define.reaches":"{at} : la forme atteint la case {top} : les cases vont jusqu'à {max}","chords.directive.diagrams":"{at} : utilisez on, off, top ou bottom","chord.shape.open":"Accord ouvert","chord.shape.caged":"forme {letter}","chord.shape.cagedStrings":"forme {letter} (cordes {strings})","chord.shape.power":"Power chord","chord.shape.triad":"Triade","chord.shape.shell":"Shell","chord.shape.drop":"Drop {n} (cordes {strings})","chord.shape.hendrix":"Accord Hendrix","chord.shape.openBass":"Basse à vide","chord.shape.openStrings":"Cordes à vide","chord.shape.strings":"Cordes {strings}","blocks.function.tonic":"tonique","blocks.function.subdominant":"sous-dominante","blocks.function.dominant":"dominante","blocks.function.secondaryDominant":"dominante secondaire","blocks.function.neapolitan":"napolitaine","blocks.function.borrowed":"emprunté","blocks.function.chromatic":"chromatique","blocks.function.tonicization":"tonicisation","blocks.function.passing":"de passage","theory.marks.characteristic":", notes caractéristiques : {notes}","theory.marks.different":", différentes de la gamme comparée : {notes}","theory.marks.chordTones":", notes de l'accord : {notes}"};var Qe={"playback.bar":"Lecture","playback.diagram":"Diagramme","playback.place":"({n} sur {total})","playback.playItem":"Lire : {name}","playback.playAll":"Tout lire à la suite","playback.play":"Lecture","playback.stop":"Arrêter","playback.loop":"Boucle","playback.countIn":"Décompte","playback.click":"Clic","playback.sound":"Son","playback.guitar":"Guitare","playback.piano":"Piano","playback.tempo":"Tempo (BPM)","playback.unit.bpm":"BPM","playback.unit.ms":"ms","playback.strum":"Grattage (ms entre les cordes)","playback.dotted":"compte des noires pointées","playback.strumPattern.bar":"Lire le motif de grattage","playback.picking.bar":"Lire le motif de picking","playback.progression.bar":"Lire les accords en rythme","playback.progression.play":"Lire en rythme","playback.strumChoice":"Grattage","playback.strum.beats":"À chaque temps","playback.strum.bar":"Une fois par mesure","playback.strum.arpeggio":"Arpège","playback.strum.pattern":"Motif","playback.copy.button":"Copier comme image","playback.copy.hint":"Maj+clic copie tout le bloc","playback.copy.bar":"Image","playback.copy.copied":"Copié","playback.copy.refused":"Autorisez l'accès au presse-papiers pour cette page, puis réessayez.","playback.copy.unsupported":"Ce navigateur ne peut pas copier d'images : utilisez une version récente de Chrome, Edge, Safari ou Firefox.","playback.copy.failed":"L'image n'a pas pu être créée.","playback.full.enter":"Plein écran","playback.full.exit":"Quitter le plein écran","playback.redraw.sounds":"{heading} (sonne {chord})","playback.redraw.guitar":"{name}, dessiné pour la guitare","playback.redraw.piano":"{name}, dessiné pour le piano","playback.engine.invalid":"engine: utilisez generaluser, sonivox ou light, reçu « {value} »","tab.source.staves":"staves: utilisez tab, score ou both, reçu « {value} »","tab.source.layout":"layout: utilisez page ou line, reçu « {value} »","tab.source.names":"names: utilisez on ou off, reçu « {value} »","tab.source.tracks":"tracks: utilisez des numéros de piste à partir de 1, reçu « {value} »","tab.source.empty":"Écrivez la musique en alphaTex, ou indiquez un fichier : {example}","tab.sound.loadFailed":"Impossible de charger la banque de sons ({url})","tab.error.at":"ligne {line}, colonne {column} : ","tab.error.textTab":"Impossible de dessiner cette tablature en texte : {message}","tab.error.fileRead":"Impossible de lire « {file} » : {message}","tab.error.fileMissing":"Fichier « {file} » introuvable","tab.error.fileUnknown":"Impossible de lire « {file} » : ce n'est pas un fichier de partition connu d'alphaTab","tab.player.cantPlay":"Lecture impossible : {message}","tab.player.metronome":"Métronome","tab.player.pause":"Pause","tab.names":"Noms des notes","tab.follow":"Suivre la musique","tab.followPaused":"Suivre la musique (en pause pendant que vous faites défiler : lancez la lecture ou cliquez pour suivre de nouveau)","tab.view.group":"Vue","tab.view.tab":"Tablature","tab.view.score":"Partition","tab.view.both":"Les deux","tab.view.whatTab":"tablature","tab.view.whatScore":"notation standard","tab.view.whatBoth":"notation standard et tablature","tab.view.drawAs":"Afficher en {what}","tab.view.drawAsWritten":"Afficher en {what} (la ligne staves: du bloc)","tab.view.drawAsDefault":"Afficher en {what} (valeur par défaut : le bloc n'a pas de ligne staves:)","tab.view.keep":"Conserver cette vue","tab.view.keepTitle":"Écrire staves: {staves} en haut du bloc","tab.tempo.group":"Tempo","tab.tempo.slower":"Plus lent","tab.tempo.faster":"Plus rapide","tab.tempo.toPercent":"Afficher la vitesse en pourcentage","tab.tempo.toBpm":"Afficher la vitesse en BPM","tab.tempo.reset":"Revenir à 100 %","tab.tempo.inBpm":"Tempo en BPM","tab.tempo.inPercent":"Vitesse en pourcentage","tab.tempo.title":"Tempo : {bpm} BPM, {percent} % de {tempo} BPM","tab.tempo.speedTitle":"Vitesse : {percent} %"};var et={"strum.time.invalid":"Chiffrage « {text} » invalide : écrivez par exemple time: 4/4, 3/4 ou 6/8","strum.swing.invalid":"Swing « {text} » invalide : écrivez swing: yes (un swing ternaire, un shuffle), no, ou un pourcentage de 50 (droit) à 75, par exemple swing: 60%","strum.subdivision.invalid":"Subdivision « {text} » invalide : utilisez 8ths, 16ths ou triplets","strum.triplets.quarterBeat68":"Les triolets demandent un temps à la noire (time: 4/4, 3/4…) ; pour une pulsation en 6/8, écrivez time: 6/8 avec 8ths","strum.triplets.quarterBeat":"Les triolets demandent un temps à la noire (time: 4/4, 3/4…) ; pour ce chiffrage, utilisez 8ths ou 16ths","strum.subdivision.tooLong":"Les croches sont plus longues qu’un temps de x/{unit} : écrivez subdivision: 16ths","strum.chord.notRecognizedTry":"Accord « {chord} » non reconnu : essayez {suggestions}","strum.chord.empty":"Accord vide « [] » : écrivez l’accord entre les crochets, par exemple [G]","strum.chord.notRecognized":"Accord « {chord} » non reconnu","strum.line.bracketMissing":"« ] » manquant après « {text} » : écrivez par exemple [G]","strum.line.barInGhost":"Une barre de mesure à l’intérieur de ( ) : fermez d’abord les coups fantômes","strum.line.accentAndGhost":"Un coup est soit accentué (D>), soit fantôme ((D)), pas les deux","strum.line.ghostNested":"Les coups fantômes ne peuvent pas être imbriqués : écrivez (U), pas ((U))","strum.line.parenUnopened":"« ) » sans « ( » : écrivez un coup fantôme ainsi : (U)","strum.help":"écrivez D ou ↓ (vers le bas), U ou ↑ (vers le haut), X (étouffé), - (pas de coup), > après un coup pour un accent, (U) pour un coup fantôme, [G] pour un changement d’accord","strum.line.notUnderstood":"« {char} » non compris dans « {line} » : {help}","strum.line.accentNeedsStrum":"Un accent demande un coup : écrivez D> ou U>","strum.line.ghostNoRests":"Écrivez les coups fantômes (D) ou (U), sans silence à l’intérieur","strum.line.parenUnclosed":"« ) » manquant dans « {line} » : écrivez un coup fantôme ainsi : (U)","strum.line.chordEndsPattern":"L’accord [{chord}] termine le rythme : placez-le avant un coup ou un -","strum.pattern.chordLineAlone":"Une ligne d’accords demande une ligne de rythme dessous, par exemple D - D U - U D U","strum.pattern.missing":"Écrivez un rythme de strumming, par exemple D - D U - U D U (ou D DU UDU)","strum.key.unknown":"Clé « {key} » inconnue : utilisez time, subdivision, swing, chord, tempo, tuning, title ou pattern","strum.swing.withTriplets":"Les triolets et le swing sont deux façons d’écrire un shuffle : gardez subdivision: triplets (D - U sur chaque temps), ou écrivez 8ths avec swing: yes","strum.swing.compound":"{time} a déjà trois {unit} par temps : retirez swing: (il swingue les 8ths ou les 16ths en 4/4, 3/4, 2/4…)","strum.swing.oneSlot":"Le swing joue des paires de positions dans un temps, et un temps de {time} en {subdivision} n’a qu’une position : écrivez subdivision: 16ths, ou time: 4/4","strum.tempo.invalid":"Tempo « {text} » invalide : utilisez un nombre de temps par minute de {min} à {max}, par exemple tempo: 90","strum.bars.tooMany":"{max} mesures au plus dans un rythme : découpez-le en plusieurs blocs","strum.chord.pastEnd":"L’accord {chord} dépasse la fin de sa ligne de rythme : déplacez-le au-dessus d’un coup","strum.count.bar.one":"{n} mesure","strum.count.bar.other":"{n} mesures","strum.count.slot.one":"{n} position","strum.count.slot.other":"{n} positions","strum.count.barsAndSlots":"{bars} et {slots}","strum.count.spill":"{time} en {subdivision} compte {perBar} positions par mesure, mais « {written} » en prend {slots} ({count}) : mettez un | à la fin de chaque mesure{orTime}","strum.count.spillOrTime":", ou écrivez {time}","strum.count.mismatch":"{time} en {subdivision} compte {perBar} positions par mesure, mais « {written} » en a {n} : remplissez chaque mesure avec - (pas de coup){alternatives}","strum.count.alternative.first":" ou écrivez {item}","strum.count.alternative.next":", {item}","strum.count.alternative.last":" ou {item}","strum.note.one":"Lu comme {read}, puis {n} temps sans coup : écrivez un symbole pour chaque position (- pour pas de coup) afin de placer vous-même les coups.","strum.note.other":"Lu comme {read}, puis {n} temps sans coup : écrivez un symbole pour chaque position (- pour pas de coup) afin de placer vous-même les coups.","strum.feel.swing":"Swing","strum.feel.swingPercent":"Swing {percent} %","strum.feel.swing16":"Swing en doubles croches","strum.feel.swing16Percent":"Swing en doubles croches {percent} %","strum.name":"Rythme de strumming {written}, {time}, {subdivision}{feel}","strum.name.titled":"{title} : rythme de strumming {written}, {time}, {subdivision}{feel}","strum.name.feel":", {feel}","strum.tuning.unknown":"Accordage « {tuning} » inconnu : utilisez par exemple tuning: standard, drop d, ukulele ou E2 A2 D3 G3 B3 E4","strum.tuning.tooManyStrings":"12 cordes au plus","strum.tuning.unknownGiven":"Accordage « {tuning} » inconnu","picking.help":"écrivez p (le pouce sur la basse), p’ (la basse alternée), i, m, a (cordes 3, 2, 1), un numéro de corde à partir de 1 (la plus aiguë), - pour un silence, + entre des notes jouées ensemble (p+a)","picking.token.notUnderstood":"« {token} » non compris : {help}","picking.string.missing":"La corde {n} n’existe pas : les cordes vont de 1 (la plus aiguë) à {strings}","picking.bar.slots":"Une mesure de {time} en {subdivision} compte {perBar} positions, {found} trouvées{between} : ajoutez des notes ou des silences (-) pour que chaque mesure en ait {perBar}, ou changez time:","picking.bar.betweenBarLines":" entre les barres de mesure","picking.key.unknown":"Clé « {key} » inconnue : utilisez time, subdivision, swing, chord, chords, tempo, tuning, title ou pattern","picking.swing.pairs":"Le swing joue des paires de 8ths ou de 16ths dans un temps : retirez swing:, ou écrivez time: 4/4 avec 8ths","picking.tempo.invalid":"Tempo « {text} » invalide : utilisez un nombre de temps par minute de {min} à {max}, par exemple tempo: 80","picking.pattern.twice":"Écrivez le motif une seule fois : avec pattern: ou avec des lignes de motif, pas les deux","picking.pattern.missing":"Écrivez un motif : une ligne comme p i m a p i m a, ou pattern: travis, alternate bass ou 1-2-3-4","picking.chords.tooMany":"{max} accords au plus, {found} trouvés","picking.tuning.unknown":"Accordage « {tuning} » inconnu : utilisez par exemple tuning: standard, drop d, open g ou E2 A2 D3 G3 B3 E4","picking.name":"Motif de picking {written}, {time}, {subdivision}{over}","picking.name.titled":"{title} : motif de picking {written}, {time}, {subdivision}{over}","picking.name.over":", sur {chords}","picking.voicing.none":"Aucun doigté jouable de {chord} pour cet accordage","export.image.title":"Notation musicale"};var tt={...Je,...Ze,...et,...Qe};var ue={en:Xe,fr:tt},sn=Object.keys(ue);function X(e){if(typeof e!=="string")return null;let t=e.trim().toLowerCase().split(/[-_]/)[0];return sn.includes(t)?t:null}var Z="en";function Se(e,t){let n=Z;Z=e??Z;try{return t()}finally{Z=n}}function an(e,t){if(!t)return e;return e.replace(/\{(\w+)\}/g,(n,o)=>(o in t)?String(t[o]):n)}function de(e){return(t,...n)=>an(ue[e][t]??ue.en[t],n[0])}var V=()=>de(Z),j=(e,...t)=>de(Z)(e,...t);var ln=["letters","solfege","german"],cn=()=>j("theory.naming.write");var un=(e)=>e.trim().toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");function dn(e){let t=un(e);if(ln.includes(t))return t;throw Error(cn())}function me(e){if(typeof e!=="string")return null;try{return dn(e)}catch{return null}}var mn={C:"Do",D:"Ré",E:"Mi",F:"Fa",G:"Sol",A:"La",B:"Si"},pn={"#":"♯","♯":"♯",b:"♭","♭":"♭","##":"♯♯",x:"♯♯",bb:"♭♭","♭♭":"♭♭","♯♯":"♯♯"};function nt(e,t){if(t==="letters")return e;let n=/^([A-G])(##|bb|♯♯|♭♭|#|b|♯|♭|x)?$/.exec(e.trim());if(!n)return e;let[,o,r=""]=n;if(t==="solfege")return`${mn[o]}${pn[r]??""}`;if(o!=="B")return e.trim();return r==="b"||r==="♭"?"B":`H${r}`}var gn="http://www.w3.org/2000/svg",hn=(e,t)=>{for(let[n,o]of Object.entries(t))if(o!==void 0)e.setAttribute(n,String(o))};function Ce(e,t,n={},o=[]){let r=e.createElementNS(gn,t);hn(r,n);for(let a of o)if(a)r.appendChild(a);return r}function F(e,t,n,o){let r=e.createElement(t);if(n)r.className=n;if(o!==void 0)r.textContent=o;return r}var Tr=`mn-name-${Math.random().toString(36).slice(2,8)}-`;var fn=new Map(Object.entries({standard:"E2 A2 D3 G3 B3 E4","drop d":"D2 A2 D3 G3 B3 E4","drop c":"C2 G2 C3 F3 A3 D4","drop b":"B1 F#2 B2 E3 G#3 C#4","drop a":"A1 E2 A2 D3 F#3 B3","double drop d":"D2 A2 D3 G3 B3 D4",dadgad:"D2 A2 D3 G3 A3 D4","open g":"D2 G2 D3 G3 B3 D4","open d":"D2 A2 D3 F#3 A3 D4","open e":"E2 B2 E3 G#3 B3 E4","open c":"C2 G2 C3 G3 C4 E4","open a":"E2 A2 E3 A3 C#4 E4","half step down":"Eb2 Ab2 Db3 Gb3 Bb3 Eb4","whole step down":"D2 G2 C3 F3 A3 D4","modal c6":"C2 A2 C3 G3 C4 E4",c6:"C2 A2 C3 G3 C4 E4",bass:"E1 A1 D2 G2",ukulele:"G4 C4 E4 A4"}));function pe(e){let t=e.trim(),n=fn.get(t.toLowerCase().replace(/\s*\(.*\)$/,""));if(n)return pe(n);let o=t.split(/[\s,]+/).filter(Boolean);if(o.length>1&&o.every((s)=>Te(s)!==null))return o.map((s)=>Te(s));let r=o.length>1?o:t.match(/[A-G][#♯b♭]?|[a-g][#♯♭]?/g)??[];if(r.length<2||r.join("")!==o.join(""))return null;let a=[];for(let s of r){let l=ne(s);if(l===null)return null;let c=a[a.length-1];if(c===void 0){let u=[28,40,52].map((i)=>i-i%12+l);a.push(u.reduce((i,d)=>Math.abs(d-40)<Math.abs(i-40)?d:i))}else{let u=c-c%12+l;while(u<=c)u+=12;a.push(u)}}return a}var bn=/^\s*([A-Ga-g][#b]?|[1-8](?=\s*[|:]))?\s*[|:]?/,yn=/^[-0-9xX|:hpbrsvt/\\~^().*<>\s]*$/,kn=/^\s*([A-Za-z][A-Za-z0-9. -]{0,14}?)\s*[|:]([-xXoOgfdb#@*+|:\s]*)$/,vn=new Map(Object.entries({hihat:"h hh hat hihat hihats","hihat-open":"oh openhat openhihat","hihat-foot":"hf fh hp ph pedal hihatfoot hihatpedal",crash:"c c1 cc cr cy cym crash crash1 cymbal",crash2:"c2 cr2 crash2",ride:"r rd rc ride",splash:"sp spl splash",china:"ch cn chi china",cowbell:"cb cow cowbell",snare:"s sd sn sr snare snaredrum",tom1:"t t1 ht tom1 hightom hitom",tom2:"t2 mt tom2 midtom",tom3:"t3 lt tom3 lowtom",floor:"f ft fl t4 tom4 floor floortom",kick:"b bd bs k kd bass kick bassdrum kickdrum"}).flatMap(([e,t])=>t.split(" ").map((n)=>[n,e])));function wn(e,t){let n=t==="#";switch(e){case"hihat":return t==="o"||t==="O"?"HiHatOpen":"HiHatClosed";case"hihat-open":return"HiHatOpen";case"hihat-foot":return"PedalHiHatHit";case"crash":return n?"CrashHighChoke":"CrashHighHit";case"crash2":return n?"CrashMediumChoke":"CrashMediumHit";case"ride":return n?"RideChoke":"RideMiddle";case"splash":return n?"SplashChoke":"SplashHit";case"china":return n?"ChinaChoke":"ChinaHit";case"cowbell":return"CowbellMediumHit";case"snare":return"SnareHit";case"tom1":return"HighTomHit";case"tom2":return"MidTomHit";case"tom3":return"LowTomHit";case"floor":return"VeryLowTomHit";case"kick":return"KickHit"}}var xn=(e)=>e==="X"||e==="O"?["ac"]:e==="g"?["g"]:[],Tn=/[^-0-9xXoOgfdbhprsvt/\\~^().*<>#@+|:\s]|<(?!\d)/,An=/^\s*(?:[xX]\s*\d{1,3}|\d{1,3}\s*[xX])\s*$/;function Sn(e){let t=e.lastIndexOf("|");if(t<0)return{line:e,text:null};let n=e.slice(t+1),o=n.trim();if(!o)return{line:e,text:null};return Tn.test(o)||An.test(o)||/^\s/.test(n)&&!o.includes("--")?{line:e.slice(0,t+1),text:o}:{line:e,text:null}}function Cn(e){let{line:t,text:n}=Sn(e.trimEnd()),o=null,r=bn.exec(t),a=t.slice(r[0].length);if(yn.test(a)&&(t.match(/-/g)?.length??0)>=4&&(t.includes("|")||/^\s*[A-Ga-g][#b]?\s*[-|:]/.test(t)))o={name:r[1]??null,body:a,offset:r[0].length,barred:/[|:]$/.test(r[0])};let s=null,l=kn.exec(t),c=l?l[1].toLowerCase().replace(/[ .-]/g,""):"",u=vn.get(c);if(l&&u&&(l[2].match(/[^\s|:]/g)?.length??0)>=4)s={drum:u,name:c,body:l[2],lettered:/^[A-Ga-g]$/.test(l[1])};return o||s?{string:o,drum:s,text:n}:null}var pt=(e)=>[...new Set(e.map((t)=>t.text).filter((t)=>t!==null))];function Mn(e){let t=[],n=0;for(let o=2;o<e.length-1;o++){let[r,a]=[e[n].string.name,e[n+1].string.name];if(r!==null&&e[o].string.name===r&&e[o+1].string.name===a&&o-n>=2)t.push(e.slice(n,o)),n=o}return t.push(e.slice(n)),t}function En(e){let t=[],n=[];for(let o of e){if(n.some((r)=>r.drum.name===o.drum.name))t.push(n),n=[];n.push(o)}return t.push(n),t}var zn=/^[\sPpMm.\-_|=~]*$/,Ln=/P\.?M/i;function Nn(e){if(!zn.test(e)||!Ln.test(e))return[];let t=[];for(let n=0;n<e.length;n++){let o=e[n];if((o==="P"||o==="p")&&/^\.?[Mm]/.test(e.slice(n+1,n+3)))t.push([n,n]);else if(o!==" "&&t.length)t[t.length-1][1]=n}return t}function ot(e,t=null){return Mn(e).flatMap((n,o)=>{let r=n.map((u)=>u.string.name);if(n.length<3&&r.some((u)=>u===null))return[];let a=n.map((u)=>u.string.body),s=n[0].string.offset,l=new Set;if(o===0&&t!==null)for(let[u,i]of Nn(t))for(let d=Math.max(u,s);d<=i;d++)l.add(d-s);let c=n.some((u)=>!u.string.barred);return[{kind:"strings",names:r,lines:a,texts:pt(n),muted:l,openStart:c}]})}function rt(e,t){if(!e.length)return[];if(e.every((r)=>r.drum)&&e.some((r)=>!r.string||!r.drum.lettered||/[xXoOgfdb#@*+]/.test(r.drum.body)))return En(e).map((r)=>({kind:"drums",drums:r.map((a)=>a.drum.drum),lines:r.map((a)=>a.drum.body),texts:pt(r)}));if(e.every((r)=>r.string))return ot(e,t);let n=[],o=[];for(let r of[...e,null])if(r?.string)o.push(r);else{if(o.length)n.push(...ot(o,n.length?null:t));o=[]}return n}function Fn(e){let t=[],n=[],o=null,r=null;for(let a of e.split(/\r?\n/)){let s=Cn(a);if(s){if(!n.length)o=r;n.push(s)}else t.push(...rt(n,o)),n=[];r=a}return t.push(...rt(n,o)),t}function st(e,t){let n=Math.max(...e.map((c)=>c.length)),o=e.map((c)=>c.padEnd(n,"-")),r=[],a=[],s=!1,l=0;for(let c=0;c<n;c++){if(o.every((m)=>m[c]==="|"||m[c]===":")){if(s)r.push({beats:a,start:l,end:c});a=[],s=!1,l=c+1;continue}if(o.some((m)=>m[c]!==" "))s=!0;let{beat:u,skip:i,at:d}=t(o,c);if(u.length)a.push({notes:u,col:d??c});c+=i}if(s)r.push({beats:a,start:l,end:n});return r}var oe=(e)=>e!==void 0&&e>="0"&&e<="9",it=(e,t)=>(e==="1"||e==="2")&&oe(t)&&Number(e+t)<=24;function Pn(e){let t=new Map,n=new Map,o=new Set,r=(a)=>{let s=a,l=e[s]==="(";if(l)s++;if(!oe(e[s]))return{fret:null,next:a};let c=it(e[s],e[s+1])?2:1,u=Number(e.slice(s,s+c));for(let i=0;i<c;i++)o.add(s+i);if(s+=c,l&&e[s]===")")s++;return{fret:u,next:s}};for(let a=0;a<e.length;){if(!oe(e[a])||o.has(a)){a++;continue}let s=it(e[a],e[a+1])?2:1,l=Number(e.slice(a,a+s));t.set(a,{fret:l,width:s});let c=[],u=e[a-1],i=a+s;if(u==="<"&&e[i]===">")c.push("nh"),i++;else if((u==="/"||u==="\\")&&!/[\d)>]/.test(e[a-2]??"-"))c.push(u==="/"?"sib":"sia");if(e[i]==="b"||e[i]==="^"){let g=r(i+1);i=g.next;let b=[0,(g.fret!==null&&g.fret>l?Math.min(g.fret-l,4):2)*2];if(e[i]==="r"){let p=r(i+1);i=p.next;let h=p.fret===null?0:(p.fret-l)*2;b.push(Math.min(b[1],Math.max(0,h)))}c.push(`b (${b.join(" ")})`)}if(e[i]==="~"||e[i]==="v"){c.push("v");while(e[i]==="~"||e[i]==="v")i++}let d=e[i],m=oe(e[i+1])||e[i+1]==="("&&oe(e[i+2]);if((d==="h"||d==="p")&&m)c.push("h");else if(d==="/"||d==="\\"||d==="s"){if(m)c.push("sl");else if(d!=="s")c.push(d==="/"?"sou":"sod")}if(c.length)n.set(a,c);a+=s}return{frets:t,effects:n}}var Dn=(e,t,n=[])=>(o,r)=>{let a=[],s=new Set,l=r,c=!1,u=(i,d)=>{let m=o[i][d],g=t.has(d)?["pm"]:[];if(m==="x"||m==="X"){a.push({tex:`x.${n[i]??i+1}`,effects:g}),s.add(i);return}let f=e[i].frets.get(d);if(!f)return;if(f.width===2&&d===r)c=!0;if(o[i][d-1]==="<")l=Math.min(l,d-1);a.push({tex:`${f.fret}.${n[i]??i+1}`,effects:[...e[i].effects.get(d)??[],...g],string:n[i]??i+1}),s.add(i)};if(o.forEach((i,d)=>u(d,r)),c)o.forEach((i,d)=>s.has(d)||u(d,r+1));return{beat:a,skip:c?1:0,at:l}},fe={3:[64,59,55],4:[43,38,33,28],5:[43,38,33,28,23],6:[64,59,55,50,45,40],7:[64,59,55,50,45,40,35]},at=[64,59,55,50,45,40,35,30],Me={names:["E","A","D","G","B","E"],midis:[40,45,50,55,59,64]},On=["E A D G","B E A D G"],Ee=(e)=>e[0].toUpperCase()+e.slice(1);function ze(e){let t=e.length;if(e.every((n)=>n!==null&&/^\d$/.test(n)))return e.every((n)=>at[Number(n)-1])?e.map((n)=>at[Number(n)-1]):null;if(e.every((n)=>n!==null&&/^[A-Ga-g]/.test(n))){let n=[...e].reverse(),o=n.map(Ee).join(" ");if(On.includes(o))return pe(o).map((s)=>s-12).reverse();let r=[...Me.names.keys()].filter((s)=>n.every((l,c)=>Me.names[s+c]===Ee(l)));if(r.length){let s=r.length>1&&n[0]==="e"?r.at(-1):r[0];return Me.midis.slice(s,s+t).reverse()}if(t===1){let s=ne(Ee(e[0]));return s===null?null:[48+(s-48+120)%12]}let a=pe(o);if(a)return a.reverse()}return fe[t]??null}function Rn(e){let t=[...fe[6]],n=t.indexOf(e);if(n<0)n=t.reduce((o,r,a)=>Math.abs(r-e)<Math.abs(t[o]-e)?a:o,0),t[n]=e;return{tuning:t,string:n+1}}function Gn(e){if(e.length===1){let{tuning:o,string:r}=Rn(e[0]);return{tuning:o,strings:[r]}}let t=fe[6];if(e.length>5)return null;let n=e.map((o)=>t.indexOf(o));if(n[0]<0||n.some((o,r)=>o!==n[0]+r))return null;return{tuning:[...t],strings:n.map((o)=>o+1)}}var Bn=(e)=>(t,n)=>{let o=[];return t.forEach((r,a)=>{let s=r[n];if(!/[xXoOgfdb#@*+]/.test(s))return;let l=wn(e[a],s);if(!o.some((c)=>c.tex===l))o.push({tex:l,effects:xn(s)})}),{beat:o,skip:0}},gt=[[24,1,!0],[16,1,!1],[12,2,!0],[8,2,!1],[6,4,!0],[4,4,!1],[3,8,!0],[2,8,!1],[1,16,!1]];function lt(e){let t=[];for(let n=e;n>0;){let[o,r,a]=gt.find(([s])=>s<=n);t.push({duration:r,dotted:a}),n-=o}return t}var q={ts:[4,4],length:16,beat:4,grids:[1,2,4,8,16]},ct={ts:[3,4],length:12,beat:4,grids:[1,3,6,12]},Un={ts:[6,8],length:12,beat:6,grids:[1,2,6,12]},jn={ts:[12,8],length:24,beat:6,grids:[1,2,4,12,24]};function In(e,t){let n=new Map;for(let r=1;r<e.length;r++){let a=e[r]-e[r-1],s=t[r]-t[r-1];if((n.get(a)??s)!==s)return!1;n.set(a,s)}let o=[...n].sort((r,a)=>r[0]-a[0]);return o.every(([,r],a)=>a===0||r>=o[a-1][1])}var $n=new Set(gt.map(([e])=>e));function Hn(e,t,[n,o],r,a,s){let l=o/t;if(l<1||a&&!Number.isInteger(l))return null;let c=[],u=0;for(let i of e){let d=(i-n)/l,m=Math.round(d),g=Math.abs(d-m)*l;if(m<0||m>=t||g>r+0.000000001||c.length&&m*(s/t)<=c.at(-1))return null;u=Math.max(u,g),c.push(m*(s/t))}if(!a&&c.some((i,d)=>!$n.has((c[d+1]??s)-i)))return null;return In(e,c)?{at:c,error:u}:null}function Le(e,t,n,o=q){if(!e.length)return[];let r=[[n,t-n],[n,t]];for(let a=1;a<n;a++)r.push([a,t-a]);if(e[0]>n)r.push([0,t]);for(let[a,s]of[[0.4,!1],[1,!1],[0.4,!0]])for(let l of o.grids){let c=r.map((u)=>Hn(e,l,u,a,s,o.length)).filter((u)=>u!==null);if(c.length)return c.reduce((u,i)=>i.error<u.error?i:u).at}return null}function he(e,t,n=t.length){let o=[],{beat:r,length:a}=t;for(let s=e;s<n;){let l=a===4*r&&s%(2*r)===0&&s<=a/2?[2*r]:[],u=(s%2?[1]:s%r?[2,1]:[...l,r,2,1]).find((i)=>i<=n-s);o.push({beat:-1,sixteenths:u}),s+=u}return o}function Vn(e,t=q,n=[]){let o=e.slice(1).map((s,l)=>s-e[l]),r=new Map;for(let s of o)r.set(s,(r.get(s)??0)+1);let a=[...r].reduce((s,l)=>!s||l[1]>s[1]||l[1]===s[1]&&l[0]<s[0]?l:s,null)?.[0];for(let s of[2,1]){let l=e.map((u,i)=>s*(i<o.length?Math.max(1,Math.round(o[i]/a)):1)),c=l.reduce((u,i)=>u+i,0);if(s===2)for(let u of n){if(c<=t.length)break;if(u+1>=l.length||l[u]!==2)continue;let i=Math.max(1,l[u+1]-1);c-=1+l[u+1]-i,l[u]=1,l[u+1]=i}if(c>t.length)continue;return[...l.map((u,i)=>({beat:i,sixteenths:u})),...he(c,t)]}return e.map((s,l)=>({beat:l,sixteenths:1}))}var qn=new Set(["h","sl"]),Wn=(e)=>e.flatMap((t,n)=>t.notes.some((o)=>o.effects.some((r)=>qn.has(r)))?[n]:[]);function Kn(e,t,n){let o=n.length,r=e.part==="whole"?e.width:t,a=e.part==="end"?t-e.width:0,s=e.beats.map((i)=>i.col+a);if(e.part==="start"&&s.length){let i=Le([...s,e.width],r,e.pad,n);if(i){let d=i.pop(),m=i[0]>0?[{beat:-1,sixteenths:i[0]}]:[];return i.forEach((g,f)=>m.push({beat:f,sixteenths:(i[f+1]??d)-g})),[...m,...he(d,n)]}}let l=Le(s,r,e.pad,n);if(!l){let i=Vn(e.beats.map((g)=>g.col),n,Wn(e.beats));if(e.part!=="end")return i;let d=i.filter((g)=>g.beat>=0),m=d.reduce((g,f)=>g+f.sixteenths,0);return e.pickup?d:[...he(0,n,o-m),...d]}let c=l[0],u=c===0||e.pickup?[]:e.part==="end"?he(0,n,c):[{beat:-1,sixteenths:c}];return l.forEach((i,d)=>u.push({beat:d,sixteenths:(l[d+1]??o)-i})),u}var _n=(e)=>e.reduce((t,n)=>n.beats.length?Math.min(t,n.beats[0].col-n.start):t,3);function ut(e,t,n,o){let r=Math.max(...e.map((a)=>a.length));return{bars:t,pad:_n(t),texts:n,openStart:o&&t[0]?.start===0,openEnd:t.at(-1)?.end===r}}function Yn(e){let t=[];for(let n of e)n.bars.forEach((o,r)=>{if((r>0||!n.openStart)&&(r<n.bars.length-1||!n.openEnd)&&o.beats.length)t.push(o.end-o.start)});if(t.length<2)return null;return t.sort((n,o)=>n-o),t[t.length>>1]}function ht(e){let t=new Map;for(let o of e)t.set(o,(t.get(o)??0)+1);let n;for(let[o,r]of t)if(!n||r>n.count||r===n.count&&o<n.value)n={value:o,count:r};return n}function Xn(e,t){if(t===null)return q;let n=[];for(let i of e)i.bars.forEach((d,m)=>{let g=(m>0||!i.openStart)&&(m<i.bars.length-1||!i.openEnd),f=d.end-d.start;if(g&&d.beats.length&&Math.abs(f-t)<=1)n.push({bar:d,pad:i.pad})});let o=new Map;for(let{bar:i}of n)for(let d=1;d<i.beats.length;d++){let m=i.beats[d].col-i.beats[d-1].col;o.set(m,(o.get(m)??0)+1)}let r=Math.max(0,...o.values()),a=Math.min(...[...o].filter(([,i])=>i*2>=r).map(([i])=>i));if(n.length<2||!Number.isFinite(a))return q;let s=[],l=0,c=0;for(let{bar:i,pad:d}of n){let m=i.beats.map((h)=>(h.col-i.start-d)/a);if(m.some((h)=>Math.abs(h-Math.round(h))*a>0.40000000100000005)){s.push(0);continue}let g=m.map(Math.round),f=Math.max(Math.ceil((i.end-i.start-d)/a-0.5),g.at(-1)+1);if(s.push(f),f!==6)continue;let b=i.beats.reduce((h,k)=>k.notes.reduce((w,T)=>Math.max(w,T.string??0),h),0),p=g.filter((h,k)=>i.beats[k].notes.some((w)=>w.string===b));for(let h of[g,p.length<g.length?p:[]])if(h.some((k)=>k!==0&&k%2===0)&&h.every((k)=>k%2===0))l++;else if(h.includes(3)&&h.every((k)=>k%3===0))c++}let u=ht(s);if(u.count*3<n.length*2)return q;if(u.value===3)return ct;if(u.value===6)return l>c?ct:Un;return u.value===12?jn:q}function Zn(e,t){let n=(a)=>t!==null&&a<=t*2/3,o=[],r=null;return e.forEach((a,s)=>{let l=o.length,c=e[s+1];a.bars.forEach((i,d)=>{let m=i.beats.map((p)=>({notes:p.notes,col:p.col-i.start})),g={beats:m,width:i.end-i.start,pad:a.pad,part:"whole",pickup:!1,text:null},f=d===0&&r!==null;if(r&&d===0){let p=r.width-a.pad;g={...r,beats:[...r.beats,...m.map((h)=>({notes:h.notes,col:h.col+p}))],width:r.width+g.width-a.pad},r=null}if(d===a.bars.length-1&&n(g.width)){let p=c?.bars[0],h=p?g.width+p.end-p.start-c.pad:0;if(p&&(a.openEnd||n(p.end-p.start)&&(c.openStart||h<=t*1.25))){if(g.beats.length||!a.openEnd)r=g;return}if(a.openEnd&&!f){if(!g.beats.length)return;g.part="start"}}let b=!o.length;if(d===0&&!f&&g.part==="whole"&&n(g.width)&&g.beats.length){if(b||a.openStart)g.part="end",g.pickup=b}o.push(g)});let u=r??(o.length>l?o.at(-1):null);if(a.texts.length&&u){let i=a.texts.join(" / ");u.text=u.text?`${u.text} / ${i}`:i}}),o}function Jn(e,t){return e.flatMap((n)=>{if(n.part!=="whole"||n.beats.length<2)return[n];let o=n.beats.map((d)=>d.col);if(Le(o,n.width,n.pad,t))return[n];let r=o.slice(1).map((d,m)=>d-o[m]),a=ht(r).value,s=r.reduce((d,m)=>d+Math.max(1,Math.round(m/a)),1),l=t.length/2,c=a*l;if(s<=l||n.width-n.pad<c*1.5)return[n];let u=Math.floor((o.at(-1)-n.pad)/c)+1,i=Array.from({length:u},()=>[]);for(let d of n.beats){let m=Math.min(u-1,Math.max(0,Math.floor((d.col-n.pad)/c)));while(m<u-1&&d.col>=n.pad+(m+1)*c)m++;while(m>0&&d.col<n.pad+m*c)m--;i[m].push({notes:d.notes,col:d.col-m*c})}return i.map((d,m)=>({beats:d,width:n.pad+c,pad:n.pad,part:"whole",pickup:!1,text:m===u-1?n.text:null}))})}var Qn=(e)=>`"${e.replace(/[\\"]/g,(t)=>`\\${t}`)}"`,ge=(e,t)=>t.length?`${e}{${t.join(" ")}}`:e;function eo(e,t){if(!e.length)return ge("r",t);if(e.length===1)return ge(e[0].tex,[...e[0].effects,...t]);return ge(`(${e.map((n)=>ge(n.tex,n.effects)).join(" ")})`,t)}var dt=new Set(["h","sl","sou","sod"]);function to(e,t){if(t===1)return[e];let n=[e.map((o)=>({...o,effects:o.effects.filter((r)=>!dt.has(r))}))];for(let o=1;o<t;o++)n.push(e.filter((r)=>r.string!==void 0).map((r)=>({tex:`-.${r.string}`,effects:r.effects.filter((a)=>a==="pm"||o===t-1&&dt.has(a))})));return n}function mt(e,t){let n=0;return e.map(({beats:r,rhythm:a,text:s,pickup:l})=>{let c=[];if(!r.length)for(let d of t===q?[{duration:1,dotted:!1}]:lt(t.length))c.push({notes:[],...d});for(let{beat:d,sixteenths:m}of a){let g=lt(m),f=to(d>=0?r[d]:[],g.length);g.forEach((b,p)=>c.push({notes:f[p],...b}))}let u=c.length-1;while(u>0&&!c[u].notes.length)u--;if(!c[u].notes.length)u=c.length-1;let i=c.map((d,m)=>{let g=d.dotted?["d"]:[];if(s&&m===u)g.push(`txt ${Qn(s)}`);let f=d.duration===n?"":`:${d.duration} `;return n=d.duration,f+eo(d.notes,g)}).join(" ");return l?`\\ac ${i}`:i}).join(` |
3
+ `)}function ft(e){let t=Fn(e),n=t[0];if(!n)return null;let o=n.kind==="strings"?ze(n.names):null,r=o?Gn(o):null;if(r)o=r.tuning;let a=[];if(n.kind==="drums"){for(let m of t)if(m.kind==="drums")a.push(ut(m.lines,st(m.lines,Bn(m.drums)),m.texts,!1))}else{let m=JSON.stringify(ze(n.names)),g=r?.strings??[];for(let f of t){if(f.kind!=="strings"||JSON.stringify(ze(f.names))!==m)continue;let b=Dn(f.lines.map(Pn),f.muted,g);a.push(ut(f.lines,st(f.lines,b),f.texts,f.openStart))}}let s=Yn(a),l=Xn(a,s),c=Jn(Zn(a,s),l).map((m)=>({beats:m.beats.map((g)=>g.notes),rhythm:Kn(m,s??0,l),text:m.text,pickup:m.pickup}));if(!c.length)return null;let u=l===q?[]:[`\\ts ${l.ts.join(" ")}`];if(n.kind==="drums")return["\\instrument percussion","\\articulation defaults",...u,mt(c,l)].join(`
4
+ `);let i=o?.join(" ")===fe[6].join(" ");return[...o&&!i?[`\\tuning (${o.map((m)=>qe(m)).join(" ")})`]:[],...u,mt(c,l)].join(`
5
+ `)}var Ne=["generaluser","sonivox","light"];function be(e){if(typeof e!=="string")return null;let t=e.trim().toLowerCase();return Ne.includes(t)?t:null}function no(e){return e?[e,...Ne.filter((t)=>t!==e)]:[...Ne]}function bt(e,t){for(let n of no(e)){let o=t(n);if(o!==null&&o!==void 0&&o!==!1)return{engine:n,value:o}}return null}function yt(e){if(!e||typeof e!=="object"||!("play"in e))return;let t=e.play;if(!t||typeof t!=="object"||!("engine"in t))return;return be(t.engine)??void 0}var oo={play:"M4 2.5v11l9-5.5z",pause:"M4 3h3v10H4zM9 3h3v10H9z",stop:"M4 4h8v8H4z",all:"M1.5 2.5v11l6.5-5.5zM8 2.5v11l6.5-5.5z",loop:"M3 8a5 5 0 0 1 8.5-3.5L13 6V2.5M13 8a5 5 0 0 1-8.5 3.5L3 10v3.5",count:"M5.5 14h5L9 2.5H7zM8 11.5l4.5-7",click:"M3 5v6M8 5v6M13 5v6",copy:"M2.5 3.5h11v9h-11zM2.5 11l3.5-3.5 3 3 2-2 2.5 2.5M10.5 6.5h.01",full:"M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10",names:"M3.5 13.5 8 2.5l4.5 11M5.3 9.5h5.4",follow:"M8 5a3 3 0 1 0 0 6a3 3 0 0 0 0-6M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2",exit:"M6 2.5V6H2.5M13.5 6H10V2.5M10 13.5V10h3.5M2.5 10H6v3.5"},ro=new Set(["loop","count","click","copy","full","exit","follow","names"]);function re(e,t){let n=Ce(e,"svg",{class:`mn-play-icon mn-play-icon-${t}${ro.has(t)?" mn-play-icon-line":""}`,viewBox:"0 0 16 16",width:12,height:12,"aria-hidden":"true"});return n.appendChild(Ce(e,"path",{d:oo[t]})),n}function kt(e,t,n){let o=F(e,"div",`mn-play mn-play-static ${t}`);return o.addEventListener("mousedown",(r)=>r.stopPropagation()),o.setAttribute("role","group"),o.setAttribute("aria-label",n),o}function K(e,t,n,o){let r=F(e,"button",t);return r.type="button",r.appendChild(re(e,o)),r.title=n,r.setAttribute("aria-label",n),r}function se(e,t,n,o,r,a){let s=K(e,t,n,o),l=()=>{s.setAttribute("aria-pressed",String(r)),s.classList.toggle("mn-on",r)};return s.addEventListener("click",()=>{r=!r,a(r),l()}),l(),s}var Fe=0.8;function vt(e){let t=e;if(typeof e==="function")try{t=e()}catch{t=void 0}return typeof t==="number"&&Number.isFinite(t)?Math.min(1,Math.max(0,t)):Fe}var so=Symbol.for("@dsebastien/music-notation/volume"),io=globalThis,wt=io[so]??=new Set,xt=(e)=>typeof e==="number"&&Number.isFinite(e)?Math.min(1,Math.max(0,e)):null;function Tt(e,t,n){let o=xt(n),r=()=>{let a=xt(e());if(a===null||a===o)return;o=a;for(let s of t())s.setVolume?.(a)};return wt.add(r),()=>{wt.delete(r)}}var ao=new Set(["PageUp","PageDown","Home","End","ArrowUp","ArrowDown"]);function lo(e){let t=e.ownerDocument.defaultView;if(!t)return"";for(let n=e.parentElement;n;n=n.parentElement){let o=t.getComputedStyle(n).backgroundColor;if(o&&o!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(o))return o}return""}function At(e,t,n,o=()=>{},r={}){let a=r.redraws!==!1,s=e.defaultView,l=V(),c=K(e,"mn-tab-full",l("playback.full.enter"),"full");c.classList.add("mn-play-full");let u=!1,i=!1,d=!1,m=null,g=null,f=!1,b="",p=(x)=>{if(d===x)return;d=x,o(x)},h=()=>{t.classList.toggle("mn-fullscreen",u),c.classList.toggle("mn-on",u),c.setAttribute("aria-pressed",String(u)),c.title=u?l("playback.full.exit"):l("playback.full.enter"),c.replaceChildren(re(e,u?"exit":"full"))},k=()=>{if(u)return;if(u=!0,m={x:s?.scrollX??0,y:s?.scrollY??0,background:t.style.backgroundColor},!f)b=t.style.minHeight;f=!1,g=e.createElement("div"),g.className="mn-fullscreen-place",g.style.height=`${t.offsetHeight}px`;let x=s?.getComputedStyle(t);if(x)g.style.marginTop=x.marginTop,g.style.marginBottom=x.marginBottom;t.before(g);let R=lo(t);if(R)t.style.backgroundColor=R;h(),n.tabIndex=0,n.focus({preventScroll:!0}),p(!0),r.changed?.(!0);try{t.requestFullscreen?.().catch(()=>{})}catch{}},w=(x=!0)=>{if(!u)return;if(u=!1,p(!1),h(),t.style.backgroundColor=m?.background??"",g){if(a)t.style.minHeight=g.style.height,f=!0;g.remove(),g=null}if(n.removeAttribute("tabindex"),n.scrollTop=0,i&&e.fullscreenElement===t)e.exitFullscreen?.().catch(()=>{});if(i=!1,m&&s)s.scrollTo(m.x,m.y);if(m=null,r.changed?.(!1),x)c.focus({preventScroll:!0})};c.addEventListener("click",()=>u?w():k()),t.addEventListener("keydown",(x)=>{if(!u||x.key!=="Escape")return;x.stopPropagation(),x.preventDefault(),w()});let T=()=>{if(u)p(!1)};n.addEventListener("wheel",T,{passive:!0}),n.addEventListener("touchmove",T,{passive:!0}),n.addEventListener("keydown",(x)=>{if(ao.has(x.key))T()});let S=(x)=>{if(!u||x.key!==" "||x.ctrlKey||x.metaKey||x.altKey)return;if(!t.isConnected){w(!1);return}if(x.target?.closest("input:not([type=range]), textarea, select, [contenteditable=true]"))return;if(x.preventDefault(),x.stopPropagation(),x.type!=="keydown"||x.repeat)return;t.querySelector(".mn-play .mn-play-toggle")?.click()};e.addEventListener("keydown",S,!0),e.addEventListener("keyup",S,!0);let L=()=>{if(e.fullscreenElement===t)i=!0;else if(i)w()};return e.addEventListener("fullscreenchange",L),h(),{button:c,active:()=>u,playing:()=>{if(u)p(!0)},drawn:()=>{if(u||!f)return;f=!1,t.style.minHeight=b},destroy:()=>{w(!1),e.removeEventListener("fullscreenchange",L),e.removeEventListener("keydown",S,!0),e.removeEventListener("keyup",S,!0)}}}function St(e){if(!e||typeof e!=="object")return!0;return e.fullScreen!==!1}function co(e,t,n=0){let o=e.top+n,r=e.bottom-n;if(t.bottom-t.top>=r-o)return Math.round(t.top-o);if(t.top<o)return Math.round(t.top-o);if(t.bottom>r)return Math.round(t.bottom-r);return 0}function uo(e,t,n=0){let o=e.bottom-e.top,r={top:e.top,bottom:e.bottom+o};return r.bottom-r.top<=t.bottom-t.top-2*n?r:e}var mo=new Set(["auto","scroll","overlay"]);function po(e){let t=e.ownerDocument.defaultView;if(!t)return null;let n=e.ownerDocument.scrollingElement??e.ownerDocument.documentElement;for(let o=e;o;o=o.parentElement){if(o===n||o===e.ownerDocument.body)return null;if(!(o instanceof t.HTMLElement))continue;if(mo.has(t.getComputedStyle(o).overflowY)&&o.scrollHeight>o.clientHeight+1)return o}return null}var go=new Set(["PageUp","PageDown","Home","End","ArrowUp","ArrowDown"]);function Ct(e,t={}){let n=e.ownerDocument,o=n.defaultView,r=t.margin??16,a=t.on===!0,s=!1,l=null,c=()=>t.changed?.({on:a,active:a&&!s}),u=()=>{if(!a||s)return;s=!0,c()},i=(m)=>{let g=m.target;if(!g||typeof g.contains!=="function")return;if(g.contains(e)||e.contains(g))u()},d=(m)=>{if(go.has(m.key))i(m)};return n.addEventListener("wheel",i,{passive:!0,capture:!0}),n.addEventListener("touchmove",i,{passive:!0,capture:!0}),n.addEventListener("keydown",d,!0),{on:()=>a,active:()=>a&&!s,set(m){if(a===m&&!s)return;a=m,s=!1,l=null,c()},press(){if(a&&s)s=!1;else a=!a;l=null,c()},playing(){if(l=null,!s)return;s=!1,c()},show(m,g=0){if(!a||s||!o)return;if(m.bottom<=m.top)return;let f=po(e),b=f?.getBoundingClientRect(),p={top:Math.max(0,b?.top??0),bottom:Math.min(o.innerHeight,b?.bottom??o.innerHeight)-g};if(p.bottom-p.top<=2*r)return;let h=Math.round(m.top+(f?f.scrollTop:o.scrollY));if(l!==null&&Math.abs(h-l)<2)return;l=h;let k=co(p,uo(m,p,r),r);if(!k)return;let w={top:k,behavior:"smooth"};if(f)f.scrollBy(w);else o.scrollBy(w)},destroy(){n.removeEventListener("wheel",i,!0),n.removeEventListener("touchmove",i,!0),n.removeEventListener("keydown",d,!0)}}}function ho(e,t,n){if(e.isRest)return[];return e.notes.filter((o)=>!o.isDead&&!o.isTieDestination&&Number.isFinite(o.realValue)).sort((o,r)=>r.realValue-o.realValue).map((o)=>nt(Ae((o.realValue%12+12)%12,n),t))}function Pe(e,t="letters"){let n=[];for(let o of e.tracks)for(let r of o.staves){if(r.isPercussion)continue;let a=r.bars.flatMap((l)=>l.voices.flatMap((c)=>c.beats.map((u)=>({bar:l,beat:u})))),s=a.some(({beat:l})=>(l.lyrics?.length??0)>0);for(let{bar:l,beat:c}of a){let u=Number(l.keySignature??l.masterBar?.keySignature??0),i=ho(c,t,u<0);if(!i.length)continue;if(!s){let d=c.lyrics;c.lyrics=i,n.push(()=>c.lyrics=d)}else if(!c.text){let d=c.text;c.text=i.join(" "),n.push(()=>c.text=d)}}}return()=>{for(let o of n.splice(0))o()}}function Mt(e){let t=e.trim().toLowerCase();if(t==="on"||t==="yes"||t==="true")return!0;if(t==="off"||t==="no"||t==="false")return!1;return null}var Et=[1,1.25,1.5,1.75,2,2.5,3];function zt(e,t){let n=null,o=!1,r=(a)=>{n=a,e(Et[a],!0)};return{enter(){o=!1,r(0)},leave(){n=null,o=!1,e(1,!1)},drawn(){if(n===null)return;if(o){n=null;return}if(t()){if(n+1<Et.length)r(n+1);else n=null;return}if(n>0)o=!0,r(n-1);else n=null}}}var Lt=0.25,Nt=1.5,J=5,ke=(e)=>Math.min(Nt,Math.max(Lt,e));function Ft(e,t,n){let o=n;for(let r of e){if(r.start>t)break;for(let a of r.tempoChanges)if(a.tick<=t)o=a.tempo}return o!==null&&Number.isFinite(o)&&o>0?o:n}function Pt(e,t){return ke(e/t)}var ye=(e,t)=>Math.round(e*t);function De(e,t,n,o){if(n==="bpm"&&o)return Pt(ye(e,o)+t,o);let r=Math.round(e*100),a=t>0?Math.floor(r/J)*J+J:Math.ceil(r/J)*J-J;return ke(a/100)}function fo(e,t,n){let o=`${Math.round(e*100)} %`;if(!n)return{value:String(Math.round(e*100)),unit:"%",other:""};let r=`${ye(e,n)} BPM`;return t==="bpm"?{value:String(ye(e,n)),unit:"BPM",other:o}:{value:String(Math.round(e*100)),unit:"%",other:r}}function bo(e,t,n){let o=Number(e.replace(",",".").replace(/[^\d.]/g,""));if(!e.trim()||!Number.isFinite(o)||o<=0)return null;return t==="bpm"&&n?Pt(o,n):ke(o/100)}function Dt(e,t){let n=V(),o=1,r=t.unit??"bpm",a=F(e,"span","mn-tempo");a.setAttribute("role","group"),a.setAttribute("aria-label",n("tab.tempo.group"));let s=(h,k,w)=>{let T=F(e,"button",h,k);return T.type="button",T.setAttribute("aria-label",w),T.title=w,T},l=s("mn-tempo-down","−",n("tab.tempo.slower")),c=s("mn-tempo-up","+",n("tab.tempo.faster")),u=F(e,"input","mn-tempo-value");u.type="text",u.inputMode="numeric",u.size=3,u.autocomplete="off";let i=s("mn-tempo-unit","BPM",n("tab.tempo.toPercent")),d=s("mn-tempo-other","",n("tab.tempo.reset")),m=!1;u.addEventListener("input",()=>m=!0);let g=()=>t.tempo()?r:"percent",f=()=>{let h=t.tempo(),k=fo(o,g(),h);if(!m)u.value=k.value;u.setAttribute("aria-label",k.unit==="BPM"?n("tab.tempo.inBpm"):n("tab.tempo.inPercent")),i.textContent=k.unit,i.hidden=!h;let w=n(g()==="bpm"?"tab.tempo.toPercent":"tab.tempo.toBpm");i.setAttribute("aria-label",w),i.title=w,d.textContent=k.other?`· ${k.other}`:"",d.hidden=!k.other,d.disabled=o===1,a.title=h?n("tab.tempo.title",{bpm:ye(o,h),percent:Math.round(o*100),tempo:Math.round(h)}):n("tab.tempo.speedTitle",{percent:Math.round(o*100)}),l.disabled=o<=Lt,c.disabled=o>=Nt},b=(h)=>{m=!1,o=ke(h),t.set(o),f()};l.addEventListener("click",()=>b(De(o,-1,g(),t.tempo()))),c.addEventListener("click",()=>b(De(o,1,g(),t.tempo()))),d.addEventListener("click",()=>b(1)),i.addEventListener("click",()=>{r=g()==="bpm"?"percent":"bpm",t.unitChanged?.(r),f()});let p=()=>{let h=bo(u.value,g(),t.tempo());if(m=!1,h===null)f();else b(h)};return u.addEventListener("change",p),u.addEventListener("keydown",(h)=>{if(h.key==="Enter")h.preventDefault(),p(),u.select();else if(h.key==="Escape")h.stopPropagation(),m=!1,u.blur(),f();else if(h.key==="ArrowUp"||h.key==="ArrowDown")h.preventDefault(),b(De(o,h.key==="ArrowUp"?1:-1,g(),t.tempo())),u.select()}),u.addEventListener("blur",()=>{m=!1,f()}),a.append(l,u,i,c,d),f(),{field:a,speed:()=>o,refresh:f}}function Rt(e){if(!e||typeof e!=="object"||!("play"in e))return;let t=e.play;if(!t||typeof t!=="object"||!("instruments"in t))return;let n=t.instruments;return typeof n==="string"&&n.trim()?n.trim():void 0}function Gt(e){let t=new Set,n=!1;for(let o of e.tracks)if(o.isPercussion)n=!0;else t.add(o.playbackInfo.program);return{programs:[...t].sort((o,r)=>o-r),drums:n}}function yo(e,t){let n=[];for(let o of t.programs){let r=e.programs[String(o)];if(!r?.file)return null;n.push(r.file)}if(t.drums){if(!e.drums?.file)return null;n.push(e.drums.file)}else if(e.click?.file&&t.click!==!1)n.push(e.click.file);return n.length?n:null}var Ot=new WeakMap,ko=(e)=>typeof e==="object"&&e!==null&&("programs"in e)&&typeof e.programs==="object"&&e.programs!==null;async function Bt(e,t,n){let o=Ot.get(n);if(!o)Ot.set(n,o=new Map);let r=o.get(e);if(!r)o.set(e,r={index:null,files:new Map});let a=async(i)=>{try{if(typeof e==="function")return await e(i);let d=await n.fetch(`${e.replace(/\/+$/,"")}/${i}`);return d.ok?new Uint8Array(await d.arrayBuffer()):null}catch{return null}},s=(i)=>{let d=r.files.get(i);if(!d)d=a(i),r.files.set(i,d),d.then((m)=>{if(!m)r.files.delete(i)});return d};r.index??=a("index.json").then((i)=>{if(!i)return null;try{let d=JSON.parse(new TextDecoder().decode(i));return ko(d)?d:null}catch{return null}});let l=await r.index;if(!l)return r.index=null,null;let c=yo(l,t);if(!c)return null;let u=await Promise.all(c.map(s));return u.every((i)=>i!==null)?u:null}var vo="1.9.0",le=(e=vo)=>{let t=`https://cdn.jsdelivr.net/npm/@coderline/alphatab@${e}/dist`;return{script:`${t}/alphaTab.min.js`,font:`${t}/font/Bravura.woff2`,soundFont:`${t}/soundfont/sonivox.sf3`}};async function Re(e,t,n,o,r=!1,a=V()){let s=t.defaultView,l=ve(t),c=null;if(n.instruments&&s)c=await Bt(n.instruments,o,s);let u=c?"instruments":"whole";if(!c)if(typeof n.soundFont==="string"){try{let m=await s?.fetch(n.soundFont);c=m?.ok?[new Uint8Array(await m.arrayBuffer())]:null}catch{c=null}if(!c)throw Error(a("tab.sound.loadFailed",{url:n.soundFont}))}else c=[n.soundFont];let i=c,d=0;return await new Promise((m)=>{e.soundFontLoaded.on(()=>{if(++d>=i.length)m()}),setTimeout(m,8000),i.forEach((g,f)=>e.loadSoundFont(l.bytes(g),r||f>0))}),u}function wo(e,t){return bt(t,(o)=>o==="generaluser"?Boolean(e.instruments):o==="sonivox")?.engine==="generaluser"?"generaluser":"sonivox"}function xo(e,t){if(!e.instruments||wo(e,t)==="generaluser")return e;let{instruments:n,...o}=e;return o}var To=/^\s*(staves|file|tracks?|engine|layout|names)\s*:\s*(.*)$/i;function Ao(e,t){let n=t.split(/\r?\n/),o={staves:e,stavesWritten:!1,file:null,tracks:null,engine:null,layout:"page",names:null,tex:"",texLine:0,fromText:!1},r=0;for(;r<n.length;r++){let s=n[r];if(!s.trim()||/^\s*\/\//.test(s))continue;let l=To.exec(s);if(!l)break;let c=l[1].toLowerCase(),u=l[2].trim();if(c==="staves"){let i=u.toLowerCase();if(i!=="tab"&&i!=="score"&&i!=="both")throw Error(j("tab.source.staves",{value:u}));o.staves=i,o.stavesWritten=!0}else if(c==="file")o.file=u.replace(/^!?\[\[|\]\]$/g,"").split(/[|#]/)[0].trim()||null;else if(c==="engine"){let i=be(u);if(!i)throw Error(j("playback.engine.invalid",{value:u}));o.engine=i}else if(c==="layout"){let i=u.toLowerCase();if(i!=="page"&&i!=="line")throw Error(j("tab.source.layout",{value:u}));o.layout=i}else if(c==="names"){let i=Mt(u);if(i===null)throw Error(j("tab.source.names",{value:u}));o.names=i}else{let i=u.split(/[\s,]+/).filter(Boolean).map(Number);if(!i.length||i.some((d)=>!Number.isInteger(d)||d<1))throw Error(j("tab.source.tracks",{value:u}));o.tracks=i}}while(r<n.length&&!n[r].trim())r++;if(o.texLine=r,o.tex=n.slice(r).join(`
6
+ `).trimEnd(),!o.file&&!o.tex)throw Error(j("tab.source.empty",{example:"[[Song.gp]]"}));let a=o.file?null:ft(o.tex);if(a!==null)o.tex=a,o.fromText=!0;return o}function So(e,t,n){return $t(e,t,n).message}function $t(e,t,n){let o=e?.cause??e;for(let r of["lexerDiagnostics","parserDiagnostics","semanticDiagnostics"]){let a=o?.[r]?.items;if(!Array.isArray(a))continue;let s=a.find((l)=>l.severity===2&&l.message);if(s){if(s.start&&t!==null){let l=s.start.line+t,c=s.start.col;return{message:`${n("tab.error.at",{line:l,column:c})}${s.message}`,line:l,column:c}}return{message:s.message}}}return{message:e instanceof Error?e.message:String(e)}}var Co=0;function Ut(e,t){for(let n of t.tracks)for(let o of n.staves){if(o.isPercussion)for(let a of o.bars??[])a.clef=Co;let r=!o.isPercussion&&o.tuning.length>0;if(e==="both"){o.showStandardNotation=!0,o.showTablature=r;continue}o.showSlash=!1,o.showNumbered=!1,o.showTablature=e==="tab"&&r,o.showStandardNotation=!o.showTablature}}var Mo=5;function Eo(e,t){if(t!==null&&/\bdy\b|\\showdynamics/i.test(t))return;if(!e.tracks.some((o)=>o.staves.some((r)=>r.bars.some((a)=>a.voices.some((s)=>s.beats.some((l)=>!l.isRest&&l.dynamics!==Mo))))))e.stylesheet.hideDynamics=!0}var zo="rendered by alphaTab";function Lo(e,t){e.renderer?.partialRenderFinished?.on((o)=>{for(let r of t.querySelectorAll(".at-surface > div")){if(r.layoutResultId!==o.id)continue;let a=typeof o.renderResult==="string"&&o.renderResult.includes(zo);r.style.visibility=a?"hidden":""}})}function jt(e,t,n=1){let o=e.createElement("canvas");o.width=1,o.height=1;let r=o.getContext("2d",{willReadFrequently:!0});if(!r)return null;r.fillStyle="#000",r.fillStyle=t,r.fillRect(0,0,1,1);let a=r.getImageData(0,0,1,1).data;if(a.length<4)return null;return`rgba(${a[0]}, ${a[1]}, ${a[2]}, ${(a[3]/255*n).toFixed(3)})`}function No(e){let t=e.ownerDocument,n=t.defaultView?.getComputedStyle(e).color||"",o=n&&jt(t,n)||(/^rgba?\(/.test(n)?n:"rgba(0, 0, 0, 1)"),r=n&&jt(t,n,0.6)||o;return{mainGlyphColor:o,secondaryGlyphColor:r,scoreInfoColor:o,staffLineColor:r,barSeparatorColor:o,barNumberColor:r}}var ve=(e)=>{let t=e.defaultView??globalThis;return{map:(n)=>new t.Map(n),bytes:(n)=>{let o=new t.Uint8Array(n.length);return o.set(n),o}}},It=(e)=>{let t=Math.max(0,Math.round(e/1000));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function Fo(e,t,n,o,r,a={}){let s=V(),l=kt(e,"mn-tab-bar",s("playback.bar")),c={loop:!1,metronome:!1,countIn:!1,speed:1},u=()=>vt(r),i=()=>{},d=null,m=null,g=()=>(d??=new Promise((y)=>{if(m=()=>y(!1),t.settings.player.playerMode=n.PlayerMode.EnabledSynthesizer,t.settings.player.enableCursor=!0,!o.instruments){if(t.playerReady.on(()=>y(!0)),typeof o.soundFont==="string")t.settings.player.soundFont=o.soundFont;if(t.updateSettings(),o.soundFont instanceof Uint8Array)t.loadSoundFont(ve(e).bytes(o.soundFont),!1);return}let v=!1,O=!1,P=()=>{if(v&&O)y(!0)};t.playerReady.on(()=>{v=!0,P()}),t.updateSettings();let G=t.score?Gt(t.score):{programs:[],drums:!1};Re(t,e,o,G,!1,s).then(()=>{O=!0,P()},(B)=>{y(!1),i(B instanceof Error?B.message:String(B))})}).then((y)=>{if(y)t.isLooping=c.loop,t.metronomeVolume=c.metronome?1:0,t.countInVolume=c.countIn?1:0,t.playbackSpeed=c.speed,t.masterVolume=u();return y}),d),f=(y)=>{if(t.player)y()},b=K(e,"mn-play-toggle",s("playback.play"),"play");b.addEventListener("click",()=>{g().then((y)=>{if(y)t.playPause()})}),i=(y)=>{b.disabled=!0,b.title=s("tab.player.cantPlay",{message:y}),b.setAttribute("aria-label",b.title)};let p=K(e,"mn-tab-stop",s("playback.stop"),"stop");p.addEventListener("click",()=>f(()=>t.stop()));let h=()=>f(()=>{t.isLooping=c.loop,t.metronomeVolume=c.metronome?1:0,t.countInVolume=c.countIn?1:0}),k=se(e,"mn-tab-loop",s("playback.loop"),"loop",!1,(y)=>{c.loop=y,h()}),w=se(e,"mn-tab-click",s("tab.player.metronome"),"click",!1,(y)=>{c.metronome=y,h()}),T=se(e,"mn-tab-count",s("playback.countIn"),"count",!1,(y)=>{c.countIn=y,h()}),S=t.score?.tempo??null,L=Dt(e,{...a.tempoUnit?{unit:a.tempoUnit}:{},tempo:()=>S,set:(y)=>{c.speed=y,f(()=>t.playbackSpeed=c.speed)},...a.onTempoUnit?{unitChanged:a.onTempoUnit}:{}}),x=F(e,"span","mn-tab-time","");l.append(b,p,k,w,T,L.field,x);let R=Tt(u,()=>[{stop(){},setVolume:(y)=>f(()=>t.masterVolume=y)}],u());return t.playerStateChanged.on((y)=>{let v=Number(y.state)===Number(n.synth.PlayerState.Playing);b.replaceChildren(re(e,v?"pause":"play")),b.title=v?s("tab.player.pause"):s("playback.play"),b.setAttribute("aria-label",b.title)}),t.playerPositionChanged.on((y)=>{x.textContent=`${It(y.currentTime)} / ${It(y.endTime)}`;let v=Ft(t.tickCache?.masterBars??[],y.currentTick,t.score?.tempo??null);if(v!==S)S=v,L.refresh()}),{bar:l,speed:()=>c.speed,destroy:R,failed:(y)=>{m?.(),i(y)}}}function Po(e,t){return e.tracks.some((n,o)=>(!t||t.includes(o+1))&&n.staves.some((r)=>!r.isPercussion&&r.tuning.length>0))}var Do=[{staves:"tab",label:"tab.view.tab",what:"tab.view.whatTab"},{staves:"score",label:"tab.view.score",what:"tab.view.whatScore"},{staves:"both",label:"tab.view.both",what:"tab.view.whatBoth"}];function Oo(e,t,n,o){let r=V(),a=F(e,"span","mn-tab-views");a.setAttribute("role","group"),a.setAttribute("aria-label",r("tab.view.group"));let s=t.staves,l=o?F(e,"button","mn-tab-keep",r("tab.view.keep")):null,c=Do.map(({staves:i,label:d,what:m})=>{let g=F(e,"button","mn-tab-view",r(d));return g.type="button",g.dataset.staves=i,g.title=i!==t.staves?r("tab.view.drawAs",{what:r(m)}):t.written?r("tab.view.drawAsWritten",{what:r(m)}):r("tab.view.drawAsDefault",{what:r(m)}),g.addEventListener("click",()=>{if(i===s)return;s=i,u(),n(i)}),a.appendChild(g),g}),u=()=>{for(let i of c){let d=i.dataset.staves===s;i.classList.toggle("mn-on",d),i.setAttribute("aria-pressed",String(d))}if(l)l.hidden=s===t.staves,l.title=r("tab.view.keepTitle",{staves:s})};if(l&&o)l.type="button",l.addEventListener("click",()=>o(s)),a.appendChild(l);return u(),a}function Ge(e,t,n,o){let r=n.ownerDocument,a=X(o.language)??"en",s=de(a),l=F(r,"div",`mn-block mn-block-${e} mn-tab`);n.appendChild(l);let c=null,u=()=>1,i=()=>{},d=!1,m=!1,g=()=>{},f=new Promise((p)=>{g=(h)=>{if(m)return;m=!0,p(h)}}),b=(p,h={})=>{l.replaceChildren(F(r,"div","mn-error-message",`${e}: ${p}`)),l.classList.add("mn-error"),g({ok:!1,error:p,...h})};if(!t.trim())l.classList.add("mn-empty"),g({ok:!0,error:null});else(async()=>{await Promise.resolve();let p=Se(a,()=>Ao(e,t)),h={staves:p.stavesWritten?p.staves:o.defaultStaves??p.staves,written:p.stavesWritten},k=h.staves,w=!1,T=o.alphaTab;if(!T?.AlphaTabApi)throw Error("alphaTab isn't loaded");let S=F(r,"div","mn-tab-surface");l.appendChild(S);let L=p.layout==="line";l.classList.toggle("mn-tab-line",L);let{assets:x}=o,R=ve(r),y={core:{useWorkers:Boolean(x.scriptFile),...x.scriptFile?{scriptFile:x.scriptFile}:{},smuflFontSources:R.map([[T.FontFileFormat.Woff2,x.font]]),logLevel:T.LogLevel.Warning,enableLazyLoading:!1},display:{staveProfile:"Default",resources:No(l),...L?{layoutMode:T.LayoutMode?.Horizontal??1}:{}},player:{playerMode:T.PlayerMode.Disabled,enableSeekToClick:!0,enablePlaybackRangeSelection:!0,scrollMode:T.ScrollMode.Off}},v=new T.AlphaTabApi(S,y);if(c=v,v.settings.player.scrollElement=S,d){v.destroy();return}o.onApi?.(v);let O=p.names??o.names===!0,P=me(o.naming)??"letters",G=null,B=[];v.scoreLoaded.on((M)=>{if(B=M.tracks.flatMap((C)=>C.staves.map((N)=>({showSlash:N.showSlash,showNumbered:N.showNumbered}))),Ut(k,M),w=Po(M,p.tracks),Eo(M,p.file?null:p.tex),G=null,O)G=Pe(M,P)}),Lo(v,S);let E=null;v.renderFinished.on(()=>Se(a,()=>{if(m||d)return;if(o.player!==!1){let M=p.engine??be(o.engine);if(p.engine)l.setAttribute("data-mn-engine",p.engine);if(E=Fo(r,v,T,xo(x,M),o.volume,o),i=E.destroy,u=E.speed,l.appendChild(E.bar),o.views!==!1&&w)E.bar.appendChild(Oo(r,h,(A)=>{k=A;let z=v.score;if(d||!z)return;z.tracks.flatMap((ee)=>ee.staves).forEach((ee,D)=>Object.assign(ee,B[D])),Ut(A,z),v.render()},o.onKeepView));E.bar.appendChild(se(r,"mn-tab-names",s("tab.names"),"names",O,(A)=>{O=A;let z=v.score;if(d||!z)return;G?.(),G=A?Pe(z,P):null,v.render()}));let C=null,N=!1,I=!0,Q=()=>C?.active()??!1,Y=K(r,"mn-tab-follow",s("tab.follow"),"follow"),$e=()=>{let A=Q()?I:H.on(),z=Q()?I&&!N:A&&!H.active();Y.setAttribute("aria-pressed",String(A)),Y.classList.toggle("mn-on",A),Y.classList.toggle("mn-follow-paused",z),Y.title=z?s("tab.followPaused"):s("tab.follow")},xe=()=>{let A=L?T.ScrollMode.Continuous:T.ScrollMode.OffScreen,z=Q()?N&&I?A:T.ScrollMode.Off:L&&H.active()?A:T.ScrollMode.Off;if(v.settings.player.scrollMode!==z)v.settings.player.scrollMode=z,v.updateSettings();$e()},H=Ct(l,{on:L,changed:xe});if(L)v.settings.player.scrollOffsetX=-24,v.settings.player.scrollMode=T.ScrollMode.Continuous,v.updateSettings();Y.addEventListener("click",()=>{if(!Q())return H.press();if(I&&!N)C?.playing();else I=!I;xe()}),v.playerStateChanged.on((A)=>{if(Number(A.state)===Number(T.synth?.PlayerState.Playing))H.playing()});let nn=E;v.playerPositionChanged.on(()=>{if(L||Q()||!H.active())return;let A=S.querySelector(".at-cursor-bar");if(!A)return;let{top:z,bottom:U}=A.getBoundingClientRect();H.show({top:z,bottom:U},nn.bar.offsetHeight+12)}),$e(),E.bar.appendChild(Y);{let A=i;i=()=>{H.destroy(),A()}}if(o.fullScreen!==!1){let A=null,z=zt((D,te)=>{let W=v.settings.display;if(d||!W)return;A??={scale:W.scale,fill:W.lastSystemFillThreshold},W.scale=te?D:A.scale,W.lastSystemFillThreshold=te?0:A.fill,v.updateSettings(),v.render()},()=>S.scrollHeight<=S.clientHeight+1),U=At(r,l,S,(D)=>{N=D,xe()},{changed:(D)=>D?z.enter():z.leave()});C=U,v.postRenderFinished.on(()=>{let D=S.querySelector(".at-surface");if(D&&U.active()){let te=Math.max(0,...[...D.children].map((W)=>{let He=W;return He.offsetTop+He.offsetHeight}));if(te>D.offsetHeight)D.style.height=`${te}px`}z.drawn()}),v.playerStateChanged.on((D)=>{if(Number(D.state)===Number(T.synth.PlayerState.Playing))U.playing()}),v.renderFinished.on(()=>U.drawn()),E.bar.appendChild(U.button);let ee=i;i=()=>{U.destroy(),ee()}}l.addEventListener("pointerdown",(A)=>{if(A.pointerType!=="touch"||E?.bar.contains(A.target))return;l.classList.toggle("mn-play-open")})}g({ok:!0,error:null})})),v.error.on((M)=>{let C=p.fromText?null:$t(M,p.texLine,s),N=C?C.message:s("tab.error.textTab",{message:So(M,null,s)}),I={...C?.line!==void 0?{line:C.line}:{},...C?.column!==void 0?{column:C.column}:{}};if(m)E?.failed(N);else b(N,I)});let _=p.tracks?.map((M)=>M-1);if(p.file){let M;try{M=o.resolveFile?await o.resolveFile(p.file):null}catch(N){throw Error(s("tab.error.fileRead",{file:p.file,message:N instanceof Error?N.message:String(N)}),{cause:N})}if(d)return;if(!M)throw Error(s("tab.error.fileMissing",{file:p.file}));if(!v.load(R.bytes(M),_))throw Error(s("tab.error.fileUnknown",{file:p.file}))}else v.tex(p.tex,_??"all")})().catch((p)=>{if(!d)b(p instanceof Error?p.message:String(p))});return{el:l,ready:f,get api(){return c},speed:()=>u(),destroy(){d=!0,i();try{c?.destroy()}catch{}l.remove(),g({ok:!1,error:null})}}}var ie={guitar:25,piano:0},ae={channel:1,program:28},Oe={channel:9,key:33},Ro=0.5;function Go(e,t){return{reportsStart:!0,play(n,{sound:o,volume:r,onEnd:a,onStart:s}){let l=t(),c=l?.player;if(!l||!c)throw Error("The soundfont player is not ready");let u=new e.midi.MidiFile,i=new e.midi.AlphaSynthMidiFileHandler(u,!0),d=(p)=>Math.round(p*u.division);if(i.addTempo(0,60),i.addProgramChange(0,0,0,ie[o]),o==="guitar"&&n.some((p)=>p.kind==="muted"))i.addProgramChange(0,0,ae.channel,ae.program);if(n.some((p)=>p.kind==="click"))i.addProgramChange(0,0,Oe.channel,0);let m=Number.isFinite(r)?Math.min(1,Math.max(0,r)):0.8;l.masterVolume=m;for(let p of n){let h=p.velocity===void 0||!Number.isFinite(p.velocity)?100:Math.round(Math.min(127,Math.max(1,p.velocity))),k=p.kind==="click"?Oe.channel:p.kind==="muted"&&o==="guitar"?ae.channel:0;i.addNote(0,d(p.time),Math.max(1,d(p.duration)),p.kind==="click"?Oe.key:p.midi,h,k)}let g=Math.max(...n.map((p)=>p.time+p.duration),0);i.addControlChange(0,d(g+Ro),0,e.midi.ControllerType.HoldPedal,0),l.playbackSpeed=1,c.playOneTimeMidiFile(u);let f=!1;queueMicrotask(()=>{if(!f)s?.()});let b=setTimeout(()=>a?.(),(g+0.2)*1000);return{stop(){f=!0,clearTimeout(b),c.stop()},setVolume(p){if(f||!Number.isFinite(p))return;l.masterVolume=Math.min(1,Math.max(0,p))}}}}}function we(e,t,n,o){let r=null,a=null,s=null,l=new Set,c=new Map,u=!t.instruments,i=(f)=>f==="guitar"?[ie.guitar,ae.program]:[ie[f]],d=(f="guitar")=>{if(s)return s;a=F(n,"div","mn-tab-hidden"),a.setAttribute("aria-hidden","true"),n.body.appendChild(a);let b=ve(n);r=new e.AlphaTabApi(a,{core:{useWorkers:Boolean(t.scriptFile),...t.scriptFile?{scriptFile:t.scriptFile}:{},smuflFontSources:b.map([[e.FontFileFormat.Woff2,t.font]])},player:{playerMode:e.PlayerMode.EnabledSynthesizer,enableCursor:!1,scrollMode:e.ScrollMode.Off,...typeof t.soundFont==="string"&&!t.instruments?{soundFont:t.soundFont}:{}}});let p=r;if(s=new Promise((h)=>{let k=!1,w=!p.playerReady,T=()=>{if(k&&w)h(!0)},S=()=>{k=!0,T(),setTimeout(()=>{w=!0,T()},4000)};if(p.playerReady?.on(()=>{w=!0,T()}),p.error.on(()=>h(!1)),t.instruments)Re(p,n,t,{programs:i(f),drums:!1}).then((L)=>{if(L==="whole")u=!0;else l.add(f);S()},()=>h(!1));else p.soundFontLoaded.on(S)}),t.soundFont instanceof Uint8Array&&!t.instruments)p.loadSoundFont(b.bytes(t.soundFont),!1);return p.tex(`\\track "Guitar" \\instrument ${ie.guitar} r \\track "Piano" \\instrument ${ie.piano} r \\track "Muted" \\instrument ${ae.program} r`),s},m=async(f)=>{if(!await d(f))return!1;if(u||l.has(f)||!r)return!0;let b=r,p=c.get(f);if(!p)p=Re(b,n,t,{programs:i(f),drums:!1,click:!1},!0).then((h)=>{if(h==="whole")u=!0;else l.add(f);return!0},()=>!1),c.set(f,p);return p},g=Go(e,()=>r);return{reportsStart:!0,play(f,b){let p=null,h=!1,k=b.volume;return m(b.sound).then((w)=>{if(h)return;try{if(w){p=g.play(f,{...b,volume:k});return}}catch{}if(!o)return;if(p=o.play(f,{...b,volume:k}),!o.reportsStart)b.onStart?.()}),{stop(){h=!0,p?.stop()},setVolume(w){k=w,p?.setVolume?.(w)}}},destroy(){try{r?.destroy()}catch{}a?.remove(),r=null,s=null,l.clear(),c.clear(),u=!t.instruments}}}function Ht(e=()=>le().script){let t=null;return(n)=>{let o=n.defaultView;if(o.alphaTab)return Promise.resolve(o.alphaTab);return t??=new Promise((r,a)=>{let s=n.createElement("script");s.src=e();let l=o.define?.amd?o.define:void 0;if(l)o.define=void 0;let c=(u)=>{if(l&&o.define===void 0)o.define=l;if(u===null&&o.alphaTab){r(o.alphaTab);return}t=null,s.remove(),a(Error(u??"alphaTab's script didn't define alphaTab"))};s.onload=()=>c(null),s.onerror=()=>c("Couldn't load alphaTab"),n.head.appendChild(s)}),t}}function Vt(e,t){return(e&&typeof e==="object"?X(e.language):null)??X(t.documentElement.lang)??"en"}var qt=`/* Music notation. Colors follow Obsidian's theme variables when present, with fallbacks for any page. */
7
7
  .mn-block,
8
8
  .mn-svg,
9
9
  .mn-chart {
@@ -318,7 +318,11 @@
318
318
  }
319
319
 
320
320
  .mn-play .mn-tempo-value {
321
+ /* Obsidian gives every input border-box and a 30 px height: 3.5ch then held the
322
+ padding and border too, and "100" was cut. */
323
+ box-sizing: content-box;
321
324
  width: 3.5ch;
325
+ height: auto;
322
326
  padding: 0 2px;
323
327
  border: 1px solid var(--mn-faint);
324
328
  border-radius: 4px;
@@ -432,6 +436,14 @@
432
436
  position: relative;
433
437
  }
434
438
 
439
+ /* A block scrolls sideways when a row of diagrams is wider than it (\`.mn-block\`), which makes it
440
+ the scroll box of its bar: the bar then never stays at the bottom of the screen (#122). A tab
441
+ or a score is drawn at the block's width, so nothing of it scrolls there: the page, or the
442
+ app's pane, is the scroll box of its bar. */
443
+ .mn-block.mn-tab {
444
+ overflow: visible;
445
+ }
446
+
435
447
  .mn-tab .mn-play.mn-play-static.mn-tab-bar {
436
448
  bottom: 6px;
437
449
  }
@@ -1371,4 +1383,17 @@
1371
1383
  padding: 6px 0 8px;
1372
1384
  background: inherit;
1373
1385
  }
1374
- `;var Pn=tt,nt="music-notation-styles";function rt(e){if(e.getElementById(nt))return;let n=e.createElement("style");n.id=nt,n.textContent=Pn,e.head.appendChild(n)}var On=(e)=>e.reduce((n,t)=>Math.max(n,t.time+t.duration),0),pe=(e)=>440*Math.pow(2,(e-69)/12);function Dn(e,n,t,r=Math.random,o={}){let s=new Float32Array(Math.round(n*t)),a=Math.max(2,Math.round(n/pe(e))),l=new Float32Array(a);for(let g=0;g<a;g++)l[g]=r()*2-1;let i=Math.min(1,Math.max(0,o.brightness??1));if(i<1){let g=0.2+0.8*i,f=l[a-1];for(let b=0;b<a;b++)l[b]=f+=g*(l[b]-f)}let u=Math.min(0.5,Math.max(0,o.pick??0)),m=Math.round(u*a);if(m>0){let g=Float32Array.from(l);for(let f=0;f<a;f++)l[f]=g[f]-g[(f-m+a)%a]}if(i<1||m>0){let g=l.reduce((b,y)=>b+y,0)/a,f=l.reduce((b,y)=>Math.max(b,Math.abs(y-g)),0)||1;for(let b=0;b<a;b++)l[b]=(l[b]-g)/f}let c=o.damping!==void 0&&Number.isFinite(o.damping)?o.damping:1,d=(0.004-Math.min(0.0035,0.00004*(90-e)))*c,h=1-Math.min(0.02,Math.max(0.0001,d)),p=0;for(let g=0;g<s.length;g++){let f=(p+1)%a,b=l[p];l[p]=h*0.5*(b+l[f]),s[g]=b*0.5,p=f}return s}var ot=0.07,st=0.03,Rn=(e)=>e>=88?2800:e>=84?2100:1400;function $n(e,n,t,r,o,s){let a=r+t.time,l=t.velocity===void 0||!Number.isFinite(t.velocity)?1:Math.min(127,Math.max(0,t.velocity))/100,i=e.createGain();i.connect(n);let u,m;if(t.kind==="click"){let c=e.createOscillator();c.type="triangle",c.frequency.value=Rn(t.midi),u=c,m=st,i.gain.setValueAtTime(0,a),i.gain.linearRampToValueAtTime(0.5*l||0.0001,a+0.001),i.gain.exponentialRampToValueAtTime(0.0001,a+st)}else{let c=e.createBiquadFilter();if(c.type="lowpass",c.frequency.value=o==="guitar"?1800:2500,c.connect(i),o==="guitar"){let d=e.createBufferSource();d.buffer=s(e,t.midi),u=d}else{let d=e.createOscillator();d.type="triangle",d.frequency.value=pe(t.midi),u=d}m=ot,i.gain.setValueAtTime(1.2*l||0.0001,a),i.gain.exponentialRampToValueAtTime(0.0001,a+ot),u.connect(c)}if(t.kind==="click")u.connect(i);return u.start(a),u.stop(a+m+0.02),u}var at=new WeakMap;function Hn(e){let n=at.get(e);if(n)return n;let t=e.AudioContext;if(!t)return null;let r=new t;return at.set(e,r),r}var Bn=4,it=[0,1,0.5,0.3,0.15,0.08,0.04],fe=4,zn={guitar:0.15,piano:0.3},lt=(e,n)=>Math.min(zn[e],Math.max(0.03,n/2)),Un=(e)=>Math.min(2.5,Math.max(0.35,Math.pow(2,(60-e)/24)));function mt(e,n=Math.random){let t=new Map,r=new WeakMap,o=(l,i)=>l+(i-l)*n(),s=(l,i,u)=>{let m=i*fe+u,c=t.get(m);if(!c){let d=Dn(i,l.sampleRate,Bn,n,{brightness:o(0.55,0.95),pick:o(0.08,0.2),damping:o(0.85,1.15)});c=l.createBuffer(1,d.length,l.sampleRate),c.getChannelData(0).set(d),t.set(m,c)}return c},a=(l)=>{let i=r.get(l);if(!i){let u=new Float32Array(it.length);i=l.createPeriodicWave(u,Float32Array.from(it)),r.set(l,i)}return i};return{reportsStart:!0,play(l,{sound:i,volume:u,onEnd:m,onStart:c}){let d=Hn(e);if(!d||!l.length)return{stop(){}};let h=d.resume(),p=l.map(()=>({pluck:Math.min(fe-1,Math.floor(n()*fe)),cents:o(-4,4),level:o(0.93,1.07),decay:o(0.9,1.1)}));if(i==="guitar")l.forEach((v,N)=>{if(v.kind==="muted")s(d,v.midi,0);else if(!v.kind)s(d,v.midi,p[N].pluck)});let g=d.createGain();g.gain.value=Number.isFinite(u)?Math.min(1,Math.max(0,u)):0.8,g.connect(d.destination);let f=d.currentTime+0.05,b=l.map((v,N)=>{if(v.kind)return $n(d,g,v,f,i,(O,ft)=>s(O,ft,0));let T=p[N],S=f+v.time,C=S+v.duration,R=lt(i,v.duration),E=d.createGain();E.connect(g);let D=(v.velocity===void 0||!Number.isFinite(v.velocity)?1:Math.min(127,Math.max(0,v.velocity))/100)*T.level,P;if(i==="guitar"){let O=d.createBufferSource();O.buffer=s(d,v.midi,T.pluck),O.playbackRate.value=Math.pow(2,T.cents/1200),P=O,E.gain.setValueAtTime(D,S),E.gain.setValueAtTime(D,C)}else{let O=d.createOscillator();O.setPeriodicWave(a(d)),O.frequency.value=pe(v.midi),O.detune.value=T.cents,P=O,E.gain.setValueAtTime(0,S),E.gain.linearRampToValueAtTime(0.35*D,S+0.005),E.gain.setTargetAtTime(0,S+0.005,Un(v.midi)*T.decay)}return E.gain.setTargetAtTime(0,Math.max(S+0.006,C),R/4),P.connect(E),P.start(S),P.stop(Math.max(S+0.006,C)+R),P}),y=()=>g.disconnect(),x=!1,A,F=()=>{if(x||!c)return;let v=Number.isFinite(d.outputLatency)?d.outputLatency:0;A=e.setTimeout(()=>{if(!x)c()},Math.max(0,f-d.currentTime+v)*1000)};if(c)Promise.resolve(h).then(F,F);let k=e.setTimeout(()=>m?.(),(On(l)+0.15)*1000),M=l.reduce((v,N)=>Math.max(v,N.time+N.duration+lt(i,N.duration)),0),w=e.setTimeout(y,(M+0.15)*1000);return{stop(){if(x)return;x=!0,e.clearTimeout(k),e.clearTimeout(A),e.clearTimeout(w);let v=d.currentTime;g.gain.setTargetAtTime(0,v,0.01);for(let N of b)try{N.stop(v+0.05)}catch{}w=e.setTimeout(y,80)},setVolume(v){if(x||!Number.isFinite(v))return;g.gain.setTargetAtTime(Math.min(1,Math.max(0,v)),d.currentTime,0.015)}}}}}var In=()=>{let e=window.musicNotationOptions;if(!e||typeof e!=="object"||!("play"in e))return;let n=e.play;if(!n||typeof n!=="object"||!("volume"in n))return;let t=n.volume;return typeof t==="number"&&Number.isFinite(t)?t:void 0},he,ct=()=>{if(he)return he;let e=window.musicNotationOptions;if(!e||typeof e!=="object"||!("play"in e))return;let n=e.play;if(!n||typeof n!=="object"||!("tempoUnit"in n))return;let t=n.tempoUnit;return t==="bpm"||t==="percent"?t:void 0},Gn="pre > code.language-tab, pre > code.language-score",W=new Map,dt=et();function ut(e){for(let[t,{result:r,holder:o}]of W)if(!t.isConnected||!r.el.isConnected){if(r.destroy(),o.remove(),W.delete(t),t.isConnected)t.style.removeProperty("display")}let n=[...e.querySelectorAll(Gn)].filter((t)=>{let r=t.parentElement,o=W.get(r);if(!o)return r.dataset.mpRendered!=="pending";if(o.source===(t.textContent??""))return!1;return o.result.destroy(),o.holder.remove(),W.delete(r),!0});if(!n.length)return;for(let t of n)t.parentElement.dataset.mpRendered="pending";dt(e).then((t)=>{let r=_(),o=qe(window.musicNotationOptions),s={scriptFile:null,font:r.font,soundFont:r.soundFont,...o?{instruments:o}:{}},a=e.defaultView;a.musicNotationSoundfontPlayer??=de(t,s,e,mt(a));for(let l of n){let i=l.parentElement;if(!i.parentElement)continue;let u=l.classList.contains("language-score")?"score":"tab",m=l.textContent??"",c=e.createElement("div");c.className="mn-tab-holder",i.insertAdjacentElement("afterend",c);let d=ue(u,m,c,{alphaTab:t,assets:s,volume:()=>In()??ie,fullScreen:Be(window.musicNotationOptions),...ct()?{tempoUnit:ct()}:{},onTempoUnit:(h)=>he=h});W.set(i,{result:d,source:m,holder:c}),d.ready.then(({ok:h})=>{if(i.dataset.mpRendered=h?"done":"error",h&&d.el.isConnected)i.style.display="none"})}}).catch(()=>{for(let t of n)t.parentElement.dataset.mpRendered="error"})}if(!window.musicNotationTabLoaded){window.musicNotationTabLoaded=!0,window.MusicNotationTab={renderTab:ue,createSoundfontPlayer:de,loadAlphaTab:()=>dt(document),alphaTabCdn:_};let e=()=>{rt(document),ut(document);let n=!1;new MutationObserver(()=>{if(n)return;n=!0,requestAnimationFrame(()=>{n=!1,ut(document)})}).observe(document.body,{childList:!0,subtree:!0,characterData:!0})};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",e);else e()}})();
1386
+
1387
+ /* Follow the music (#97): paused while the reader scrolls by hand, the button stays on but dim. */
1388
+ .mn-play button.mn-tab-follow.mn-follow-paused {
1389
+ opacity: 0.55;
1390
+ }
1391
+
1392
+ /* A tab or a score on one line (\`layout: line\`, #97): it scrolls sideways in its own area, by
1393
+ hand and with the music. The page never moves. */
1394
+ .mn-tab.mn-tab-line .mn-tab-surface {
1395
+ overflow-x: auto;
1396
+ overflow-y: hidden;
1397
+ overscroll-behavior-x: contain;
1398
+ }
1399
+ `;var Uo=qt,Wt="music-notation-styles";function Kt(e){if(e.getElementById(Wt))return;let t=e.createElement("style");t.id=Wt,t.textContent=Uo,e.head.appendChild(t)}var jo=(e)=>e.reduce((t,n)=>Math.max(t,n.time+n.duration),0),Ue=(e)=>440*Math.pow(2,(e-69)/12);function Io(e,t,n,o=Math.random,r={}){let a=new Float32Array(Math.round(t*n)),s=Math.max(2,Math.round(t/Ue(e))),l=new Float32Array(s);for(let b=0;b<s;b++)l[b]=o()*2-1;let c=Math.min(1,Math.max(0,r.brightness??1));if(c<1){let b=0.2+0.8*c,p=l[s-1];for(let h=0;h<s;h++)l[h]=p+=b*(l[h]-p)}let u=Math.min(0.5,Math.max(0,r.pick??0)),i=Math.round(u*s);if(i>0){let b=Float32Array.from(l);for(let p=0;p<s;p++)l[p]=b[p]-b[(p-i+s)%s]}if(c<1||i>0){let b=l.reduce((h,k)=>h+k,0)/s,p=l.reduce((h,k)=>Math.max(h,Math.abs(k-b)),0)||1;for(let h=0;h<s;h++)l[h]=(l[h]-b)/p}let d=r.damping!==void 0&&Number.isFinite(r.damping)?r.damping:1,m=(0.004-Math.min(0.0035,0.00004*(90-e)))*d,g=1-Math.min(0.02,Math.max(0.0001,m)),f=0;for(let b=0;b<a.length;b++){let p=(f+1)%s,h=l[f];l[f]=g*0.5*(h+l[p]),a[b]=h*0.5,f=p}return a}var _t=0.07,Yt=0.03,$o=(e)=>e>=88?2800:e>=84?2100:1400;function Ho(e,t,n,o,r,a){let s=o+n.time,l=n.velocity===void 0||!Number.isFinite(n.velocity)?1:Math.min(127,Math.max(0,n.velocity))/100,c=e.createGain();c.connect(t);let u,i;if(n.kind==="click"){let d=e.createOscillator();d.type="triangle",d.frequency.value=$o(n.midi),u=d,i=Yt,c.gain.setValueAtTime(0,s),c.gain.linearRampToValueAtTime(0.5*l||0.0001,s+0.001),c.gain.exponentialRampToValueAtTime(0.0001,s+Yt)}else{let d=e.createBiquadFilter();if(d.type="lowpass",d.frequency.value=r==="guitar"?1800:2500,d.connect(c),r==="guitar"){let m=e.createBufferSource();m.buffer=a(e,n.midi),u=m}else{let m=e.createOscillator();m.type="triangle",m.frequency.value=Ue(n.midi),u=m}i=_t,c.gain.setValueAtTime(1.2*l||0.0001,s),c.gain.exponentialRampToValueAtTime(0.0001,s+_t),u.connect(d)}if(n.kind==="click")u.connect(c);return u.start(s),u.stop(s+i+0.02),u}var Xt=new WeakMap;function Vo(e){let t=Xt.get(e);if(t)return t;let n=e.AudioContext;if(!n)return null;let o=new n;return Xt.set(e,o),o}var qo=4,Zt=[0,1,0.5,0.3,0.15,0.08,0.04],Be=4,Wo={guitar:0.15,piano:0.3},Jt=(e,t)=>Math.min(Wo[e],Math.max(0.03,t/2)),Ko=(e)=>Math.min(2.5,Math.max(0.35,Math.pow(2,(60-e)/24)));function je(e,t=Math.random){let n=new Map,o=new WeakMap,r=(l,c)=>l+(c-l)*t(),a=(l,c,u)=>{let i=c*Be+u,d=n.get(i);if(!d){let m=Io(c,l.sampleRate,qo,t,{brightness:r(0.55,0.95),pick:r(0.08,0.2),damping:r(0.85,1.15)});d=l.createBuffer(1,m.length,l.sampleRate),d.getChannelData(0).set(m),n.set(i,d)}return d},s=(l)=>{let c=o.get(l);if(!c){let u=new Float32Array(Zt.length);c=l.createPeriodicWave(u,Float32Array.from(Zt)),o.set(l,c)}return c};return{reportsStart:!0,play(l,{sound:c,volume:u,onEnd:i,onStart:d}){let m=Vo(e);if(!m||!l.length)return{stop(){}};let g=m.resume(),f=l.map(()=>({pluck:Math.min(Be-1,Math.floor(t()*Be)),cents:r(-4,4),level:r(0.93,1.07),decay:r(0.9,1.1)}));if(c==="guitar")l.forEach((y,v)=>{if(y.kind==="muted")a(m,y.midi,0);else if(!y.kind)a(m,y.midi,f[v].pluck)});let b=m.createGain();b.gain.value=Number.isFinite(u)?Math.min(1,Math.max(0,u)):0.8,b.connect(m.destination);let p=m.currentTime+0.05,h=l.map((y,v)=>{if(y.kind)return Ho(m,b,y,p,c,(C,N)=>a(C,N,0));let O=f[v],P=p+y.time,G=P+y.duration,B=Jt(c,y.duration),E=m.createGain();E.connect(b);let _=(y.velocity===void 0||!Number.isFinite(y.velocity)?1:Math.min(127,Math.max(0,y.velocity))/100)*O.level,M;if(c==="guitar"){let C=m.createBufferSource();C.buffer=a(m,y.midi,O.pluck),C.playbackRate.value=Math.pow(2,O.cents/1200),M=C,E.gain.setValueAtTime(_,P),E.gain.setValueAtTime(_,G)}else{let C=m.createOscillator();C.setPeriodicWave(s(m)),C.frequency.value=Ue(y.midi),C.detune.value=O.cents,M=C,E.gain.setValueAtTime(0,P),E.gain.linearRampToValueAtTime(0.35*_,P+0.005),E.gain.setTargetAtTime(0,P+0.005,Ko(y.midi)*O.decay)}return E.gain.setTargetAtTime(0,Math.max(P+0.006,G),B/4),M.connect(E),M.start(P),M.stop(Math.max(P+0.006,G)+B),M}),k=()=>b.disconnect(),w=!1,T,S=()=>{if(w||!d)return;let y=Number.isFinite(m.outputLatency)?m.outputLatency:0;T=e.setTimeout(()=>{if(!w)d()},Math.max(0,p-m.currentTime+y)*1000)};if(d)Promise.resolve(g).then(S,S);let L=e.setTimeout(()=>i?.(),(jo(l)+0.15)*1000),x=l.reduce((y,v)=>Math.max(y,v.time+v.duration+Jt(c,v.duration)),0),R=e.setTimeout(k,(x+0.15)*1000);return{stop(){if(w)return;w=!0,e.clearTimeout(L),e.clearTimeout(T),e.clearTimeout(R);let y=m.currentTime;b.gain.setTargetAtTime(0,y,0.01);for(let v of h)try{v.stop(y+0.05)}catch{}R=e.setTimeout(k,80)},setVolume(y){if(w||!Number.isFinite(y))return;b.gain.setTargetAtTime(Math.min(1,Math.max(0,y)),m.currentTime,0.015)}}}}}var _o=()=>{let e=window.musicNotationOptions;if(!e||typeof e!=="object"||!("play"in e))return;let t=e.play;if(!t||typeof t!=="object"||!("volume"in t))return;let n=t.volume;return typeof n==="number"&&Number.isFinite(n)?n:void 0},Ie,Qt=()=>{if(Ie)return Ie;let e=window.musicNotationOptions;if(!e||typeof e!=="object"||!("play"in e))return;let t=e.play;if(!t||typeof t!=="object"||!("tempoUnit"in t))return;let n=t.tempoUnit;return n==="bpm"||n==="percent"?n:void 0},Yo="pre > code.language-tab, pre > code.language-score",ce=new Map,tn=Ht();function en(e){for(let[n,{result:o,holder:r}]of ce)if(!n.isConnected||!o.el.isConnected){if(o.destroy(),r.remove(),ce.delete(n),n.isConnected)n.style.removeProperty("display")}let t=[...e.querySelectorAll(Yo)].filter((n)=>{let o=n.parentElement,r=ce.get(o);if(!r)return o.dataset.mpRendered!=="pending";if(r.source===(n.textContent??""))return!1;return r.result.destroy(),r.holder.remove(),ce.delete(o),!0});if(!t.length)return;for(let n of t)n.parentElement.dataset.mpRendered="pending";tn(e).then((n)=>{let o=le(),r=Rt(window.musicNotationOptions),a={scriptFile:null,font:o.font,soundFont:o.soundFont,...r?{instruments:r}:{}},s=e.defaultView;s.musicNotationSoundfontPlayer??=we(n,a,e,je(s)),s.musicNotationSonivoxPlayer??=r?we(n,{scriptFile:null,font:o.font,soundFont:o.soundFont},e,je(s)):s.musicNotationSoundfontPlayer;let l=yt(window.musicNotationOptions),c=window.musicNotationOptions??{},u=me(c.naming),i=c.tab,d=typeof i==="object"&&i!==null&&i.names===!0;for(let m of t){let g=m.parentElement;if(!g.parentElement)continue;let f=m.classList.contains("language-score")?"score":"tab",b=m.textContent??"",p=e.createElement("div");p.className="mn-tab-holder",g.insertAdjacentElement("afterend",p);let h=Ge(f,b,p,{alphaTab:n,assets:a,volume:()=>_o()??Fe,language:Vt(window.musicNotationOptions,e),...l?{engine:l}:{},...u?{naming:u}:{},...d?{names:d}:{},fullScreen:St(window.musicNotationOptions),...Qt()?{tempoUnit:Qt()}:{},onTempoUnit:(k)=>Ie=k});ce.set(g,{result:h,source:b,holder:p}),h.ready.then(({ok:k})=>{if(g.dataset.mpRendered=k?"done":"error",k&&h.el.isConnected)g.style.display="none"})}}).catch(()=>{for(let n of t)n.parentElement.dataset.mpRendered="error"})}if(!window.musicNotationTabLoaded){window.musicNotationTabLoaded=!0,window.MusicNotationTab={renderTab:Ge,createSoundfontPlayer:we,loadAlphaTab:()=>tn(document),alphaTabCdn:le};let e=()=>{Kt(document),en(document);let t=!1;new MutationObserver(()=>{if(t)return;t=!0,requestAnimationFrame(()=>{t=!1,en(document)})}).observe(document.body,{childList:!0,subtree:!0,characterData:!0})};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",e);else e()}})();
@@ -1,10 +1,3 @@
1
- /**
2
- * Fingerpicking patterns (#51, fence `picking`): `key: value` lines and pattern lines of one
3
- * token a slot, PIMA letters (p the thumb on the bass, p' the thumb on the alternate bass, i m a
4
- * the fingers on strings 3 2 1) or string numbers (1 the highest), `+` or glued letters for notes
5
- * picked together (a pinch: `p+a`, `pa`), `-` `.` `_` rests, `|` bar lines. Named patterns:
6
- * Travis, alternate bass, 1-2-3-4 (an arpeggio).
7
- */
8
1
  import { type Subdivision } from '../strum/pattern.js';
9
2
  /** The thumb on the bass or the alternate bass, a finger, or a string by number. */
10
3
  export type Pluck = {
@@ -14,6 +14,10 @@ export declare const ICONS: {
14
14
  readonly copy: "M2.5 3.5h11v9h-11zM2.5 11l3.5-3.5 3 3 2-2 2.5 2.5M10.5 6.5h.01";
15
15
  /** Four corners pointing out: full screen (#113); pointing in: leave it. */
16
16
  readonly full: "M2.5 6V2.5H6M10 2.5h3.5V6M13.5 10v3.5H10M6 13.5H2.5V10";
17
+ /** The letter A: note names on a tab or a score (#112). */
18
+ readonly names: "M3.5 13.5 8 2.5l4.5 11M5.3 9.5h5.4";
19
+ /** A target: the score follows the music (#97). */
20
+ readonly follow: "M8 5a3 3 0 1 0 0 6a3 3 0 0 0 0-6M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2";
17
21
  readonly exit: "M6 2.5V6H2.5M13.5 6H10V2.5M10 13.5V10h3.5M2.5 10H6v3.5";
18
22
  };
19
23
  export type IconName = keyof typeof ICONS;