1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

Center pitch randomisation around base pitch

This commit is contained in:
Jamie Taylor 2021-07-02 15:39:43 +09:00 committed by Dean Herbert
parent bd6664d541
commit 910fe3e9f8
2 changed files with 4 additions and 5 deletions

View File

@ -161,10 +161,9 @@ namespace osu.Game.Graphics.UserInterface
var channel = sample.Play();
channel.Frequency.Value = 1 + NormalizedValue * 0.2f + RNG.NextDouble(0.02f);
if (NormalizedValue == 0)
channel.Frequency.Value -= 0.5f;
else if (NormalizedValue == 1)
channel.Frequency.Value = 0.99f + RNG.NextDouble(0.02f) + NormalizedValue * 0.2f;
if (NormalizedValue == 0 || NormalizedValue == 1)
channel.Frequency.Value -= 0.5f;
}

View File

@ -238,7 +238,7 @@ namespace osu.Game.Overlays.Volume
var channel = sample.GetChannel();
channel.Frequency.Value = 1 + displayVolume * 0.1f + RNG.NextDouble(0.02f);
channel.Frequency.Value = 0.99f + RNG.NextDouble(0.02f) + displayVolume * 0.1f;
if (displayVolumeInt == 0)
channel.Frequency.Value -= 0.5f;