Quite a big update

This commit is contained in:
2025-10-13 17:35:47 +02:00
parent fb92c3ae2a
commit b700c68b4d
12 changed files with 1366 additions and 5 deletions

View File

@ -0,0 +1,27 @@
import type { AudioProcessor } from './AudioProcessor';
export class ExpFadeOut implements AudioProcessor {
getName(): string {
return 'Fade Out (Exp)';
}
getDescription(): string {
return 'Applies an exponential fade from current level to silence';
}
process(leftIn: Float32Array, rightIn: Float32Array): [Float32Array, Float32Array] {
const length = leftIn.length;
const leftOut = new Float32Array(length);
const rightOut = new Float32Array(length);
for (let i = 0; i < length; i++) {
const t = i / length;
const gain = Math.exp(-5.0 * t);
leftOut[i] = leftIn[i] * gain;
rightOut[i] = rightIn[i] * gain;
}
return [leftOut, rightOut];
}
}