Wiki 9Minecraft Wiki 9Minecraft

Defining Custom Sounds in sound_definitions.json

How to register audio files and configure playback properties in a resource pack.

5Sections
3Code examples
3Known errors

The sound_definitions.json file acts as the bridge between raw audio files in your resource pack and the sound event names used by commands, animations, and entities. Whenever you add a new .ogg or .wav file to an add-on, you must register it here before the game can play it. It also controls how those sounds behave in the world, including their volume, pitch, attenuation distance, and volume slider category.

File Location and Structure

Every resource pack that introduces new audio or overrides vanilla audio paths needs a sound_definitions.json file placed inside the RP/sounds/ directory. Unlike entity or block definitions where each asset gets its own file, all sound definitions for your pack live inside this single JSON file. If multiple resource packs are active on a world, Minecraft merges their sound_definitions.json files from lowest to highest priority.

Since Bedrock 1.14.0, this file uses format_version 1.14.0 and wraps all entries inside a top-level sound_definitions object. Each key inside that object is the custom identifier you will call from commands like /playsound, animation timelines, or RP/sounds.json event mappings. By convention, dot-separated names like mob.custom_goblin.ambient or custom.spell.cast are used rather than namespaces with colons, though colons are technically permitted.

RP/sounds/sound_definitions.json
{
  "format_version": "1.14.0",
  "sound_definitions": {
    "custom.magic.sparkle": {
      "category": "neutral",
      "max_distance": 24.0,
      "sounds": [
        "sounds/custom/magic/sparkle_1",
        "sounds/custom/magic/sparkle_2"
      ]
    }
  }
}

Event-Level Properties

Each sound definition object accepts a small set of properties that govern the entire event regardless of which individual audio file is picked from its list. Setting a category is the most important of these, as it connects your sound to the corresponding volume slider in the player's audio settings menu.

Distance attenuation is handled primarily through max_distance. If you leave this out, the engine falls back to a default distance based on the category, which is usually 16 blocks for standard effects. Setting a larger number allows boss roars or thunderclaps to be heard from much further away, though you must still configure the individual sound weight and volume appropriately.

PropertyWhat it doesNotes
categoryAssigns the sound to a user settings volume slider.Valid values include ambient, block, bottle, bucket, hostile, music, neutral, player, record, ui, and weather.
max_distanceDistance in blocks at which the sound fully attenuates and becomes inaudible.Float value. Set to a high number like 64.0 for distant effects, or omit for standard 16-block drop-off.
min_distanceDistance in blocks before the sound begins to lose volume.Float value. Frequently set to 9999.0 on UI or music definitions so volume stays constant.
__use_legacy_max_distanceForces older attenuation math used in early Bedrock versions.String value set to "true". Rarely needed in modern packs unless porting old vanilla overrides.
soundsArray of file paths or detailed sound objects.When multiple entries are present, the engine selects one at random each time the event triggers.

Detailed Sound Entries

In the simplest setup, the sounds array just contains strings pointing to your audio files relative to the resource pack root, always omitting the .ogg or .wav file extension. When you need finer control over an individual variation, you can replace the string with a JSON object.

Using an object lets you alter the volume, pitch, and selection weight of each file independently. This is ideal when one variation in your pool is naturally louder than the others, or when you want a rare 'easter egg' voice line to play only once every twenty triggers by giving the common sounds a high weight and the rare sound a weight of 1.

FieldWhat it doesNotes
namePath to the audio file starting from the RP root.Do not include the .ogg or .wav extension. Always use forward slashes.
volumeBase volume multiplier for this specific file.Float, defaults to 1.0. Values above 1.0 do not amplify the audio; they only make it stay loud slightly further out.
pitchPlayback speed and pitch multiplier.Float, defaults to 1.0. A value of 0.5 plays at half speed; 2.0 plays at double speed.
weightRelative chance this file is picked from the array.Integer, defaults to 1. Higher numbers make the sound play more often.
streamStreams the audio from disk instead of loading it into RAM.Boolean, defaults to false. Essential for music tracks and long ambient loops.
load_on_low_memoryWhether this sound should still load on memory-constrained devices.Boolean. Deprecated in recent versions as the engine manages memory automatically, but still seen in vanilla files.
is3DControls whether the sound pans stereo channels based on world position.Boolean, defaults to true for most categories. Set to false for UI clicks or global alerts.
RP/sounds/sound_definitions.json
{
  "format_version": "1.14.0",
  "sound_definitions": {
    "mob.forest_troll.say": {
      "category": "hostile",
      "max_distance": 32.0,
      "sounds": [
        {
          "name": "sounds/mob/troll/grunt1",
          "volume": 0.9,
          "pitch": 1.0,
          "weight": 10
        },
        {
          "name": "sounds/mob/troll/grunt2",
          "volume": 0.9,
          "pitch": 0.95,
          "weight": 10
        },
        {
          "name": "sounds/mob/troll/rare_laugh",
          "volume": 1.0,
          "pitch": 1.0,
          "weight": 1
        }
      ]
    }
  }
}

Streaming Music and Long Audio

Minecraft handles short sound effects and long music tracks differently in memory. By default, any sound listed in sound_definitions.json is decoded and held in memory so it can play with zero latency when a mob attacks or a block breaks. If you do this with a three-minute music file, it consumes a huge amount of RAM and will often fail to play or crash the game on mobile devices and consoles.

For any file longer than a few seconds, set stream to true inside the sound object. Streaming reads the .ogg file off the drive in small chunks as it plays. Keep in mind that Bedrock limits the number of simultaneous audio streams, so avoid setting stream to true on rapid-fire sound effects like footsteps or weapon swings.

RP/sounds/sound_definitions.json
{
  "format_version": "1.14.0",
  "sound_definitions": {
    "record.custom_dungeon_theme": {
      "category": "record",
      "max_distance": 64.0,
      "sounds": [
        {
          "name": "sounds/music/dungeon_theme",
          "stream": true,
          "volume": 0.8
        }
      ]
    }
  }
}

Connecting Definitions to the Game

Registering an identifier in sound_definitions.json makes it immediately available to the /playsound command, resource pack client entity animations, and particle effects. However, if you want a custom entity or block to use the sound automatically through built-in game events—such as playing a hurt sound when damaged or a step sound when walking—you also need to reference your definition key inside RP/sounds.json.

Think of sound_definitions.json as defining 'what the sound is and where the file lives', while RP/sounds.json defines 'which game event triggers that sound'. For simple scripted events using world.playSound() or animation controllers firing /playsound, editing sound_definitions.json is the only step required.

Which versions this applies to

Format version 1.14.0 applies to Minecraft Bedrock 1.14.0 and all current releases (1.20 and 1.21+). No experimental toggles are required.

When it does not work

What you seeWhyThe fix
Running /playsound prints 'Played sound ...' in chat, but no audio is heard.You either included the .ogg extension in the "name" path, misspelled the folder path, or exported your audio file in an unsupported format (such as an MP3 renamed to .ogg).Remove .ogg or .wav from the "name" string in sound_definitions.json, verify the file path starts with "sounds/...", and ensure the file is a genuine Vorbis-encoded .ogg or PCM .wav file.
Custom sound plays everywhere across the dimension at full volume regardless of where it was triggered.The audio file was exported in Stereo (2 channels) instead of Mono (1 channel). Bedrock's 3D positional audio engine cannot pan or attenuate stereo files in world space.Open your audio file in an editor like Audacity, mix the stereo tracks down to a single Mono channel, and re-export the .ogg file.
Content Log shows '[Sound][error]-sound_definitions.json: ... is not a valid format' or ignores all custom sounds in the pack.The JSON syntax is broken (usually a trailing comma after the last item in the "sounds" array) or you used an old pre-1.14 format without the "sound_definitions" root wrapper object.Validate your JSON syntax and ensure all sound keys are nested inside the "sound_definitions" object with "format_version": "1.14.0" at the top.

Reference, straight from the game files

Read out of the game itself, so the ids match the version you are building for.