Replies: 3 comments 5 replies
-
Yes it would be nice to have better names and to feed the changes back into superdirt via deprecation. Some stray thoughts..
There are It would be nice to have the option to combine them like |
Beta Was this translation helpful? Give feedback.
-
it would be practical if patternified functions could have optional arguments, then delay could have 1-3 arguments with default values like For now, I have now added |
Beta Was this translation helpful? Give feedback.
-
after watching some foxdot performances I realized the following alternative syntax would be quite neat: s("hh").delay(wet=.5, time=.25, feedback="<.5 1>") This could be transpiled to s("hh").delay({wet:.5, time:.25, feedback:"<.5 1>"}) Of course, the object syntax would be valid too, but imo it looks much cleaner without those 2 extra characters + it's faster to type. This makes it much easier to reason about which number does what (as opposed to multiple nameless arguments) + having a local namespace allows for shorter properties in general. Also, // lowpass
s("hh").lpf(f=1000,q=10) // s("hh").lpf({f:1000,q:10})
// vs
s("hh").lpf(1000).resonance(10)
// highpass
s("hh").hpf(f=2000,q=10) // s("hh").hpf({f:2000,q:10})
// vs
s("hh").hpf(2000).hresonance(10) This also shows that it's possible to name the same concepts with a same name, like // this maps local namespaces to global keys (only global keys are understood by the outputs
const namespaces = {
lpf: {
f: 'cutoff',
q: 'resonance',
},
hpf: {
f: 'hcutoff',
q: 'hresonance',
}
}
const name = 'lpf';
Pattern.prototype[name] = function(value) {
let pat = this;
if(typeof value === 'object' && !isPattern(value)) {
const entries = Object.entries(value); // [['f', 2000], ['q', 10]]
entries.forEach([k, v] => {
const globalKey = namespaces[name][k]; // cutoff | resonance
pat = pat[globalKey](v); // pat.cutoff(2000) | pat.resonance(10)
});
return pat;
}
/* do the usual thing */
} |
Beta Was this translation helpful? Give feedback.
-
is the reverb terminology set in stone? there is
room
,size
anddry
. imhodry
is a bit generic for reverb (any effect can be dry / wet), also it seems more natural to have the values flipped (0 = dry, 1 = wet). The way delay does it seems more logical:delay
is the wet value + any additional param X is declare withdelayX
(likedelaytime
). for reverb, this would meanroom
= wetness androomsize
= reverb decay. or rename tohall
/reverb
to not confuse tidal users.Beta Was this translation helpful? Give feedback.
All reactions