add ad function
This commit is contained in:
parent
d582bbbb60
commit
2ecc6b30aa
1 changed files with 5 additions and 0 deletions
|
|
@ -1394,6 +1394,11 @@ controls.adsr = register('adsr', (adsr, pat) => {
|
||||||
const [attack, decay, sustain, release] = adsr;
|
const [attack, decay, sustain, release] = adsr;
|
||||||
return pat.set({ attack, decay, sustain, release });
|
return pat.set({ attack, decay, sustain, release });
|
||||||
});
|
});
|
||||||
|
controls.ad = register('ad', (t, pat) => {
|
||||||
|
t = !Array.isArray(t) ? [t] : t;
|
||||||
|
const [attack, decay = attack] = t;
|
||||||
|
return pat.attack(attack).decay(decay);
|
||||||
|
});
|
||||||
controls.ds = register('ds', (ds, pat) => {
|
controls.ds = register('ds', (ds, pat) => {
|
||||||
ds = !Array.isArray(ds) ? [ds] : ds;
|
ds = !Array.isArray(ds) ? [ds] : ds;
|
||||||
const [decay, sustain] = ds;
|
const [decay, sustain] = ds;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue