mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-14 15:18:30 +00:00
remove spillover
This commit is contained in:
parent
8703d684c4
commit
2e6a561184
@ -73,49 +73,6 @@ export function registerControl(names, ...aliases) {
|
||||
*/
|
||||
export const { s, sound } = registerControl(['s', 'n', 'gain'], 'sound');
|
||||
|
||||
/**
|
||||
* generic macro param for a sound synth
|
||||
*
|
||||
* @name z1
|
||||
* @synonyms z
|
||||
* @param {number | Pattern}
|
||||
* @example
|
||||
* n(run(8)).scale("D:pentatonic").s("supersaw").x(".01 .75").release(0.5)
|
||||
*
|
||||
*/
|
||||
export const { z1, z } = registerControl(['z1', 'z2', 'z3', 'z4'], 'z');
|
||||
|
||||
/**
|
||||
* generic macro param for a sound synth
|
||||
*
|
||||
* @name z2
|
||||
* @param {number | Pattern}
|
||||
* @example
|
||||
* n(run(8)).scale("D:pentatonic").s("supersaw").x2("2 .7").release(0.5)
|
||||
*
|
||||
*/
|
||||
export const { z2 } = registerControl('z2');
|
||||
|
||||
/**
|
||||
* generic macro param for a sound synth
|
||||
*
|
||||
* @name z3
|
||||
* @param {number | Pattern}
|
||||
* @example
|
||||
* n(run(8)).scale("D:pentatonic").s("supersaw").x3(".1 .75").release(0.5)
|
||||
*
|
||||
*/
|
||||
export const { z4 } = registerControl('z3');
|
||||
|
||||
/**
|
||||
* generic macro param for a sound synth
|
||||
*
|
||||
* @name x4
|
||||
* @param {number | Pattern}
|
||||
*
|
||||
*/
|
||||
export const { x4 } = registerControl('z4');
|
||||
|
||||
/**
|
||||
* Define a custom webaudio node to use as a sound source.
|
||||
*
|
||||
@ -1656,4 +1613,4 @@ export const ar = register('ar', (t, pat) => {
|
||||
t = !Array.isArray(t) ? [t] : t;
|
||||
const [attack, release = attack] = t;
|
||||
return pat.set({ attack, release });
|
||||
});
|
||||
});
|
||||
@ -73,9 +73,8 @@ export function registerSynthSounds() {
|
||||
'supersaw',
|
||||
(begin, value, onended) => {
|
||||
const ac = getAudioContext();
|
||||
const { z1, z2, z3 } = value;
|
||||
let { duration, n, unison = z2 ?? 5, spread = z3 ?? 0.6, detune } = value;
|
||||
detune = detune ?? n ?? z1 ?? 0.18;
|
||||
let { duration, n, unison = 5, spread = 0.6, detune } = value;
|
||||
detune = detune ?? n ?? 0.18;
|
||||
const frequency = getFrequencyFromValue(value);
|
||||
|
||||
const [attack, decay, sustain, release] = getADSRValues(
|
||||
@ -250,4 +249,4 @@ export function getOscillator(s, t, value) {
|
||||
// envGain?.stop(time);
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user