texttoaudio.io

MP3 to BCSTM converter

Turn an MP3 or WAV file into a BCSTM, the streamed audio format used on the Nintendo 3DS, for custom themes and music replacements in games you own. Choose a file, set the sample rate and an optional loop, and download the .bcstm. Everything runs in your browser and the file is not uploaded.

MP3 or WAV in · BCSTM out
DSP-ADPCM · runs in your browser · free
Audio file

Choose an MP3 or WAV file, or load the demo. Use audio you made or have the right to use.

MP3 to BCSTM: how to use the converter

Five steps.

  1. Choose an MP3, WAV, OGG or M4A file. Your browser decodes it. If it cannot, the page says so.
  2. Pick a sample rate. 32000 Hz is a common choice for 3DS streams and keeps files small. Higher rates cost size and add little for most music.
  3. Choose stereo or mono. Mono mixes both channels into one and halves the file.
  4. Set a loop if the track should repeat, or leave it off.
  5. Press Convert, wait for the bar to finish, then press Download .bcstm. Play decoded result lets you hear what the encoded file sounds like.

Files longer than 15 minutes are cut at 15 minutes.

The converter is meant for your own audio: a track you composed, a recording you made, or music you are allowed to convert. It makes a BCSTM file and nothing more. It does not cover how to modify a console, install anything or change a game, and it does not include any game data.

MP3 to BCSTM page after loading the demo melody, showing the sample rate, channels and loop menus, the Convert button and the source details in the side panel
Chrome test run with the built-in demo melody.

MP3 to BCSTM converter: what is inside the file

Four blocks, laid out as 3dbrew documents them.

A BCSTM begins with a 64-byte CSTM header, followed by three blocks:

  • INFO holds the encoding, the loop flag, the channel count, the sample rate, the loop start, the total number of samples and the block sizes. For each channel it keeps 16 predictor coefficients.
  • SEEK stores, for every block and channel, the two samples just before the block, so a player can jump to a block.
  • DATA holds the audio. It is split into blocks of 8,192 bytes per channel, 14,336 samples each, with the channels interleaved block by block.

The audio is DSP-ADPCM. Every 14 samples become an 8-byte frame: one byte that names which of the 8 coefficient pairs to use and a scale, then 14 four-bit residuals. The decoder predicts each sample from the two before it and adds the scaled residual.

This page searches for the 8 coefficient pairs from your own audio, then picks the better of two candidates for every frame. The last block is padded to a 32-byte boundary, and all three blocks start on 32-byte boundaries.

WAV to BCSTM: sample rate, channels and file size

Four bits per sample.

DSP-ADPCM uses 8 bytes for every 14 samples, so one channel takes about 0.57 bytes per sample. Multiply by the sample rate and the channels:

SettingPer minute
32000 Hz, stereoabout 2.2 MB
32000 Hz, monoabout 1.1 MB
22050 Hz, stereoabout 1.5 MB
16000 Hz, monoabout 0.55 MB

A lower rate also lowers the highest pitch the file can hold: at 16000 Hz nothing above 8000 Hz survives. Resampling is done by the browser's own audio engine, which filters the sound before reducing the rate.

The encoder stores 4 bits where the source had 16, so some detail is lost. After encoding, the page decodes the file again and reports the signal-to-noise ratio against the resampled audio. A higher number means a closer copy. In our tests on a speech clip, two test tones and a synthetic stereo mix it came out between 39 and 78 dB. Your files will differ, so listen to them.

Result of converting the demo melody: the side panel lists the output name, DSP-ADPCM stereo at 32000 Hz, the file size, no loop, and a check line with header fields agreeing and the signal-to-noise ratio
The demo after pressing Convert, with the read-back check line.

BCSTM converter online: setting a loop

Where the music jumps back to.

Loop whole file repeats from the first sample once the track ends. Custom loop takes a start and an end in seconds. The loop end is the end of the stream, so the audio is cut there. The loop runs from the start point to the end.

A seamless loop needs a start and end that match musically. Pick a point on a beat, and make sure the end of the music flows into the start. Waveform editors help you find a zero crossing, which gives a smoother join.

This page starts every loop on a frame boundary, which is every 14 samples, so the stored loop state lines up with a whole frame. It moves your start point down to the nearest boundary. At 32000 Hz that is a shift of under half a millisecond at most, and the result panel shows the final position.

Custom loop settings with a loop start of 1.00 seconds and loop end of 5.50 seconds, and the result panel reporting the loop start sample moved to a 14-sample boundary
A custom loop from 1.00 to 5.50 seconds on the demo.

BCSTM to WAV: the other direction

Use another tool.

This page does not open BCSTM files. To listen to one or convert it back to WAV, use a tool that reads game audio. The vgmstream project and its command-line player are the usual choice, and several desktop players use it.

If you are building a sample library first, SoundFont to WAV splits an instrument bank into WAV files, and the WAV to C array converter turns a short WAV into code for a small board. Both give you audio you can bring here.

Limits you should know

The page states what it does not do.

  • Not tested on a console. The file was checked with a decoder written separately from the encoder, not on a 3DS or an emulator.
  • One encoding. Only DSP-ADPCM, one track, one or two channels. No PCM, IMA-ADPCM, regions or multi-track files.
  • Lossy. 4 bits per sample loses detail, and quiet or very bright sounds may show it.
  • Version field. The header version is written as 0x02000000, the value 3dbrew documents for 3DS stream files. No console or player has been tried with it here.
  • Memory and time. Long stereo files take longer to encode and use more memory, so very long tracks can be slow on phones. The longest file tested here was 50 seconds.
  • Browser decoding. What formats open depends on your browser.

MP3 to BCSTM: questions

How do I convert MP3 to BCSTM?

Choose your MP3 or WAV file at the top of this page, pick a sample rate, mono or stereo, and a loop setting, then press Convert. When it finishes, press Download .bcstm. The file is made in your browser and is not uploaded.

Will the file play on my 3DS?

This page writes a standard BCSTM with DSP-ADPCM audio, laid out as the public 3dbrew documentation describes. It has not been tried on a console or an emulator here, so listen to it on your own setup before relying on it.

Can I use it for any music?

Use it for audio you made or have the right to use, such as your own tracks or music you are allowed to convert. The page only produces an audio file. It does not explain how to modify a console or a game.

How do I set a loop?

Choose Loop whole file to repeat from the start, or Custom loop to give a loop start and end in seconds. The end trims the audio. The start is moved to the nearest 14-sample boundary, which the result panel reports.

Can this page turn a BCSTM into a WAV?

No. It only writes BCSTM files. For the other direction, use a player or converter that reads game audio, such as vgmstream-based tools. This page does not open BCSTM files you upload.

How big is a BCSTM compared with the MP3?

DSP-ADPCM stores 4 bits per sample, so a stereo file at 32,000 Hz is a little over 2 MB per minute. An MP3 at a common 128 kbit/s is about 1 MB per minute, so the BCSTM is usually larger.

More on the desk