Build scripted Minecraft Bedrock custom music disc add-ons.
Project description
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_dungeonchests/abandoned_mineshaftchests/stronghold_corridorchests/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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file music_disc_maker-1.1.1.tar.gz.
File metadata
- Download URL: music_disc_maker-1.1.1.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac0a086030dc04096731fef8fff87849794ba9637c19bfcc60a132a62cfd4654
|
|
| MD5 |
66b1fea6d32886d715c3d75fd4e14735
|
|
| BLAKE2b-256 |
9332c4d0b429d35ea71176fe57e250832f3bcc0becc54628d414e8e891a23479
|
File details
Details for the file music_disc_maker-1.1.1-py3-none-any.whl.
File metadata
- Download URL: music_disc_maker-1.1.1-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.13.7 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9df017beed95c6afeb0dec5ea0904594ab9809c19d35f747e341040bf5cf23d5
|
|
| MD5 |
0dbfc7192505a8ea63704feb04370e50
|
|
| BLAKE2b-256 |
980aae8abb1d918fb712c771f984ffdbea486d449897c630cd676fc369409d9d
|