MBK2WAV
Converts MoonBlaster .mbk drum kits and .mbs single samples
to standard WAV audio files. Extracts all 14 sample slots from drum kits into
individual WAV files, making it easy to preview and reuse MSX-Audio samples in modern tools.
- Decode .mbs single ADPCM samples to WAV
- Extract all slots from .mbk drum kits
- Batch convert multiple files at once
- Configurable output sample rate
- 16-bit signed mono PCM output
- Accurate Y8950 ADPCM decoding
Usage
MBK2WAV input.mbs
# Extract all samples from a drum kit
MBK2WAV --verbose drums.mbk
# Batch convert with custom sample rate
MBK2WAV --rate 8000 file1.mbs file2.mbk
| Option | Description |
|---|---|
-o <file> | Output filename. For .mbk files this is used as the base name with a _NN suffix per slot. |
--rate <hz> | WAV sample rate in Hz. Default: 16000. |
--verbose | Print detailed conversion info (byte sizes, durations, slot addresses). |
-h, --help | Show help and exit. |
Examples
MBK2WAV --verbose drums.mbk # → drums_01.wav, drums_02.wav, ...
MBK2WAV --rate 8000 sample.mbs # → sample.wav at 8 kHz
MBK2WAV -o out.wav sample.mbs # → out.wav
WAV2MBK
Converts standard WAV files to MoonBlaster .mbs single samples or packs
multiple WAV files into a .mbk drum kit. Handles resampling, normalization,
and ADPCM encoding with accurate Y8950 emulation. Supports 8/16/24/32-bit input in mono or stereo.
- Encode WAV to .mbs single ADPCM sample
- Pack multiple WAVs into .mbk drum kit
- Auto-resample to 16 kHz (or custom rate)
- Optional audio normalization
- 32 KB or 256 KB ADPCM RAM modes
- Stereo-to-mono downmix & bit-depth conversion
Usage
WAV2MBK kick.wav
# Create a drum kit from multiple WAVs
WAV2MBK --mbk -o drums.mbk kick.wav snare.wav hihat.wav
# Normalize and convert with verbose output
WAV2MBK --verbose --normalize kick.wav
| Option | Description |
|---|---|
--mbk | Create a .mbk drum kit from multiple WAV files (up to 14 slots). |
-o <file> | Output filename. Default: input name with .mbs or .mbk extension. |
--rate <hz> | Resample to target rate. Default: auto-cap at 16000 Hz. |
--ram <32|256> | ADPCM RAM size in KB. Default: 32 (Music Module). Use 256 for Panasonic FS-CA1. |
--normalize | Normalize audio to full 16-bit range before encoding. |
--verbose | Print encoding details (compression ratio, resampling info). |
-h, --help | Show help and exit. |
Examples
WAV2MBK --verbose --normalize kick.wav # → kick.mbs (normalized)
WAV2MBK --mbk -o drums.mbk kick.wav snare.wav # → drums.mbk
WAV2MBK --ram 256 --rate 12000 sample.wav # → sample.mbs (256KB, 12kHz)
File Formats
MBS — Raw Y8950 ADPCM data with no header. Each byte contains two 4-bit ADPCM nibbles (high nibble first). Used by MoonBlaster 1.4 for single instrument samples.
MBK — MoonBlaster drum kit file. Contains a 56-byte header with 14 sample slots
(each slot is a uint16 start address + uint16 end address),
followed by concatenated ADPCM data padded to 4-byte boundaries. Each address unit represents 4 bytes of ADPCM data.
Both formats use the Yamaha Y8950 (MSX-Audio / OPL1) ADPCM algorithm, which provides roughly 4:1 compression of 16-bit PCM audio. The default sample rate of 16 kHz matches the typical MSX-Audio playback rate.