From 451b97acbff57b4ab01384989a23e5e1d867675e Mon Sep 17 00:00:00 2001 From: Rap-Voca Date: Fri, 11 Oct 2024 19:42:36 +0200 Subject: [PATCH] Basic Rap Note Support (#708) * Differentiate between Rap and Freestyle Notes * Render Rap Notes * Treat Rap notes as own notes * Update CLyric.cs --------- Co-authored-by: Florian Ostertag --- VocaluxeLib/Menu/CLyric.cs | 21 +++++++++++++++++---- VocaluxeLib/Menu/SingNotes/CNoteBars.cs | 9 ++------- VocaluxeLib/Songs/CSongLoader.cs | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/VocaluxeLib/Menu/CLyric.cs b/VocaluxeLib/Menu/CLyric.cs index 97a5e60a..7e3e1a56 100644 --- a/VocaluxeLib/Menu/CLyric.cs +++ b/VocaluxeLib/Menu/CLyric.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -117,8 +117,21 @@ namespace VocaluxeLib.Menu private void _SetText(CSongNote note) { - _Text.Text = note.Text; - _Text.Font.Style = (note.Type == ENoteType.Freestyle) ? EStyle.BoldItalic : EStyle.Bold; + _Text.Text = note.Text; + + if (note.Type == ENoteType.Freestyle) + { + _Text.Font.Style = EStyle.Italic; + } + else if (note.Type == ENoteType.Rap || note.Type == ENoteType.RapGolden) + { + _Text.Font.Style = EStyle.BoldItalic; + } + else + { + _Text.Font.Style = EStyle.Bold; + } + } public void Clear() @@ -379,4 +392,4 @@ namespace VocaluxeLib.Menu } #endregion ThemeEdit } -} \ No newline at end of file +} diff --git a/VocaluxeLib/Menu/SingNotes/CNoteBars.cs b/VocaluxeLib/Menu/SingNotes/CNoteBars.cs index 968871ad..b979fb39 100644 --- a/VocaluxeLib/Menu/SingNotes/CNoteBars.cs +++ b/VocaluxeLib/Menu/SingNotes/CNoteBars.cs @@ -1,4 +1,4 @@ -#region license +#region license // This file is part of Vocaluxe. // // Vocaluxe is free software: you can redistribute it and/or modify @@ -181,11 +181,6 @@ namespace VocaluxeLib.Menu.SingNotes float y = Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - line.BaseLine) / 2f) * _NoteLineHeight - _AddNoteHeight / 2; float height = _NoteLineHeight + _AddNoteHeight; - if (isRapNote) { - y = Rect.Y; - height = Rect.H; - } - var noteRect = new SRectF( Rect.X + (note.StartBeat - line.FirstNoteBeat) * Rect.W / beats, y, @@ -354,4 +349,4 @@ namespace VocaluxeLib.Menu.SingNotes _PerfectLineTwinkle.Add(twinkle); } } -} \ No newline at end of file +} diff --git a/VocaluxeLib/Songs/CSongLoader.cs b/VocaluxeLib/Songs/CSongLoader.cs index 86949742..77eddf3b 100644 --- a/VocaluxeLib/Songs/CSongLoader.cs +++ b/VocaluxeLib/Songs/CSongLoader.cs @@ -627,7 +627,7 @@ namespace VocaluxeLib.Songs if (tag.Equals('*')) noteType = ENoteType.Golden; - else if (tag.Equals('F') || tag.Equals('R') || tag.Equals('G')) // Read R (RAP) and G (Golden RAP) notes as Freestyle notes currently. Final implementation needed! + else if (tag.Equals('F')) noteType = ENoteType.Freestyle; else if (tag.Equals('R')) {