# setSoundProperties (Client)

> Changes a sound's sample rate, tempo and pitch, and whether it plays backwards.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Sound
- **URL**: https://wiki.mymp.gg/en/setSoundProperties

## Syntax

```lua
bool setSoundProperties(sound sound, float sampleRate, float tempo, float pitch [, bool reversed = false])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `sound` | `sound` | The `sound` element, or a `dui` element for the browser's sound. |
| `sampleRate` | `float` | Sample rate in Hz, between 0.05 and 50 times the file's own. |
| `tempo` | `float` | Tempo change in percent, from -95 to 5000. 0 keeps the tempo. |
| `pitch` | `float` | Pitch change in semitones, from -60 to 60. |
| `reversed` | `bool` | Play the sound backwards. *(default: `false`)* |

## Returns

`true` if the sound was found, `false` otherwise.

## Example

```lua
local music = playSound("sounds/track.mp3")
local rate = getSoundProperties(music)
setSoundProperties(music, rate, 10, -2)
```

### Note

A value outside its range is silently ignored and the previous one stays.

## See also

- [getSoundProperties (Client)](https://wiki.mymp.gg/en/getSoundProperties.md): Returns a sound's sample rate, tempo and pitch, and whether it plays backwards.
- [setSoundSpeed (Shared)](https://wiki.mymp.gg/en/setSoundSpeed.md): Changes a sound's speed. The pitch changes with it. On the server, the change is sent to every client.
