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:
parent
bd6664d541
commit
910fe3e9f8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user