mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 04:28:30 +00:00
gain adj
This commit is contained in:
parent
b4af840240
commit
64b99f5a8c
@ -183,7 +183,7 @@ export function registerSynthSounds() {
|
|||||||
end,
|
end,
|
||||||
);
|
);
|
||||||
|
|
||||||
getParamADSR(envGain.gain, attack, decay, sustain, release, 0, 0.3, begin, holdend, 'linear');
|
getParamADSR(envGain.gain, attack, decay, sustain, release, 0, 1, begin, holdend, 'linear');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
node: envGain,
|
node: envGain,
|
||||||
|
|||||||
@ -659,6 +659,7 @@ class PhaseVocoderProcessor extends OLAProcessor {
|
|||||||
|
|
||||||
registerProcessor('phase-vocoder-processor', PhaseVocoderProcessor);
|
registerProcessor('phase-vocoder-processor', PhaseVocoderProcessor);
|
||||||
|
|
||||||
|
// Adapted from https://www.musicdsp.org/en/latest/Effects/221-band-limited-pwm-generator.html
|
||||||
class PulseOscillatorProcessor extends AudioWorkletProcessor {
|
class PulseOscillatorProcessor extends AudioWorkletProcessor {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -720,7 +721,7 @@ class PulseOscillatorProcessor extends AudioWorkletProcessor {
|
|||||||
dphi;
|
dphi;
|
||||||
|
|
||||||
for (let i = 0; i < (output[0].length ?? 0); i++) {
|
for (let i = 0; i < (output[0].length ?? 0); i++) {
|
||||||
const pw = clamp(getParamValue(i, params.pulsewidth), 0.01, 0.99) * _PI * 2;
|
const pw = (1 - clamp(getParamValue(i, params.pulsewidth), 0, 0.99)) * this.pi;
|
||||||
const detune = getParamValue(i, params.detune);
|
const detune = getParamValue(i, params.detune);
|
||||||
const freq = applySemitoneDetuneToFrequency(getParamValue(i, params.frequency), detune / 100);
|
const freq = applySemitoneDetuneToFrequency(getParamValue(i, params.frequency), detune / 100);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user