> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Sounds and music discs

> Add your own .ogg sounds and turn them into music disc songs.

```yaml items/sounds/sounds.yml theme={null}
victory:
  type: sound
  file: victory.ogg            # next to this file
  stream: true                 # for long sounds like music
  volume: 1
  pitch: 1
  distance: 32                 # heard from this far away (default 16)
  subtitle: "Fanfare plays"
```

The sound's id is `lodeitems:victory`, the same as any other id. Play it from [actions](https://items.lodemc.net/events.md) (`[sound] lodeitems:victory`), from block and prop `sounds:`, or with `/playsound`.

Sounds must be **Ogg Vorbis** (`.ogg`) files. For sounds that come from a spot in the world, use mono files, because stereo sounds are heard at the same volume everywhere.

### Several variations

```yaml theme={null}
coin:
  type: sound
  files: [coin_1.ogg, coin_2.ogg, coin_3.ogg]   # one is picked at random each time
```

## Music discs

Add `disc:` to make the sound a song that jukeboxes can play:

```yaml theme={null}
victory:
  type: sound
  file: victory.ogg
  stream: true
  disc:
    description: "<gold>LodeMC - Victory"
    length: 2m30s
    comparator: 15             # comparator signal while it plays (0-15)
```

Then make a disc item that plays it:

```yaml theme={null}
victory_disc:
  material: music_disc_cat
  name: "<gold>Music Disc"
  texture: victory_disc.png
  components:
    jukebox_playable: "lodeitems:victory"
```

> [!WARNING]
>
> Minecraft only accepts new music disc songs at startup. **Adding or removing a song needs a server restart.** A reload tells you when that's the case. Changing the sound file itself only needs a reload.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.