# Guides

## Radio

To add music, we first need to determine the type of music: is it looping, and should it loop? If looping is required, some preparation of the sound file will be necessary.&#x20;

If looping is not required, simply skip the first step, but in our case we have looping.



{% stepper %}
{% step %}
### Preparation

To ensure proper looping, we need to set marks on the sound. There are several ways to do this, but we will focus on using [Wavosaur](https://www.wavosaur.com/). \
\
Open a file and click the **Add Mark** button.

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FkkdMGKHnX1IPcXwwv1D5%2Fimage.png?alt=media&#x26;token=8df1408b-88ad-4a57-8fa2-a7a43fc78571" alt=""><figcaption></figcaption></figure>

Ensure there are only two marks in the file.

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FIT46dsFYcPlDo7aLJ1qt%2F%7B43AE25BE-4F39-4075-93A0-655F84464188%7D.png?alt=media&#x26;token=4c5f5053-0999-4831-9462-acbb9ea43043" alt=""><figcaption></figcaption></figure>

We're done! Just save the file, and remember that the file name should not include spaces or special characters.
{% endstep %}

{% step %}
### Creating event

We can start from basic preset and then modify it. Press Ctrl + F in the soundevents and choose SoundDebug  and rename it.

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FlSbSMELVaIbs3DTmTc7t%2F%7B80D57E34-0852-4AA9-AF48-62508BF27A96%7D.png?alt=media&#x26;token=1fbcc0ca-4f9f-4d01-ad1b-5730662d3976" alt=""><figcaption></figcaption></figure>

Delete the **Position Relative To Player** property

Next, remove the sound from the **Vsnd Files Track 01** property and add your own by dragging and dropping it from the program's explorer.

Now, we need to create a **Distance Volume Mapping Curve**. After creating it, set the values as follows:

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FG7ZxV9U4cgLa6pnldeXX%2F%7B2E1288D3-39B0-4C35-A0C0-D1ECF19110B9%7D.png?alt=media&#x26;token=3525378d-ff85-4694-8938-ff92897bb97a" alt=""><figcaption></figcaption></figure>

The reason for this is to maintain the sound's state regardless of the player's position on the map. If the volume is set to 0, the sound event will be unloaded from memory, causing the playtime state to be lost. To prevent this, set the volume to the lowest possible value, such as 0.01.
{% endstep %}

{% step %}
### Entity setup in Hammer

First of all luanch the map thorugh Run (skip build), that's needs to load custom sound events to the editor.

Next, create a **point\_soundevent** entity and choose our event.

<figure><img src="https://1853659043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOaVzlMa1Hn8OxqfYLKn%2Fuploads%2FC5LzNLV7rJSYzwumiair%2F%7B1900A3A8-D51E-418F-B655-04FE6616879A%7D.png?alt=media&#x26;token=5668fc84-4405-4d7f-b0f5-04a9cbfba722" alt=""><figcaption></figcaption></figure>

Set **Start On Spawn** to true.  And that's it!
{% endstep %}
{% endstepper %}

