/playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 1 1Minimum volume for players far from the source. Set to 0 to omit.
The /playsound command plays a sound event to one or more players with full control over source category, volume, pitch, and position. This generator builds the correct syntax from the sound event registry.
The syntax is /playsound [sound] [source] [targets] [pos] [volume] [pitch] [minVolume]. The sound parameter takes a namespaced sound event ID, and the source parameter controls which audio slider governs the playback volume in the player's settings.
Map makers and data pack creators use playsound for audio feedback on custom items, ambient sounds in builds, boss fight music, and alert tones for minigames. Pair it with the /particle command for combined audiovisual effects.
The source category maps to the audio sliders in Minecraft's Music and Sounds settings. Choosing the correct category lets players independently control the volume of your custom sounds.
| Source | Settings Slider | Best For |
|---|---|---|
| master | Master Volume | Sounds that should always play at full volume |
| music | Music | Background music, boss themes |
| record | Jukebox/Noteblocks | Music disc playback, custom jukebox sounds |
| weather | Weather | Rain, thunder, custom weather effects |
| block | Blocks | Block placement, breaking, mechanism sounds |
| hostile | Hostile Creatures | Monster alerts, custom mob sounds |
| neutral | Friendly Creatures | Passive mob sounds, NPC dialogue |
| player | Players | Footsteps, eating, player-specific effects |
| ambient | Ambient/Environment | Cave sounds, water ambiance, environmental loops |
| voice | Voice/Speech | Narrator, custom voice lines |
Volume above 1.0 means more range. Volume values over 1.0 do not make the sound louder. Instead they increase the audible distance. The formula is volume x 16 = max blocks, so a volume of 4.0 can be heard up to 64 blocks away.
Pitch for variety. Pitch ranges from 0.5 (half speed, deeper) to 2.0 (double speed, higher), with 1.0 as normal. Randomize pitch slightly (0.9 to 1.1) for natural variation in repeating sounds.
Custom resource pack sounds. Add your own OGG audio files via a resource pack and play them with a custom namespace like mypack:custom.alert.
Stop sounds. Use /stopsound to halt a playing sound, which is useful for cutting music when a boss fight ends or silencing ambient loops on area exit.
It plays a sound event to specified players. You control the sound type, source category (which audio slider governs it), volume, pitch, and the 3D position the sound originates from. The sound attenuates with distance from the specified position.
There are 10 source categories: master, music, record, weather, block, hostile, neutral, player, ambient, and voice. Each maps to a volume slider in Minecraft's sound settings. Choosing the right category lets players adjust your custom sound volumes independently.
Values from 0.0 to 1.0 set the actual loudness. Values above 1.0 increase the audible range instead of the volume. The formula is volume x 16 = maximum distance in blocks. So a volume of 2.0 can be heard up to 32 blocks away.
Browse more Minecraft tools: