gain adj
This commit is contained in:
parent
b4af840240
commit
64b99f5a8c
2 changed files with 3 additions and 2 deletions
|
|
@ -183,7 +183,7 @@ export function registerSynthSounds() {
|
|||
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 {
|
||||
node: envGain,
|
||||
|
|
|
|||
|
|
@ -659,6 +659,7 @@ class PhaseVocoderProcessor extends OLAProcessor {
|
|||
|
||||
registerProcessor('phase-vocoder-processor', PhaseVocoderProcessor);
|
||||
|
||||
// Adapted from https://www.musicdsp.org/en/latest/Effects/221-band-limited-pwm-generator.html
|
||||
class PulseOscillatorProcessor extends AudioWorkletProcessor {
|
||||
constructor() {
|
||||
super();
|
||||
|
|
@ -720,7 +721,7 @@ class PulseOscillatorProcessor extends AudioWorkletProcessor {
|
|||
dphi;
|
||||
|
||||
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 freq = applySemitoneDetuneToFrequency(getParamValue(i, params.frequency), detune / 100);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue