u-he-preset-randomizer
Version:
Create random u-he synth presets through randomization and merging of your existing presets.
69 lines (68 loc) • 2.08 kB
TypeScript
/**
* @file Configuration management and CLI argument parsing.
* Handles CLI argument parsing with yargs and provides configuration defaults.
*/
import type { SynthNames } from './utils/detector.js';
export interface Config {
debug: boolean;
synth?: SynthNames;
amount?: number;
preset?: string | string[];
randomness?: number;
merge?: string | string[];
/** Pattern to narrow down presets to load from library */
pattern?: string;
/** Binary part of the preset, if enabled that its read and written back again */
binary?: boolean;
stable?: boolean;
/** Creative mode: use uniform distribution instead of frequency-weighted sampling */
creative?: boolean;
category?: boolean | string;
dictionary?: boolean;
author?: boolean | string;
folder?: boolean | string;
favorites?: boolean | string | string[];
customFolder?: string;
/** Use a weighted random binary template for the binary section */
binaryTemplate?: boolean;
}
export declare function getDefaultConfig(): Config;
export declare function buildCliArgParser(argv?: string[]): import("yargs").Argv<{
synth: string | undefined;
} & {
amount: number | undefined;
} & {
randomness: number | undefined;
} & {
preset: string[] | undefined;
} & {
merge: string[] | undefined;
} & {
pattern: string | undefined;
} & {
binary: boolean | undefined;
} & {
stable: boolean | undefined;
} & {
creative: boolean | undefined;
} & {
category: string | undefined;
} & {
dictionary: boolean | undefined;
} & {
author: string | undefined;
} & {
folder: string | undefined;
} & {
favorites: string[] | undefined;
} & {
"custom-folder": string | undefined;
} & {
"binary-template": boolean | undefined;
} & {
debug: boolean | undefined;
}>;
export declare function getConfigFromParameters(overrides?: Record<string, unknown>): Config;
export declare function getConfig(): Config;
export declare function setConfig(newConfig: Partial<Config>): void;
export declare function resetConfig(): void;