MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / exportGp7

Function exportGp7

packages/playground/src/components/AudioExporter.ts:15–23  ·  view source on GitHub ↗
(api: alphaTab.AlphaTabApi)

Source from the content-addressed store, hash-verified

13}
14
15export 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
25async function fetchSoundFont(url: string): Promise<Uint8Array> {
26 const res = await fetch(url);

Callers 1

constructorMethod · 0.90

Calls 1

downloadBlobFunction · 0.85

Tested by

no test coverage detected