Options
All
  • Public
  • Public/Protected
  • All
Menu

Module main

Index

References

Namespaces

Classes

Interfaces

Type aliases

Variables

Functions

References

Renames and re-exports XSound

Type aliases

AnalyserParams: { fftSize?: FFTSize; frequencyBinCount?: number; maxDecibels?: number; minDecibels?: number; smoothingTimeConstant?: number }

Type declaration

  • Optional fftSize?: FFTSize
  • Optional Readonly frequencyBinCount?: number
  • Optional maxDecibels?: number
  • Optional minDecibels?: number
  • Optional smoothingTimeConstant?: number
AudioBufferSprite: {}

Type declaration

  • [spriteName: string]: AudioBuffer
AudioModuleParams: SoundModuleParams & { currentTime?: number; detune?: number; duration?: number; loop?: boolean; numberOfChannels?: number; playbackRate?: number; sampleRate?: number; vocalcanceler: VocalCancelerParams }
AutopannerParams: { depth?: number; rate?: number; state?: boolean }

Type declaration

  • Optional depth?: number
  • Optional rate?: number
  • Optional state?: boolean
CabinetParams: { state?: boolean }

Type declaration

  • Optional state?: boolean
ChorusParams: { depth?: number; feedback?: number; mix?: number; rate?: number; state?: boolean; time?: number; tone?: number }

Type declaration

  • Optional depth?: number
  • Optional feedback?: number
  • Optional mix?: number
  • Optional rate?: number
  • Optional state?: boolean
  • Optional time?: number
  • Optional tone?: number
Color: string
CompressorParams: { attack?: number; knee?: number; ratio?: number; release?: number; state?: boolean; threshold?: number }

Type declaration

  • Optional attack?: number
  • Optional knee?: number
  • Optional ratio?: number
  • Optional release?: number
  • Optional state?: boolean
  • Optional threshold?: number
CurrentTimeStyles: { color?: Color; width?: number }

Type declaration

  • Optional color?: Color
  • Optional width?: number
DataType: "uint" | "float"
DelayParams: { dry?: number; feedback?: number; state?: boolean; time?: number; tone?: number; wet?: number }

Type declaration

  • Optional dry?: number
  • Optional feedback?: number
  • Optional state?: boolean
  • Optional time?: number
  • Optional tone?: number
  • Optional wet?: number
DistortionCurve: Float32Array | null
DistortionParams: { cabinet?: CabinetParams; curve?: DistortionType; post?: PostEqualizerParams; pre?: PreEqualizerParams; samples?: number; state?: boolean }

Type declaration

DistortionType: "clean" | "crunch" | "overdrive" | "distortion" | "fuzz"
Domain: "timeoverview" | "time" | "fft"
DragCallbackFunction: (event: MouseEvent | TouchEvent, startTime: number, endTime: number, mode: DragMode, direction: boolean) => void

Type declaration

    • (event: MouseEvent | TouchEvent, startTime: number, endTime: number, mode: DragMode, direction: boolean): void
    • Parameters

      • event: MouseEvent | TouchEvent
      • startTime: number
      • endTime: number
      • mode: DragMode
      • direction: boolean

      Returns void

DragMode: "update" | "sprite"
EnvelopeGeneratorParams: { attack?: number; decay?: number; release?: number; sustain?: number }

Type declaration

  • Optional attack?: number
  • Optional decay?: number
  • Optional release?: number
  • Optional sustain?: number
EqualizerParams: { bass?: number; middle?: number; presence?: number; state?: boolean; treble?: number }

Type declaration

  • Optional bass?: number
  • Optional middle?: number
  • Optional presence?: number
  • Optional state?: boolean
  • Optional treble?: number
FFTParams: VisualizerParams & { size?: number; textInterval?: number; type?: DataType }
FFTSize: 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768
FileReadType: "arraybuffer" | "dataURL" | "text" | "json"
FileReaderErrorText: "NOT_FOUND_ERR" | "SECURITY_ERR" | "ABORT_ERR" | "NOT_READABLE_ERR" | "ERR" | ""
FilterParams: { Q?: number; attack?: number; decay?: number; frequency?: number; gain?: number; range?: number; release?: number; state?: boolean; sustain?: number; type?: BiquadFilterType }

Type declaration

  • Optional Q?: number
  • Optional attack?: number
  • Optional decay?: number
  • Optional frequency?: number
  • Optional gain?: number
  • Optional range?: number
  • Optional release?: number
  • Optional state?: boolean
  • Optional sustain?: number
  • Optional type?: BiquadFilterType
FlangerParams: { depth?: number; feedback?: number; mix?: number; rate?: number; state?: boolean; time?: number; tone?: number }

Type declaration

  • Optional depth?: number
  • Optional feedback?: number
  • Optional mix?: number
  • Optional rate?: number
  • Optional state?: boolean
  • Optional time?: number
  • Optional tone?: number
Font: { family?: string; size?: string; style?: string; weight?: string }

Type declaration

  • Optional family?: string
  • Optional size?: string
  • Optional style?: string
  • Optional weight?: string
GlideParams: { time?: number; type?: GlideType }

Type declaration

  • Optional time?: number
  • Optional type?: GlideType
GlideType: "linear" | "exponential"
Gradient: { color: string; offset: number }

Type declaration

  • color: string
  • offset: number
Gradients: Gradient[]
GraphicsApi: "canvas" | "svg" | ""
GraphicsStyles: { bottom?: number; cap?: CanvasLineCap; font?: Font; gradients?: Gradients; grid?: Color; join?: CanvasLineJoin; left?: number; right?: number; shape?: Shape; text?: Color; top?: number; wave?: Color; width?: number }

Type declaration

  • Optional bottom?: number
  • Optional cap?: CanvasLineCap
  • Optional font?: Font
  • Optional gradients?: Gradients
  • Optional grid?: Color
  • Optional join?: CanvasLineJoin
  • Optional left?: number
  • Optional right?: number
  • Optional shape?: Shape
  • Optional text?: Color
  • Optional top?: number
  • Optional wave?: Color
  • Optional width?: number
ListenerParams: { fx?: number; fy?: number; fz?: number; ux?: number; uy?: number; uz?: number; x?: number; y?: number; z?: number }

Type declaration

  • Optional fx?: number
  • Optional fy?: number
  • Optional fz?: number
  • Optional ux?: number
  • Optional uy?: number
  • Optional uz?: number
  • Optional x?: number
  • Optional y?: number
  • Optional z?: number
MediaModuleParams: SoundModuleParams & { autoplay?: boolean; controls?: boolean; currentTime?: number; duration?: number; loop?: boolean; muted?: boolean; playbackRate?: number; vocalcanceler: VocalCancelerParams }
MouseEventTypes: "mousedown" | "mousemove" | "mouseup" | "touchstart" | "touchmove" | "touchend"
NoiseGateParams: { level?: number }

Type declaration

  • Optional level?: number
NoiseModuleParams: SoundModuleParams & { type: NoiseType }
NoiseSuppressorParams: { threshold?: number }

Type declaration

  • Optional threshold?: number
NoiseType: "whitenoise" | "pinknoise" | "browniannoise"
NumberOfSessionChannels: 1 | 2
OneshotErrorText: "error" | "timeout" | "decode"
OneshotModuleParams: SoundModuleParams & { transpose?: number }
OneshotSetting: { bufferIndex: number; loop?: boolean; loopEnd?: number; loopStart?: number; playbackRate?: number; volume?: number }

Type declaration

  • bufferIndex: number
  • Optional loop?: boolean
  • Optional loopEnd?: number
  • Optional loopStart?: number
  • Optional playbackRate?: number
  • Optional volume?: number
OneshotSettings: OneshotSetting[]
OscillatorCustomType: { imag: Float32Array; real: Float32Array }

Type declaration

  • imag: Float32Array
  • real: Float32Array
OscillatorModuleParams: SoundModuleParams & { oscillator: { glide: GlideParams; params: OscillatorParams[] } }
OscillatorParams: { fine?: number; octave?: number; state?: boolean; type?: OscillatorType | OscillatorCustomType; volume?: number }

Type declaration

  • Optional fine?: number
  • Optional octave?: number
  • Optional state?: boolean
  • Optional type?: OscillatorType | OscillatorCustomType
  • Optional volume?: number
PannerParams: { coneInnerAngle?: number; coneOuterAngle?: number; coneOuterGain?: number; distanceModel: DistanceModelType; maxDistance?: number; ox?: number; oy?: number; oz?: number; panningModel: PanningModelType; refDistance?: number; rolloffFactor?: number; state?: boolean; x?: number; y?: number; z?: number }

Type declaration

  • Optional coneInnerAngle?: number
  • Optional coneOuterAngle?: number
  • Optional coneOuterGain?: number
  • distanceModel: DistanceModelType
  • Optional maxDistance?: number
  • Optional ox?: number
  • Optional oy?: number
  • Optional oz?: number
  • panningModel: PanningModelType
  • Optional refDistance?: number
  • Optional rolloffFactor?: number
  • Optional state?: boolean
  • Optional x?: number
  • Optional y?: number
  • Optional z?: number
PhaserNumberOfStages: 0 | 2 | 4 | 8 | 12 | 24
PhaserParams: { depth?: number; feedback?: number; frequency?: number; mix?: number; rate?: number; resonance?: number; stage?: PhaserNumberOfStages; state?: boolean }

Type declaration

  • Optional depth?: number
  • Optional feedback?: number
  • Optional frequency?: number
  • Optional mix?: number
  • Optional rate?: number
  • Optional resonance?: number
  • Optional stage?: PhaserNumberOfStages
  • Optional state?: boolean
PitchChar: "C" | "D" | "E" | "F" | "G" | "A" | "B" | "R"
PitchShifterParams: { pitch?: number; state?: boolean }

Type declaration

  • Optional pitch?: number
  • Optional state?: boolean
Position3D: { x: number; y: number; z: number }

Type declaration

  • x: number
  • y: number
  • z: number
PostEqualizerParams: { bass?: number; curve?: DistortionCurve; frequency?: number; middle?: number; state?: boolean; treble?: number }

Type declaration

  • Optional bass?: number
  • Optional curve?: DistortionCurve
  • Optional frequency?: number
  • Optional middle?: number
  • Optional state?: boolean
  • Optional treble?: number
PreEqualizerParams: { curve?: DistortionCurve; gain?: number; lead?: number; state?: boolean }

Type declaration

  • Optional curve?: DistortionCurve
  • Optional gain?: number
  • Optional lead?: number
  • Optional state?: boolean
QuantizationBit: 8 | 16
RecordType: 1 | 2
RecorderParams: { 0?: number; 1?: number }

Type declaration

  • Optional 0?: number
  • Optional 1?: number
ReverbErrorText: "error" | "timeout" | "decode"
ReverbParams: { buffer?: number | AudioBuffer | null; dry?: number; state?: boolean; tone?: number; wet?: number }

Type declaration

  • Optional buffer?: number | AudioBuffer | null
  • Optional dry?: number
  • Optional state?: boolean
  • Optional tone?: number
  • Optional wet?: number
RingmodulatorParams: { depth?: number; rate?: number; state?: boolean }

Type declaration

  • Optional depth?: number
  • Optional rate?: number
  • Optional state?: boolean
RoomMap: {}

Type declaration

  • [id: string]: WebSocket | null
SessionParams: { host: string; path: string; port: number; tls: boolean; closeCallback?: any; errorCallback?: any; openCallback?: any }
property

{boolean} tls This argument is in order to select protocol (either wss or ws).

property

{string} host This argument is server's hostname.

property

{number} port This argument is port number for connection.

property

{string} path This argument is script path that is executed in server side.

property

{function} openCallback This argument is invoked as onopen event handler in instance of WebSocket.

property

{function} closeCallback This argument is invoked as onclose event handler in instance of WebSocket.

property

{function} errorCallback This argument is invoked as onerror event handler in instance of WebSocket.

Type declaration

Shape: "line" | "rect"
SoundModuleParams: { autopanner: AutopannerParams; chorus: ChorusParams; compressor: CompressorParams; delay: DelayParams; distortion: DistortionParams; envelopegenerator: EnvelopeGeneratorParams; equalizer: EqualizerParams; filter: FilterParams; flanger: FlangerParams; listener: ListenerParams; mastervolume: number; panner: PannerParams; phaser: PhaserParams; pitchshifter: PitchShifterParams; reverb: ReverbParams; ringmodulator: RingmodulatorParams; stereo: StereoParams; tremolo: TremoloParams; wah: WahParams }

Type declaration

SourceName: "oscillator" | "oneshot" | "noise" | "audio" | "media" | "stream" | "processor" | "mixer" | "midi" | "mml"
StereoParams: { state?: boolean; time?: number }

Type declaration

  • Optional state?: boolean
  • Optional time?: number
StreamModuleParams: SoundModuleParams & { noisegate: NoiseGateParams; noisesuppressor: NoiseSuppressorParams; output?: boolean; track?: boolean }
TimeOverviewParams: VisualizerParams & { currentTime?: CurrentTimeStyles; mode?: DragMode; plotInterval?: number; sprite?: Color; textInterval?: number }
TimeParams: VisualizerParams & { textInterval?: number; type?: DataType }
TokenType: "TEMPO" | "OCTAVE" | "NOTE" | "REST" | "NUMBER" | "TIE" | "SPACE" | "EOS" | "UNKNOWN"
TremoloParams: { depth?: number; rate?: number; state?: boolean; type?: OscillatorType }

Type declaration

  • Optional depth?: number
  • Optional rate?: number
  • Optional state?: boolean
  • Optional type?: OscillatorType
VisualizerParams: { interval?: number; styles?: GraphicsStyles }

Type declaration

VocalCancelerParams: { depth?: number }

Type declaration

  • Optional depth?: number
WahParams: { auto?: boolean; cutoff?: number; depth?: number; rate?: number; resonance?: number; state?: boolean }

Type declaration

  • Optional auto?: boolean
  • Optional cutoff?: number
  • Optional depth?: number
  • Optional rate?: number
  • Optional resonance?: number
  • Optional state?: boolean
WaveExportType: "base64" | "dataURL" | "blob" | "objectURL"

Variables

TokenMap: Map<undefined | string, TokenType> = ...

MML characters are corresponds to tokens by this map. Namely, this map is definitions of MML Tokens.

Functions

Generated using TypeDoc