Skip to content

Commit 313464a

Browse files
committed
Always use eq fadeout even if eq itself is not used.
1 parent 8b96a64 commit 313464a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

synth/synth.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6014,10 +6014,14 @@ export class Synth {
60146014
const filterCount = instrumentState.eqFilterCount|0;
60156015
let initialFilterInput1 = +instrumentState.initialEqFilterInput1;
60166016
let initialFilterInput2 = +instrumentState.initialEqFilterInput2;
6017-
const applyFilters = beepbox.Synth.applyFilters;
6017+
const applyFilters = beepbox.Synth.applyFilters;`
6018+
}
6019+
6020+
// The eq filter volume is also used to fade out the instrument state, so always include it.
6021+
effectsSource += `
6022+
60186023
let eqFilterVolume = +instrumentState.eqFilterVolumeStart;
60196024
const eqFilterVolumeDelta = +instrumentState.eqFilterVolumeDelta;`
6020-
}
60216025

60226026
if (usesPanning) {
60236027
effectsSource += `
@@ -6196,11 +6200,14 @@ export class Synth {
61966200
const inputSample = sample;
61976201
sample = applyFilters(inputSample, initialFilterInput1, initialFilterInput2, filterCount, filters);
61986202
initialFilterInput2 = initialFilterInput1;
6199-
initialFilterInput1 = inputSample;
6203+
initialFilterInput1 = inputSample;`
6204+
}
6205+
6206+
// The eq filter volume is also used to fade out the instrument state, so always include it.
6207+
effectsSource += `
62006208
62016209
sample *= eqFilterVolume;
62026210
eqFilterVolume += eqFilterVolumeDelta;`
6203-
}
62046211

62056212
if (usesPanning) {
62066213
effectsSource += `

0 commit comments

Comments
 (0)