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 <flokuep@users.noreply.github.com>
This commit is contained in:
Rap-VocaandFlorian Ostertag authored and GitHub committed 2024-10-11 19:42:36 +02:00
1 parent 958121a252
commit 451b97acbf
3 files changed
+20 -12

No files matched your search

+17 -4
View File
@@ -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
}
}
}
+2 -7
View File
@@ -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);
}
}
}
}
+1 -1
View File
@@ -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'))
{