mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
fixed
This commit is contained in:
parent
b15843f3a7
commit
38876e135b
@ -1632,11 +1632,14 @@ export const getControlName = (alias) => {
|
||||
* Sets properties in a batch.
|
||||
*
|
||||
* @name as
|
||||
* @param {Array} mapping the control names that are set
|
||||
* @param {String | Array} mapping the control names that are set
|
||||
* @example
|
||||
* "c:.5 a:1 f:.25 e:.8".as("note:clip")
|
||||
* @example
|
||||
* "{0@2 0.25 0 0.5 .3 .5}%8".as("begin").s("sax_vib").clip(1)
|
||||
*/
|
||||
export const as = register('as', (mapping, pat) => {
|
||||
mapping = Array.isArray(mapping) ? mapping : [mapping]
|
||||
return pat.fmap((v) => {
|
||||
v = Array.isArray(v) ? v : [v];
|
||||
v = Object.fromEntries(mapping.map((prop, i) => [getControlName(prop), v[i]]));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user