# Sandbox.MusicPlayer

Enables music playback. Use this for music, not for playing game sounds.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Properties

- [`Amplitude`](/api/Sandbox.MusicPlayer/Amplitude): Approximate measure of audio loudness.
- [`Channels`](/api/Sandbox.MusicPlayer/Channels): Number of channels of the audio being played.
- [`Distance`](/api/Sandbox.MusicPlayer/Distance)
- [`Duration`](/api/Sandbox.MusicPlayer/Duration): Gets the total duration of the video in seconds.
- [`Falloff`](/api/Sandbox.MusicPlayer/Falloff)
- [`LipSync`](/api/Sandbox.MusicPlayer/LipSync): Enables lipsync processing.
- [`ListenLocal`](/api/Sandbox.MusicPlayer/ListenLocal): Place the listener at 0,0,0 facing 1,0,0.
- [`OnFinished`](/api/Sandbox.MusicPlayer/OnFinished): Invoked when the audio has finished playing.
- [`OnRepeated`](/api/Sandbox.MusicPlayer/OnRepeated): Invoked when the audio has repeated.
- [`Paused`](/api/Sandbox.MusicPlayer/Paused): Pause playback of audio.
- [`PlaybackTime`](/api/Sandbox.MusicPlayer/PlaybackTime): Gets the current playback time in seconds.
- [`Position`](/api/Sandbox.MusicPlayer/Position): Position of the sound.
- [`Repeat`](/api/Sandbox.MusicPlayer/Repeat): Audio will repeat when reaching the end.
- [`SampleRate`](/api/Sandbox.MusicPlayer/SampleRate): Sample rate of the audio being played.
- [`Spectrum`](/api/Sandbox.MusicPlayer/Spectrum): 512 FFT magnitudes used for audio visualization.
- [`TargetMixer`](/api/Sandbox.MusicPlayer/TargetMixer): Which mixer do we want to write to
- [`Title`](/api/Sandbox.MusicPlayer/Title): Get title of the track.
- [`Visemes`](/api/Sandbox.MusicPlayer/Visemes): A list of 15 lipsync viseme weights. Requires [Sandbox.MusicPlayer.LipSync](/api/Sandbox.MusicPlayer/LipSync) to be enabled.
- [`Volume`](/api/Sandbox.MusicPlayer/Volume): Change the volume of this music.

## Methods

- [`Dispose`](/api/Sandbox.MusicPlayer/Dispose)
- [`Play`](/api/Sandbox.MusicPlayer/Play): Plays a music file from a relative path.
- [`PlayUrl`](/api/Sandbox.MusicPlayer/PlayUrl): Plays a music stream from a URL.
- [`Seek`](/api/Sandbox.MusicPlayer/Seek): Sets the playback position to a specified time in the audio, given in seconds.
- [`Stop`](/api/Sandbox.MusicPlayer/Stop): Stops audio playback.
