Touhou Wiki
Advertisement

This article holds info about existing tools to extract, play or otherwise modify Touhou game BGM files.

All of the tools are built for Windows only, however some have source code included and therefore it might be possible to get them to work on other platforms.

Extractors

thbgmextractor - a Japanese GUI utility written in C# (visual studio build, source code included!). It has the ability to produce loops and fade-out, with a diagram visualising it. It also has configurable hooks for encoders like lame, oggenc and wma. Uses standard titles_thXX.txt data files, supports th06 and above.

thbgmtowav - a Japanese/English commandline tool by T. Solamarle written in C (gcc build, source code not included). It has the ability to produce loops, fade-out and silence. Uses standard titles_thXX.txt data files, supports th07 and above (and th06 after some hacking). Needs to have the thbgm.dat file in the same directory and extracts into the same directory. The output file name format is thbgm_XX.wav; ignores names in data file.

Thbgm-tool - a bundle of simple specialized commandline binaries to rip out bgm from th07, th07.5, th08 and th09 bgm data files. The author is unknown, C source code is available for the th09 extractor. They have the ability to produce loops and fade-out. Doesn't use any config files, all data is hardcoded. Those binaries that generate Japanese filenames need to run under the Japanese Locale to work properly.

Brightmoon - a generic touhou data file extractor w/ GUI; source code included, author unknown. Can be used to crack open the packed SWR/th105b.dat and UNL/th123b.dat, which store the soundtrack as Ogg Vorbis audio and Soundforge metadata (possibly loop information?).

Players

thplay - 東方蓄音機 (Touhou Gramophone) (Japanese)

bgmforall - BGM For All Version 1.1 By 野风信子 (Chinese)

Other utilities

th08bgm_patch - Binary patcher to fix several audio glitches in Imperishable Night's BGM file (source code included)

thbgmchg - BGM changer?

thplay Data Convert - Unknown purpose

Data Files

There is a common format for files that store information about BGM names and their positions in thbgm.dat files. The usual naming convention is titles_thXX.txt.

Here are some sources of these files:

Advertisement