Skip to main content

music-disc-maker

Build scripted Minecraft Bedrock custom music disc add-ons without globally replacing vanilla sound effects.

Single-disc mode

music-disc-maker song.mp3 --id whiplash --title "Whiplash!"

The CLI also works as a module:

python -m music_disc_maker song.mp3 --id whiplash --title "Whiplash!"

Config mode

music_disc_maker.toml:

pack_id = "custom_discs"
pack_title = "Custom Music Discs"
namespace = "custom"
output_root = "dist"
dummy_sound_event = "pre_ram.screamer"
server_module_version = "2.8.0-beta"
item_format_version = "1.21.70"
sound_definitions_format_version = "1.20.20"
min_engine_version = [1, 21, 70]
default_comparator_signal = 13
comparator_signal_min = 1
comparator_signal_max = 13
pack_icon_size = 256
loot_enabled = true
# Optional: point at a custom layer directory or zip matching the bundled layer names.
# icon_layer_source = "disc_layers"

[[discs]]
input = "audio/whiplash.mp3"
id = "whiplash"
title = "Whiplash!"
comparator_signal = 13

[[discs]]
input = "audio/doom_banjo.mp3"
id = "doom_banjo"
title = "Doom Banjo"
sound_id = "record.doom_banjo"
comparator_signal = 11

Run it:

music-disc-maker --config music_disc_maker.toml

If --config is omitted, the tool checks the current directory for common config names such as music_disc_maker.toml, music-disc-maker.toml, .music-disc-maker.toml, JSON equivalents, discs.json, and [tool.music-disc-maker] / [tool.music_disc_maker] in pyproject.toml.

CLI arguments override config-file values where applicable. Config-file paths are resolved relative to the config file, not wherever your shell happens to be yelling from.

Procedural icons

Generated item icons now use bundled layered 16x16 disc assets instead of the old one-color fallback puck. The generator derives a deterministic icon from the disc namespace, ID, and title, so rebuilding the same pack keeps the same icon.

To use your own layer set, provide either a directory or zip containing files named like:

layer1_outer.png
layer2_surface.png
layer2_surface_alt.png
layer3_accent.png
layer3_accent_alt.png
layer4_edge.png
layer4_edge_alt.png
layer5_inner_a.png
layer5_inner_a_alt.png
layer6_inner_b.png
layer6_inner_b_alt.png
layer7_center.png

Then set it in config:

icon_layer_source = "assets/disc_layers.zip"

Or pass it on the CLI:

music-disc-maker --config music_disc_maker.toml --icon-layer-source assets/disc_layers.zip

Loot tables

By default, the behavior pack writes chest loot tables for:

  • chests/simple_dungeon
  • chests/abandoned_mineshaft
  • chests/stronghold_corridor
  • chests/ancient_city

The generated tables preserve the bundled vanilla entries for those four targets and append a small extra custom-disc pool. Disable this with:

loot_enabled = false

Or from the CLI:

music-disc-maker --config music_disc_maker.toml --disable-loot

Generate a config from audio files

Scan the current directory and create music_disc_maker.toml:

music-disc-maker-config

The config generator uses ffprobe metadata when available. The generated disc id comes from the normalized song title, while the display title becomes Artist - Title when artist metadata is present. If metadata is missing, filenames like 01 - DJ Stomp - Whiplash! (Official Audio).mp3 are parsed as a fallback, because manually typing that crap is how souls leave bodies.

The metadata scan shows a tqdm progress bar by default. Disable it with --no-progress when piping logs or being aggressively boring.

Useful options:

music-disc-maker-config --recursive --overwrite --pack-title "DJ Stomp Discs" --namespace dj

Preview without writing:

music-disc-maker-config --stdout

If your files use Title - Artist.ext instead of Artist - Title.ext:

music-disc-maker-config --filename-order title-artist --overwrite

For a big messy library, use MusicBrainz Picard or beets to fix the tags first, then regenerate the TOML. This tool reads metadata; it does not rewrite your files.

Testing

python -m pytest

License

MIT License. See the LICENSE file for details.

Metadata

Release files for music-disc-maker 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for music-disc-maker 1.1.1
File Size Uploaded
music_disc_maker-1.1.1.tar.gz 27.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for music-disc-maker 1.1.1
File Interpreter ABI Platform
music_disc_maker-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.3 kB

Release files / music_disc_maker-1.1.1.tar.gz

Download URL music_disc_maker-1.1.1.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ac0a086030dc04096731fef8fff87849794ba9637c19bfcc60a132a62cfd4654
BLAKE2b-256 checksum
How to use checksums
9332c4d0b429d35ea71176fe57e250832f3bcc0becc54628d414e8e891a23479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.7 Windows/11

Release files / music_disc_maker-1.1.1-py3-none-any.whl

Download URL music_disc_maker-1.1.1-py3-none-any.whl
Size 40.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9df017beed95c6afeb0dec5ea0904594ab9809c19d35f747e341040bf5cf23d5
BLAKE2b-256 checksum
How to use checksums
980aae8abb1d918fb712c771f984ffdbea486d449897c630cd676fc369409d9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.7 Windows/11

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page