UNPKG

u-he-preset-randomizer

Version:

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

69 lines 1.72 kB
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; const argv = yargs(hideBin(process.argv)).parse(); export function getDefaultConfig() { return { debug: false }; } let config = getDefaultConfig(); export function getConfigFromParameters() { if (argv['synth']) { config.synth = argv['synth']; } if (argv['debug']) { config.debug = true; } if (argv['amount']) { config.amount = parseInt(argv.amount); } if (argv['preset']) { config.preset = argv.preset; } if (argv['randomness']) { config.randomness = parseInt(argv.randomness); } if (argv['merge']) { config.merge = argv.merge; } if (argv['pattern']) { config.pattern = argv.pattern; } if (argv['binary']) { config.binary = argv.binary; } if (argv['stable']) { config.stable = argv.stable; } if (argv['category']) { config.category = argv.category; } if (argv['author']) { config.author = argv.author; } if (argv['folder']) { config.folder = argv.folder; } if (argv['dictionary']) { config.dictionary = argv.dictionary; } if (argv['favorites']) { config.favorites = argv.favorites; } if (argv['custom-folder']) { config.customFolder = argv['custom-folder']; } return config; } export function getConfig() { return config; } export function setConfig(newConfig) { config = { ...config, ...newConfig, }; } //# sourceMappingURL=config.js.map