# Beat generating

{% stepper %}
{% step %}

### Upload Music

Upload your desired music in `.ogg` format to the `dh_cardance/html/song` folder.
{% endstep %}

{% step %}

### Restart the Server

{% endstep %}

{% step %}

### Join the server

1. In the **server console**, enter the following command to generate beats for your music file:

   ```bash
   generate_beat file_name.ogg
   ```
2. Do not exit the server until you see the message **"Beat finished successfully"**.
   {% endstep %}

{% step %}

### Navigate to the `configs/shared.lua` file

Add your song to `Shared.Sounds` with the following format:

```lua
{ name = "SONG_DISPLAY_NAME", time = "SONG:DURATION", url = "file_name.ogg", diff
```

{% endstep %}

{% step %}

### Restart the Script

Your Car Dancing script should now be fully functional.
{% endstep %}
{% endstepper %}

***

## <mark style="color:yellow;">Example Configuration</mark>

Example of configuration entry for `shared.lua`:

```lua
Shared.Sounds = {
    { name = "Song Display Name", time = "3:45", url = "song_file.ogg", difficulty = "easy" },
    -- Add more songs here
}
```


---

# 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.devhub.gg/car-dancing/configuration/beat-generating.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.
