register - name
- func
- patternify
Registers a new pattern method. The method is added to the Pattern class + the standalone function is returned from register.
const vlpf = register('vlpf', (freq, pat) => {
return pat.fmap((v) => ({...v, cutoff: freq * (v.velocity ?? 1) }));
})
s("saw").seg(8).velocity(rand).vlpf(800) | parameter | type |
|---|---|
| name |
|
| name of the function, or an array of names to be used as synonyms | |
| func |
|
| function with 1 or more params, where last is the current pattern | |
| patternify |
|
| defaults to true; if set to false, you will have more control over the arguments to `func` as they will be in their raw form and it will be up to you to patternify them and/or query them for values | |