Touhou Wiki
Advertisement

This article will hold info about existing tools (all of which run only on Windows, understandably) to extract, play or otherwise modify the Touhou BGMs. It's an attempt to make sense out of and organize the mess of tools found on the internet. Please watch warmly until it is ready~.

Extractors

First there's 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.

Then there's 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.

Finally there's 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.

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. A list of these files can be found on here (has th06, th07, th07.5, th08, th09, th09.5, th10, th11, th12 and the th11 and th12 trial). An alternative list for individual wav bgm files, extracted from data file using a ripping tool, is available here (also has th06).

Advertisement