Merge branch 'main' into daslyfe/gainmod
This commit is contained in:
commit
3ea91adfd6
10 changed files with 125 additions and 37 deletions
|
|
@ -126,7 +126,7 @@ export const getAudioDevices = async () => {
|
|||
return devicesMap;
|
||||
};
|
||||
|
||||
const defaultDefaultValues = {
|
||||
let defaultDefaultValues = {
|
||||
s: 'triangle',
|
||||
gain: 0.8,
|
||||
postgain: 1,
|
||||
|
|
@ -150,6 +150,17 @@ const defaultDefaultValues = {
|
|||
fft: 8,
|
||||
};
|
||||
|
||||
const defaultDefaultDefaultValues = Object.freeze({ ...defaultDefaultValues });
|
||||
|
||||
export function setDefault(control, value) {
|
||||
// const main = getControlName(control); // we cant do this because superdough is independent of strudel/core
|
||||
defaultDefaultValues[control] = value;
|
||||
}
|
||||
|
||||
export function resetDefaults() {
|
||||
defaultDefaultValues = { ...defaultDefaultDefaultValues };
|
||||
}
|
||||
|
||||
let defaultControls = new Map(Object.entries(defaultDefaultValues));
|
||||
|
||||
export function setDefaultValue(key, value) {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,10 @@ export function registerSynthSounds() {
|
|||
const gainAdjustment = 1 / Math.sqrt(voices);
|
||||
getPitchEnvelope(o.parameters.get('detune'), value, begin, holdend);
|
||||
const vibratoOscillator = getVibratoOscillator(o.parameters.get('detune'), value, begin);
|
||||
const fm = applyFM(o.parameters.get('frequency'), value, begin);
|
||||
// const fm = applyFM(o.parameters.get('frequency'), value, begin);
|
||||
// https://codeberg.org/uzu/strudel/issues/1428
|
||||
// if you think about re-enabling this, please test with fm > 1 first
|
||||
// it's like 10x gain, so it's really dangerous
|
||||
let envGain = gainNode(1);
|
||||
envGain = o.connect(envGain);
|
||||
|
||||
|
|
@ -133,7 +136,7 @@ export function registerSynthSounds() {
|
|||
destroyAudioWorkletNode(o);
|
||||
envGain.disconnect();
|
||||
onended();
|
||||
fm?.stop();
|
||||
// fm?.stop();
|
||||
vibratoOscillator?.stop();
|
||||
},
|
||||
begin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue