# Set

### Set TimeStamp

```lua
exports['mx-surround']:setTimeStamp(source, soundId, timeStamp)
```

**Parameters**

* > **source:** `number`
* > **soundId**: `string`
* > **timeStamp:** `number`

***

### Set Volume

```lua
exports['mx-surround']:setVolumeMax(source, soundId, volume, disableOverWrite)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **volume:** `number`
* > **disableOverWrite?:** `boolean`
  >
  > * If true, volume will not be overwritten by sound profile

***

### Set Type

```lua
exports['mx-surround']:setStereoMode(source, soundId, stereo)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **stereo:** `boolean`
  >
  > * If this is false, it will be spatial (3D)

***

### Set Panner

```lua
exports['mx-surround']:setPanner(source, soundId, panner)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **panner:** `PannerNode`
  >
  > * [See](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode?retiredLocale=tr)

***

### Set Coords

```lua
exports['mx-surround']:setCoords(source, soundId, coords, xSound)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **coords:** `vector3`
* > **xSound?:** `boolean`

***

### Set TimeStamp

```lua
exports['mx-surround']:setTimeStamp(source, soundId, timeStamp)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **coords:** `number`

***

### Set Loop

```lua
exports['mx-surround']:setSoundLoop(source, soundId, loop)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **loop:** `boolean`

***

### Set Max Distance

```lua
exports['mx-surround']:setMaxDistance(source, soundId, maxDistance)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **maxDistance:** `number`

***

### Set Destroy On Finish

```lua
exports['mx-surround']:setDestroyOnFinish(source, soundId, destroyOnFinish)
```

#### Parameters

* > **source:** `number`
* > **soundId:** `string`
* > **destroyOnFinish:** `number`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moxha.dev/documentation/paid-scripts/surround-spatial-audio/api/server/set.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
