Testing out approach to allow list patterns in partials

This commit is contained in:
Aria 2025-11-16 19:20:42 -06:00
parent b66c0d18b3
commit cc10122b71
3 changed files with 101 additions and 35 deletions

View file

@ -2583,31 +2583,3 @@ export const scrub = register(
},
false,
);
/**
* Scale the magnitude of the harmonics of one of the core synths ('sine', 'tri', 'saw', ..)
*
* Can also be used to create a new synth via `s('user').partials(...)`
*
* @name partials
* @param {number[] | Pattern} partials List of [0, 1] magnitudes for partials. 0th entry is the first harmonic (i.e. DC offset is skipped)
* @example
* s("user").seg(16).n(irand(8)).scale("A:major")
* .partials([1, 0, 1, 0, 0, 1])
* @example
* s("saw").seg(8).n(irand(12)).scale("G#:minor")
* .partials(binaryL(256))
*/
export const { partials } = registerControl('partials');
/**
* Rotates the harmonics of one of the core synths ('sine', 'tri', 'saw', 'user', ..) by a list of phases
*
* @name phases
* @param {number[] | Pattern} phases List of [0, 1) phases for partials. 0th entry is the first phase (i.e. DC offset is skipped)
* @example
* s("saw").seg(8).n(irand(12)).scale("G#:minor")
* .partials(binaryL(256))
* .phases(randL(20))
*/
export const { phases } = registerControl('phases');