P0275
BGM can now be modded via BGM packs in the bgm/
subdirectory! Each track is identified by its two-digit Music Room number, followed by the extension – for example, the MIDI version of the title screen theme would be 01.mid
. This was mainly implemented for in-game support of SC-88Pro recordings on future operating systems without a native MIDI synth.
Due to new filesystem- and threading-related code, this release requires Windows Vista or later, and no longer comes with an i586 build. If you are interested in continued official support for earlier Windows versions, feel free to provide funding or code contributions for #43, #53, and/or #58.
The detailed changelog:
BGM packs
-
BGM packs introduce support for waveform BGM. The system is based on thcrap's BGM modding support, with the following key differences:
-
Only FLAC (
.flac
) and Ogg Vorbis (.ogg
) codecs are supported, with.flac
taking precedence over.ogg
. -
Stacking is not supported.
-
Each track can be provided in waveform and MIDI versions. If both are present, the MIDI version is silently processed in the Music Room to provide note and spectrum analyzer visualization. This assumes that both waveform and MIDI files are perfectly synchronized with each other.
-
Track titles for in-game and Music Room display are taken from the Vorbis comment
TITLE
tag of the intro file.
-
-
Waveform tracks can provide a gain factor to optionally remove any volume differences between individual tracks of a BGM pack. This factor is read as a floating-point value from the optional
GAIN FACTOR
tag of the intro file.- The configuration menu disables the
BGMVolNormalize
option if the currently playing track does not define a gain.
- The configuration menu disables the
-
Waveform tracks can link themselves to a MIDI file from the original
MUSIC.DAT
soundtrack. This allows recordings of these MIDIs to retain the original Music Room visualizations without needing to bundle the original file in the BGM pack and thus infringing copyright. This is done by providing the full 32-byte BLAKE3 hash of a MIDI file in the optionalSOURCE MIDI
tag of the intro file. -
If no BGM pack is present, the
Sound / Config
menu provides a download option for SC-88Pro recordings of the original soundtrack. Currently, this simply opens a web page in the system's default browser.
General sound- and music-related changes
-
BGM and sound effect volume can now be adjusted in-game, separately from each other. The controls in the
Sound / Config
menu are modeled after the MIDI standard, using a squared volume curve with a range between 0 and 127. Unlike in Windows Touhou, the BGM volume setting also applies to MIDI. -
The in-game music title animation is no longer shown if BGM is disabled.
-
In-game music titles are now consistently right-aligned.
Leading whitespace in 4 of the original MIDI Sequence Names suggests that pbg might have intended these titles to be centered within the 216 maximum pixels that the original code designated for music titles, but none of those had the correct amount of spaces that would have been required for exact centering. The code did have a formula for right alignment though, so this fix maintains consistency with the whitespace-trimmed title tags in the BGM packs. For shorter titles, this slightly changes the look of the animation; this might be fixed with #55.Original game:
2024-03-09-SH01-Ingame-music-title-original.webm
P0275 build:
2024-03-09-SH01-Ingame-music-title-P0275.webm
MIDI playback
-
The original MIDI soundtrack from
MUSIC.DAT
now seamlessly loops instead of restarting at the end of each MIDI file. The necessary loop points were algorithmically detected using mly and are hardcoded into the executable as a map that associates the BLAKE3 hash of each individual MIDI file with a loop region. -
Re-enabling MIDI BGM in the
Sound / Music
menu will now immediately play the title screen theme again. -
MIDI files now play at their exact notated tempo.
Shuusou Gyoku's original MIDI parser had an arithmetic error that caused every tempo value to be parsed as roughly ≈0.8% / ≈1 BPM slower than notated. As a result of pbg's Program Support role during the development of TH06, this bug is also present in every Windows Touhou game that supports MIDI playback. -
The MIDI Port configuration option now shows a simple grayed-out
>
if BGM is disabled. Previously it showed^^^^^^^^^^
, which lined up with the使用しない
string from theMIDI
option above, but this no longer works with the new BGM-related options between the two. -
When the game window regains focus after losing it, MIDI playback now resumes at the exact position it was paused, instead of rewinding to the beginning of the track.
-
The
MIDI TIMER
in the Music Room now shows the current MIDI pulse value.
In the original game, it simply showed thePASSED TIME
value formatted in milliseconds. While this revealed the 10ms update interval of the game's MIDI player, it didn't provide any further information that related to the actual MIDI file being played. In contrast, the MIDI pulse value will jump back when reaching the loop point while thePASSED TIME
value continues to increase in that case.
Menus
-
If any of Shuusou Gyoku's 5 original game data files are missing, the game now shows a new screen at startup with the full absolute paths to the .DAT files and an option to recheck without restarting the game. This means that the game will now at least show something if it's started by itself from any directory – previously, it simply crashed on the first attempt to load anything from a nonexistent .DAT file.
-
The main menu help text now appears centered rather than left-aligned next to a nonexistent face sprite.
Troubleshooting
As of the P0256 build, D3DWindower can no longer be used with the SDL2/non-i586 version, but DxWnd still works. Import this configuration via File → Import, then adjust the path to your GIAN07.exe
.
If the game runs slow on your system, or doesn't render anything at all:
-
Delete any reference to
GIAN07.exe
from the following registry keys:- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
- HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
-
Make sure that the 32-bit mode is activated in the Config → Graphic menu.
Additional credits
Summary blog post: https://rec98.nmlgc.net/blog/2024-03-09
Full changelog compared to the previous release: P0256...P0275
Previous release: https://github.com/nmlgc/ssg/releases/tag/P0256