mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
Cap noise amount to 1
This commit is contained in:
parent
bb7b8c2fab
commit
e3333e716f
@ -226,6 +226,7 @@ export function getOscillator({ s, freq, t, vib, vibmod, partials, noise }) {
|
||||
|
||||
if (noise > 0) {
|
||||
// Two gain nodes to set the oscillators to their respective levels
|
||||
noise = noise > 1 ? 1 : noise;
|
||||
let o_gain = ac.createGain();
|
||||
let n_gain = ac.createGain();
|
||||
o_gain.gain.setValueAtTime(1 - noise, ac.currentTime);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user