UNPKG

leref.ts

Version:

Something upcoming for aoi.js and npm packages uses

148 lines (147 loc) 5.01 kB
import { ChannelMix, Distortion, Equalizer, Filters, Karaoke, LowPass, Rotation, TimeScale, Tremolo, Vibrato } from "./filters"; /** Filters builder utility */ export declare class FilterUtils { volume?: number; equalizers: EqualizerUtils; karaoke: KaraokeUtils; timescale: TimescaleUtils; tremolo: TremoloUtils; vibrato: VibratoUtils; rotation: RotationUtils; distortion: DistortionUtils; channelMix: ChannelMixUtils; lowPass: LowPassUtils; constructor(filters: Filters); /** Set the filter volume */ setVolume(volume: number): this; /** Build the filters */ build(): Filters; } /** Equalizer filter builder utility */ export declare class EqualizerUtils { enabled: boolean; readonly equalizers: Map<number, Equalizer>; constructor(equalizers?: Equalizer[]); /** Set a band equalizer, band must be between 0 to 14, gain must be between -0.25 to 1 */ setBand(band: number, gain: number): this; /** Clear the equalizers filter */ clear(): this; /** Build the equalizers */ build(): Equalizer[]; } /** Karaoke filter builder utility */ export declare class KaraokeUtils { enabled: boolean; readonly karaoke: Karaoke; constructor(karaoke?: Karaoke); /** Set the level */ setLevel(level: number): this; /** Set the mono level */ setMonoLevel(monoLevel: number): this; /** Set the filter band */ setFilterBand(filterBand: number): this; /** Set the filter width */ setFilterWidth(filterWidth: number): this; /** Disable the karaoke filter */ disable(): this; /** Build the karaoke filter */ build(): Karaoke; } /** Timescale filter builder utility */ export declare class TimescaleUtils { enabled: boolean; readonly timescale: TimeScale; constructor(timescale?: TimeScale); /** Set the speed, must be more than 0 */ setSpeed(speed: number): this; /** Set the pitch, must be more than 0 */ setPitch(pitch: number): this; /** Set the rate, must be more than 0 */ setRate(rate: number): this; /** Build the timescale filter */ build(): TimeScale; } /** Tremolo filter builder utility */ export declare class TremoloUtils { enabled: boolean; readonly tremolo: Tremolo; constructor(tremolo?: Tremolo); /** Set the frequency, must be more than 0 */ setFrequency(frequency: number): this; /** Set the depth, must be between 0 to 1 */ setDepth(depth: number): this; /** Build the tremolo filter */ build(): Tremolo; } /** Vibrato filter builder utility */ export declare class VibratoUtils { enabled: boolean; readonly vibrato: Vibrato; constructor(vibrato?: Vibrato); /** Set the frequency, must be between 0 and 15 */ setFrequency(frequency: number): this; /** Set the depth, must be between 0 to 1 */ setDepth(depth: number): this; /** Build the vibrato filter */ build(): Vibrato; } /** Rotation filter builder utility */ export declare class RotationUtils { enabled: boolean; readonly rotation: Rotation; constructor(rotation?: Rotation); /** Set the rotation speed */ setRotationSpeed(rotationHz: number): this; /** Build the rotation filter */ build(): Rotation; } /** Distortion filter builder utility */ export declare class DistortionUtils { enabled: boolean; distortion: Distortion; constructor(distortion?: Distortion); /** Set the sin offset */ setSinOffset(sinOffset: number): this; /** Set the sin scale */ setSinScale(sinScale: number): this; /** Set the cos offset */ setCosOffset(cosOffset: number): this; /** Set the cos scale */ setCosScale(cosScale: number): this; /** Set the tan offset */ setTanOffset(tanOffset: number): this; /** Set the tan scale */ setTanScale(tanScale: number): this; /** Set the offset */ setOffset(offset: number): this; /** Set the scale */ setScale(scale: number): this; /** Build the distortion filter */ build(): Distortion; } /** ChannelMix filter builder utility */ export declare class ChannelMixUtils { enabled: boolean; readonly channelMix: ChannelMix; constructor(channelMix?: ChannelMix); /** Set left to left mix, must be between 0 to 1 */ setLeftToLeft(leftToLeft: number): this; /** Set left to right mix, must be between 0 to 1 */ setLeftToRight(leftToRight: number): this; /** Set right to left mix, must be between 0 to 1 */ setRightToLeft(rightToLeft: number): this; /** Set right to right mix, must be between 0 to 1 */ setRightToRight(rightToRight: number): this; /** Build the channel mix filter */ build(): ChannelMix; } /** LowPass filter builder utility */ export declare class LowPassUtils { enabled: boolean; readonly lowPass: LowPass; constructor(lowPass?: LowPass); /** Set the smoothing */ setSmoothing(smoothing: number): this; /** Build the low pass filter */ build(): LowPass; }