mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 13:38:40 +00:00
basic pitch envelope
This commit is contained in:
parent
a7daf41934
commit
bdc2af9733
@ -891,6 +891,13 @@ const generic_params = [
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
['freq'],
|
['freq'],
|
||||||
|
// pitch envelope
|
||||||
|
['pattack', 'patt'],
|
||||||
|
['pdecay', 'pdec'],
|
||||||
|
['psustain', 'psus'],
|
||||||
|
['prelease', 'prel'],
|
||||||
|
['penv'],
|
||||||
|
['panchor'], // TODO
|
||||||
// TODO: https://tidalcycles.org/docs/configuration/MIDIOSC/control-voltage/#gate
|
// TODO: https://tidalcycles.org/docs/configuration/MIDIOSC/control-voltage/#gate
|
||||||
['gate', 'gat'],
|
['gate', 'gat'],
|
||||||
// ['hatgrain'],
|
// ['hatgrain'],
|
||||||
|
|||||||
@ -126,6 +126,12 @@ export function getOscillator(
|
|||||||
fmvelocity: fmVelocity,
|
fmvelocity: fmVelocity,
|
||||||
fmwave: fmWaveform = 'sine',
|
fmwave: fmWaveform = 'sine',
|
||||||
duration,
|
duration,
|
||||||
|
penv,
|
||||||
|
// panchor = 0, // TODO
|
||||||
|
pattack,
|
||||||
|
pdecay,
|
||||||
|
psustain,
|
||||||
|
prelease,
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
let ac = getAudioContext();
|
let ac = getAudioContext();
|
||||||
@ -196,6 +202,12 @@ export function getOscillator(
|
|||||||
vibratoOscillator.start(t);
|
vibratoOscillator.start(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pitch envelope
|
||||||
|
if (penv) {
|
||||||
|
const holdEnd = t + duration;
|
||||||
|
getParamADSR(o.detune, pattack, pdecay, psustain, prelease, 0, penv * 100, t, holdEnd, 'linear');
|
||||||
|
}
|
||||||
|
|
||||||
let noiseMix;
|
let noiseMix;
|
||||||
if (noise) {
|
if (noise) {
|
||||||
noiseMix = getNoiseMix(o, noise, t);
|
noiseMix = getNoiseMix(o, noise, t);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user