Adding more effects
This commit is contained in:
36
src/lib/audio/processors/registry.ts
Normal file
36
src/lib/audio/processors/registry.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import type { AudioProcessor } from './AudioProcessor';
|
||||
import { SegmentShuffler } from './SegmentShuffler';
|
||||
import { Reverser } from './Reverser';
|
||||
import { StereoSwap } from './StereoSwap';
|
||||
import { PanShuffler } from './PanShuffler';
|
||||
import { Tremolo } from './Tremolo';
|
||||
import { Chorus } from './Chorus';
|
||||
import { PitchWobble } from './PitchWobble';
|
||||
import { PitchShifter } from './PitchShifter';
|
||||
import { MicroPitch } from './MicroPitch';
|
||||
import { SpectralBlur } from './SpectralBlur';
|
||||
import { SpectralShift } from './SpectralShift';
|
||||
import { ConvolutionReverb } from './ConvolutionReverb';
|
||||
|
||||
const processors: AudioProcessor[] = [
|
||||
new SegmentShuffler(),
|
||||
new Reverser(),
|
||||
new StereoSwap(),
|
||||
new PanShuffler(),
|
||||
new Tremolo(),
|
||||
new Chorus(),
|
||||
new PitchWobble(),
|
||||
new PitchShifter(),
|
||||
new MicroPitch(),
|
||||
new SpectralBlur(),
|
||||
new SpectralShift(),
|
||||
new ConvolutionReverb(),
|
||||
];
|
||||
|
||||
export function getRandomProcessor(): AudioProcessor {
|
||||
return processors[Math.floor(Math.random() * processors.length)];
|
||||
}
|
||||
|
||||
export function getAllProcessors(): AudioProcessor[] {
|
||||
return processors;
|
||||
}
|
||||
Reference in New Issue
Block a user