export type DeepMindDumpKind = 'program' | 'edit' | 'global' | 'unknown'; export type DeepMindDumpMeta = { kind: DeepMindDumpKind; cmd: string; protocol?: number; bank?: number; program?: number; packedBytes: number; decodedLength: number; }; export declare function trimTrailingZeros(bytes: Uint8Array, maxTrim: number): { trimmed: Uint8Array; trimmedCount: number; }; export declare function unpackPackedMsb(packed: Uint8Array): Uint8Array; export declare function makeDeepMindDumpRequest(opts: { type: 'program' | 'edit' | 'global'; deviceId: number; bank?: number; program?: number; }): Uint8Array; export declare function decodeDeepMindDumpResponse(rawSysex: Uint8Array): { meta: DeepMindDumpMeta; decodedPayload: Uint8Array; }; /** * Inverse of unpackPackedMsb: encode 8-bit bytes into the DeepMind * "Packed MS bit" format (7 data bytes → 8 MIDI bytes per group). */ export declare function packMsb(decoded: Uint8Array): Uint8Array; /** * Build a SysEx message that writes the full edit buffer to the synth. * The synth treats an incoming "Edit Buffer Dump Response" (cmd 0x04) * as a "load this into the edit buffer" command. */ export declare function makeEditBufferDump(opts: { deviceId: number; protocol: number; decodedPayload: Uint8Array; }): Uint8Array; export declare function toBase64(bytes: Uint8Array): string;