UNPKG

u-he-preset-randomizer

Version:

Create random u-he synth presets through randomization and merging of your existing presets.

32 lines (31 loc) 1.27 kB
/** * @file Preset library analyzer for statistical parameter analysis. * Analyzes preset libraries to extract parameter distributions and statistics for randomization. */ import type { Config } from './config.js'; import type { PresetLibrary } from './presetLibrary.js'; export type ParamsModel = Record<string, { type: 'string' | 'float' | 'integer'; values: (string | number)[]; distinctValues: (string | number)[]; frequencies?: Record<string, number>; maxValue?: number; minValue?: number; avgValue?: number; keepStable?: 'always' | 'stable-mode'; }>; export type ParamsModelBySection = Record<string, Record<string, { type: 'string' | 'float' | 'integer'; values: (string | number)[]; distinctValues: (string | number)[]; maxValue?: number; minValue?: number; avgValue?: number; }>>; export declare function analyzeParamsTypeAndRange(presetLibrary: PresetLibrary, config?: Config): ParamsModel; /** * Returns a list of names, gathered from the preset library */ export declare function getDictionaryOfNames(presetLibrary: PresetLibrary): string[]; export declare function convertParamsModelBySection(paramsModel: ParamsModel): ParamsModelBySection; export declare function average(arr: number[]): number;