Allow register in autocomplete, add vel as synonym for velocity, fix some controls

This commit is contained in:
Aria 2025-11-24 17:52:00 -06:00
parent cfeff26d42
commit a278f21f1b
2 changed files with 9 additions and 12 deletions

View file

@ -380,12 +380,13 @@ export const { accelerate } = registerControl('accelerate');
* Sets the velocity from 0 to 1. Is multiplied together with gain. * Sets the velocity from 0 to 1. Is multiplied together with gain.
* *
* @name velocity * @name velocity
* @synonyms vel
* @example * @example
* s("hh*8") * s("hh*8")
* .gain(".4!2 1 .4!2 1 .4 1") * .gain(".4!2 1 .4!2 1 .4 1")
* .velocity(".4 1") * .velocity(".4 1")
*/ */
export const { velocity } = registerControl('velocity'); export const { velocity, vel } = registerControl('velocity', 'vel');
/** /**
* Controls the gain by an exponential amount. * Controls the gain by an exponential amount.
* *
@ -1323,14 +1324,13 @@ export const { lpdepth } = registerControl('lpdepth');
* Depth of the LFO for the lowpass filter, in HZ * Depth of the LFO for the lowpass filter, in HZ
* *
* @name lpdepthfrequency * @name lpdepthfrequency
* @synonyms * @synonyms lpdepthfreq
* lpdethfreq
* @param {number | Pattern} depth depth of modulation * @param {number | Pattern} depth depth of modulation
* @example * @example
* note("<c c c# c c c4>*16").s("sawtooth").lpf(600).lpdepthfrequency("<200 500 100 0>") * note("<c c c# c c c4>*16").s("sawtooth").lpf(600).lpdepthfrequency("<200 500 100 0>")
*/ */
export const { lpdepthfrequency } = registerControl('lpdepthfrequency', 'lpdepthfreq'); export const { lpdepthfrequency, lpdepthfreq } = registerControl('lpdepthfrequency', 'lpdepthfreq');
/** /**
* Shape of the LFO for the lowpass filter * Shape of the LFO for the lowpass filter
@ -1384,14 +1384,13 @@ export const { bpdepth } = registerControl('bpdepth');
* Depth of the LFO for the bandpass filter, in HZ * Depth of the LFO for the bandpass filter, in HZ
* *
* @name bpdepthfrequency * @name bpdepthfrequency
* @synonyms * @synonyms bpdepthfreq
* bpdethfreq
* @param {number | Pattern} depth depth of modulation * @param {number | Pattern} depth depth of modulation
* @example * @example
* note("<c c c# c c c4>*16").s("sawtooth").lpf(600).bpdepthfrequency("<200 500 100 0>") * note("<c c c# c c c4>*16").s("sawtooth").lpf(600).bpdepthfrequency("<200 500 100 0>")
*/ */
export const { bpdepthfrequency } = registerControl('bpdepthfrequency', 'bpdepthfreq'); export const { bpdepthfrequency, bpdepthfreq } = registerControl('bpdepthfrequency', 'bpdepthfreq');
/** /**
* Shape of the LFO for the bandpass filter * Shape of the LFO for the bandpass filter
@ -1439,20 +1438,19 @@ export const { hpsync } = registerControl('hpsync');
* @name hpdepth * @name hpdepth
* @param {number | Pattern} depth depth of modulation * @param {number | Pattern} depth depth of modulation
*/ */
export const { hpdepth, hpdepthfreq } = registerControl('hpdepth'); export const { hpdepth } = registerControl('hpdepth');
/** /**
* Depth of the LFO for the hipass filter, in hz * Depth of the LFO for the hipass filter, in hz
* *
* @name hpdepthfrequency * @name hpdepthfrequency
* @synonyms * @synonyms hpdepthfreq
* hpdethfreq
* @param {number | Pattern} depth depth of modulation * @param {number | Pattern} depth depth of modulation
* @example * @example
* note("<c c c# c c c4>*16").s("sawtooth").lpf(600).hpdepthfrequency("<200 500 100 0>") * note("<c c c# c c c4>*16").s("sawtooth").lpf(600).hpdepthfrequency("<200 500 100 0>")
*/ */
export const { hpdepthfrequency } = registerControl('hpdepthfrequency', 'hpdepthfreq'); export const { hpdepthfrequency, hpdepthfreq } = registerControl('hpdepthfrequency', 'hpdepthfreq');
/** /**
* Shape of the LFO for the highpass filter * Shape of the LFO for the highpass filter

View file

@ -1587,7 +1587,6 @@ export const func = curry((a, b) => reify(b).func(a));
* *
* @param {string | string[]} name name of the function, or an array of names to be used as synonyms * @param {string | string[]} name name of the function, or an array of names to be used as synonyms
* @param {function} func function with 1 or more params, where last is the current pattern * @param {function} func function with 1 or more params, where last is the current pattern
* @noAutocomplete
* *
*/ */
export function register(name, func, patternify = true, preserveSteps = false, join = (x) => x.innerJoin()) { export function register(name, func, patternify = true, preserveSteps = false, join = (x) => x.innerJoin()) {