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

Function fetchSoundFont

packages/playground/src/components/AudioExporter.ts:25–31  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

23}
24
25async function fetchSoundFont(url: string): Promise<Uint8Array> {
26 const res = await fetch(url);
27 if (!res.ok) {
28 throw new Error(`Failed to load soundfont '${url}': ${res.status} ${res.statusText}`);
29 }
30 return new Uint8Array(await res.arrayBuffer());
31}
32
33export async function exportAudio(api: alphaTab.AlphaTabApi, trackItems: readonly TrackItem[] = []): Promise<void> {
34 if (!api.score) {

Callers 1

exportAudioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected