mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Pin DC/NC pitch
This commit is contained in:
parent
edc8220554
commit
12bdb1dafd
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
@ -14,9 +15,19 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage Icon => FontAwesome.Solid.Question;
|
public override IconUsage Icon => FontAwesome.Solid.Question;
|
||||||
public override string Description => "Whoaaaaa...";
|
public override string Description => "Whoaaaaa...";
|
||||||
|
|
||||||
|
private readonly BindableNumber<double> tempoAdjust = new BindableDouble(1);
|
||||||
|
private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);
|
||||||
|
|
||||||
public override void ApplyToTrack(Track track)
|
public override void ApplyToTrack(Track track)
|
||||||
{
|
{
|
||||||
track.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
track.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||||
|
track.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||||
|
|
||||||
|
SpeedChange.BindValueChanged(val =>
|
||||||
|
{
|
||||||
|
freqAdjust.Value = SpeedChange.Default;
|
||||||
|
tempoAdjust.Value = val.NewValue / SpeedChange.Default;
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
@ -15,9 +16,19 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage Icon => OsuIcon.ModNightcore;
|
public override IconUsage Icon => OsuIcon.ModNightcore;
|
||||||
public override string Description => "Uguuuuuuuu...";
|
public override string Description => "Uguuuuuuuu...";
|
||||||
|
|
||||||
|
private readonly BindableNumber<double> tempoAdjust = new BindableDouble(1);
|
||||||
|
private readonly BindableNumber<double> freqAdjust = new BindableDouble(1);
|
||||||
|
|
||||||
public override void ApplyToTrack(Track track)
|
public override void ApplyToTrack(Track track)
|
||||||
{
|
{
|
||||||
track.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
track.AddAdjustment(AdjustableProperty.Frequency, freqAdjust);
|
||||||
|
track.AddAdjustment(AdjustableProperty.Tempo, tempoAdjust);
|
||||||
|
|
||||||
|
SpeedChange.BindValueChanged(val =>
|
||||||
|
{
|
||||||
|
freqAdjust.Value = SpeedChange.Default;
|
||||||
|
tempoAdjust.Value = val.NewValue / SpeedChange.Default;
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user