ynoproject / ynoengine

EasyRPG-based engine for YNOproject
GNU General Public License v3.0
25 stars 15 forks source link

Panning for the Play Sound event command is not supported #32

Closed yoshiweegee closed 1 year ago

yoshiweegee commented 1 year ago

The Issue

A Play Sound event command uses Audio().SE_Play() to play its sound effect. This function, declared as AudioInterface.SE_Play(), only takes limited info about the sound effect to play, which does not include the panning argument of a Play Sound event command (internally lcf::rpg::Sound.balance).

In short, there currently is no implementation for the panning of sound effects.

Observation

This easily can be observed by going to Red Streetlight World of Yume 2kki. Its "BGM" is actually an event page playing the (English RTP: Bell) sound effect on a cycle.

One strike plays on the left, the next on the right, the next on the left, etc. In YNOProject's client, no panning is heard; the bells always play with center panning.

What Should Happen

Panning should be applied to sound effects when specified. Due to the psychological impact that effective usage of stereo audio can have, it's especially important that this be implemented for Yume Nikki and its kind. To use Red Streetlight World again as an example, the panning gives the map an increased sense of indeterminate expansiveness, which accents its foreboding setting.

Further Notes

Stereo audio

The sound used for the floor of Underwater Amusement Park's entrance plays notably in the left speaker. This is because its sound, 575-otoyuka1, is stereo audio, and is notably louder in the left channel. This should not be confused with panning, which would be able to change the left/right output regardless of if the audio is mono or stereo.

Implementation accuracy

Minimal research suggests that in RPG Maker 2000, maximum panning to either side in a Play sound event command isn't a completely 100% panning, with some audio still audible from the opposite side. More research should be done to ensure that panning is implemented correctly.

Flashfyre commented 1 year ago

This is an EasyRPG issue that will eventually be fixed on their end. See https://github.com/EasyRPG/Player/issues/2585