u-he-preset-randomizer
Version:
Create random u-he synth presets through randomization and merging of your existing presets.
43 lines (42 loc) • 1.59 kB
TypeScript
export interface Preset {
/** Relative filePath to preset folder */
filePath: string;
/** Preset file name, without file extension or sub-folders */
presetName: string;
categories: string[];
meta: PresetMetaEntry[];
params: PresetParam[];
binary?: string;
}
export interface PresetMetaEntry {
key: string;
value: string | string[];
}
export interface PresetParam {
id: string;
key: string;
section: string;
value: string | number;
index: number;
type: "string" | "float" | "integer";
}
/**
* Parses a u-he preset file and returns a Preset object.
*
* @param fileString - The content of the preset file as a string.
* @param filePath - The path to the preset file.
* @param binary - A boolean indicating whether to include the binary section of the preset file.
* @returns The parsed Preset object.
*/
export declare function parseUhePreset(fileString: string, filePath: string, binary: boolean): Preset;
/**
* Retrieves the metadata entries from the given u-he preset file string.
*
* @param fileString - The string representation of the file.
* @returns An array of PresetMetaEntry objects representing the metadata entries.
*/
export declare function getPresetMetadata(fileString: string): PresetMetaEntry[];
export declare function getPresetParams(fileString: string, presetPath: string): PresetParam[];
export declare function getPresetBinarySection(fileString: string): string;
export declare function serializePresetToFile(preset: Preset): string;
export declare function isValidPreset(preset: Preset): boolean;