Skip to main content

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_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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

music_disc_maker-1.0.2.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

music_disc_maker-1.0.2-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file music_disc_maker-1.0.2.tar.gz.

File metadata

  • Download URL: music_disc_maker-1.0.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.7 Windows/11

File hashes

Hashes for music_disc_maker-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ffa0a8958eeea836a0d202cf56cae3ce0cd3911729101f81f4662557d0ed92ce
MD5 d7938991e01edabb98a9ef46ca879e15
BLAKE2b-256 6c075b9c05988cf1464cb688fb48274328c8479182cd0bf97fc6c4fb1ede4e40

See more details on using hashes here.

File details

Details for the file music_disc_maker-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: music_disc_maker-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 40.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.7 Windows/11

File hashes

Hashes for music_disc_maker-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4210d81ff62469bce5fd27e6c10f1b0f90e0836fbb27c1dc3033261e02fd2f2b
MD5 de14b997b44995b792c9ab3be559af4c
BLAKE2b-256 86cc858c051f1cb63cff3bfaed4d7a6d479309d0b0154f55ba72ea25f245eae2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page