UNPKG

@excaliburjs/plugin-jsfxr

Version:

excalibur-jsfxr provides sound effect generation utilizing a wrapper around jsfxr

53 lines 1.48 kB
type JSFXValueRange = { min: number; max: number; }; type JSFXvalue = number | JSFXValueRange; export type SoundConfig = { oldParams: boolean; wave_type: JSFXvalue; p_env_attack: JSFXvalue; p_env_sustain: JSFXvalue; p_env_punch: JSFXvalue; p_env_decay: JSFXvalue; p_base_freq: JSFXvalue; p_freq_limit: JSFXvalue; p_freq_ramp: JSFXvalue; p_freq_dramp: JSFXvalue; p_vib_strength: JSFXvalue; p_vib_speed: JSFXvalue; p_arp_mod: JSFXvalue; p_arp_speed: JSFXvalue; p_duty: JSFXvalue; p_duty_ramp: JSFXvalue; p_repeat_speed: JSFXvalue; p_pha_offset: JSFXvalue; p_pha_ramp: JSFXvalue; p_lpf_freq: JSFXvalue; p_lpf_ramp: JSFXvalue; p_lpf_resonance: JSFXvalue; p_hpf_freq: JSFXvalue; p_hpf_ramp: JSFXvalue; sound_vol: JSFXvalue; sample_rate: JSFXvalue; sample_size: JSFXvalue; }; export declare class JsfxrResource { sounds: { [key: string]: SoundConfig; }; jsfxrModule: any; jsfxr: any; init(): Promise<void>; loadSoundConfig(name: string, config: SoundConfig): void; rangeValue(min: number, max: number): number; deleteSoundConfig(name: string): void; playConfig(config: SoundConfig): void; resolveValues(config: SoundConfig): Partial<Record<keyof SoundConfig, number>>; playSound(name: string): void; getConfigs(): { [key: string]: SoundConfig; }; } export {}; //# sourceMappingURL=excalibur-jsfxr.d.ts.map