diff --git a/GenshinLyreMidiPlayer.WPF/Core/LyrePlayer.cs b/GenshinLyreMidiPlayer.WPF/Core/LyrePlayer.cs
index 91bd98b..222053e 100644
--- a/GenshinLyreMidiPlayer.WPF/Core/LyrePlayer.cs
+++ b/GenshinLyreMidiPlayer.WPF/Core/LyrePlayer.cs
@@ -9,7 +9,7 @@ namespace GenshinLyreMidiPlayer.WPF.Core
{
public static class LyrePlayer
{
- public enum Tranpose
+ public enum Transpose
{
Ignore,
Up,
@@ -46,7 +46,7 @@ public enum Tranpose
};
public static int TransposeNote(int noteId,
- Tranpose direction = Tranpose.Ignore)
+ Transpose direction = Transpose.Ignore)
{
while (true)
{
@@ -61,9 +61,9 @@ public static int TransposeNote(int noteId,
{
return direction switch
{
- Tranpose.Ignore => noteId,
- Tranpose.Up => ++noteId,
- Tranpose.Down => --noteId
+ Transpose.Ignore => noteId,
+ Transpose.Up => ++noteId,
+ Transpose.Down => --noteId
};
}
}
diff --git a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
index 449808d..e86c3bd 100644
--- a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
+++ b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
@@ -6,7 +6,7 @@
true
GenshinLyreMidiPlayer.WPF.App
app.manifest
- 2.3.1
+ 2.3.2
item_windsong_lyre.ico
enable
https://github.com/sabihoshi/GenshinLyreMidiPlayer
diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs
index 6373c52..1591142 100644
--- a/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs
+++ b/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs
@@ -17,7 +17,7 @@
using Stylet;
using StyletIoC;
using static Windows.Media.MediaPlaybackAutoRepeatMode;
-using static GenshinLyreMidiPlayer.WPF.Core.LyrePlayer.Tranpose;
+using static GenshinLyreMidiPlayer.WPF.Core.LyrePlayer.Transpose;
using MidiFile = GenshinLyreMidiPlayer.Data.Midi.MidiFile;
namespace GenshinLyreMidiPlayer.WPF.ViewModels
@@ -298,7 +298,7 @@ private async Task InitializePlayback()
var outOfRange = midi.GetNotes().Where(note =>
!_settings.SelectedLayout.Key.TryGetKey(ApplyNoteSettings(note.NoteNumber), out _));
- if (outOfRange.Any())
+ if (_settings.Transpose is null && outOfRange.Any())
{
await Application.Current.Dispatcher.Invoke(async () =>
{
@@ -352,7 +352,7 @@ private int ApplyNoteSettings(int noteId)
noteId -= Settings.KeyOffset;
if (Settings.TransposeNotes)
- noteId = LyrePlayer.TransposeNote(noteId, _settings.Transpose);
+ noteId = LyrePlayer.TransposeNote(noteId, _settings.Transpose ?? Ignore);
return noteId;
}
diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs
index 985afc8..80322b7 100644
--- a/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs
+++ b/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs
@@ -155,7 +155,7 @@ public int KeyOffset
public string UpdateString { get; set; } = string.Empty;
- public LyrePlayer.Tranpose Transpose { get; set; } = LyrePlayer.Tranpose.Ignore;
+ public LyrePlayer.Transpose? Transpose { get; set; }
public uint MergeMilliseconds { get; set; } = Settings.MergeMilliseconds;