(api: alphaTab.AlphaTabApi)
| 13 | } |
| 14 | |
| 15 | export function exportGp7(api: alphaTab.AlphaTabApi): void { |
| 16 | if (!api.score) { |
| 17 | return; |
| 18 | } |
| 19 | const exporter = new alphaTab.exporter.Gp7Exporter(); |
| 20 | const data = exporter.export(api.score, api.settings); |
| 21 | const filename = api.score.title.length > 0 ? `${api.score.title}.gp` : 'song.gp'; |
| 22 | downloadBlob(new Blob([data as Uint8Array<ArrayBuffer>]), filename); |
| 23 | } |
| 24 | |
| 25 | async function fetchSoundFont(url: string): Promise<Uint8Array> { |
| 26 | const res = await fetch(url); |
no test coverage detected