import { type AudioTrackSource, type MidiRealPlayer } from "./player";
export type { AudioTrackSource, MidiRealPlayer, SoundFontSource } from "./player";
export type MountOptions = {
/** MIDI file URL or bytes. */
src: string | ArrayBuffer;
/** Shown in messages and used for the WAV export name. */
fileName?: string;
/**
* SF2/SF3/DLS as a URL or as bytes. Defaults to the bundled GeneralUser GS (SF3)
* next to the script. Pass bytes where the host cannot serve SoundFont files.
*/
soundFont?: string | ArrayBuffer;
soundFontLabel?: string;
/** Folder holding the worklet, SoundFont, sprite and font. Defaults to the script's folder. */
assetBase?: string;
/** "auto" follows prefers-color-scheme. */
theme?: "auto" | "dark" | "light";
/** Pause other players on the page when this one starts. Default true. */
exclusive?: boolean;
/** Fetch the SoundFont at mount instead of on first play. Default false. */
preloadSoundFont?: boolean;
/** localStorage key for remembering mute/solo/volume/view state. Off by default. */
persistKey?: string;
/** Show the Export WAV button (downloads a file). Default true. */
wavExport?: boolean;
/** Show the SoundFont menu so visitors can load their own bank. Default false. */
soundFontMenu?: boolean;
/** Initial view: "arrangement" (tracks, the default) or "piano-roll". */
viewMode?: "piano-roll" | "arrangement";
/** Recordings (mix, stems) that play in step with the MIDI as extra mixer rows. */
audioTracks?: readonly AudioTrackSource[];
};
export declare function setDefaultAssetBase(base: string): void;
/** Render a player into target's shadow root. Call destroy() on the result to remove it. */
export declare function mount(target: HTMLElement, options: MountOptions): MidiRealPlayer;
/**
*
*
* Stems go in child elements, each becoming a mixer row that plays in step with the MIDI:
*
*
*
*
* Emits bubbling "play" and "pause" events; exposes play(), pause(), stop(), seek(), currentTime.
*/
export declare class MidiRealPlayerElement extends HTMLElement {
#private;
static observedAttributes: string[];
get player(): MidiRealPlayer | undefined;
get currentTime(): number;
set currentTime(seconds: number);
get duration(): number;
get playing(): boolean;
play(): Promise;
pause(): void;
stop(): void;
seek(seconds: number): void;
connectedCallback(): void;
disconnectedCallback(): void;
attributeChangedCallback(name: string, oldValue: string | null, value: string | null): void;
}
export declare function defineElement(tagName?: string): void;