Skip to content

Channel modes (Mono Stereo)

koca2000 edited this page Aug 28, 2023 · 2 revisions

Since 1.5.0 you can choose a ChannelMode for RadioSongPlayer.

There are 3 possible types that implements ChannelMode:

  • MonoMode - play song in center of player's head
  • MonoStereoMode - play same Note twice with specified panning (distance property)
  • StereoMode - play Note with panning specified in NBS file scaled by maxDistance property

Remarks

Minecraft seems to be directing all sounds at the player. This causes issues with MonoMode and makes the sound quieter when the player moves or rotates. The solution to this issue is to use MonoStereoMode.

When StereoMode is used without the fallback mode, songs that does not have panned notes will play the same way as if they were played with MonoMode.

Example

RadioSongPlayer radioSongPlayer = ...;
StereoMode stereoMode = new StereoMode();
stereoMode.setFallbackChannelMode(new MonoStereoMode());
radioSongPlayer.setChannelMode(stereoMode);