Audio Mode for Instrumental & Karaoke (#749)
* Add AudioMode * Update Theme System Version * Update Theme System Version * Version 11 * Version 8 * Update Theme System Version * Add AudioMode * Update Theme System Version * Add AudioMode * Add AudioMode * Add AudioMode * Add AudioMode * Add AudioMode * No effect for Instrumental * Instrumental Check * Add HasInstrumental Check --------- Co-authored-by: Florian Ostertag <flokuep@users.noreply.github.com>
This commit is contained in:
1 parent
cccca5ab83
commit
18d6dba40e
14 files changed
+166
-28
No files matched your search
@@ -20,6 +20,10 @@
|
||||
<string name="TR_GAMEMODE_DUET">Duet</string>
|
||||
<string name="TR_GAMEMODE_MEDLEY">Medley</string>
|
||||
<string name="TR_GAMEMODE_SHORTSONG">Short version</string>
|
||||
<string name="TR_AUDIOMODE_NORMAL">Normal</string>
|
||||
<string name="TR_AUDIOMODE_INSTRUMENTAL">Instrumental</string>
|
||||
<string name="TR_AUDIOMODE_KARAOKE">Karaoke</string>
|
||||
<string name="TR_RATING_KARAOKE">Karaoke</string>
|
||||
<string name="TR_RATING_VOCAL_HERO">Vocal Hero</string>
|
||||
<string name="TR_RATING_SUPERSTAR">Superstar</string>
|
||||
<string name="TR_RATING_LEAD_SINGER">Lead Singer</string>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<ThemeSystemVersion>7</ThemeSystemVersion>
|
||||
<ThemeSystemVersion>8</ThemeSystemVersion>
|
||||
<Info>
|
||||
<Name>Default</Name>
|
||||
<Author>brunzel</Author>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<ThemeSystemVersion>7</ThemeSystemVersion>
|
||||
<ThemeSystemVersion>8</ThemeSystemVersion>
|
||||
<Info>
|
||||
<Name>Default</Name>
|
||||
<Author>brunzel</Author>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
ScreenSong
|
||||
|
||||
++++++++++
|
||||
Version 11:
|
||||
|
||||
Add:
|
||||
<SelectSlideOptionsAudioMode>
|
||||
|
||||
++++++++++
|
||||
|
||||
++++++++++
|
||||
Version 10:
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
Theme System
|
||||
|
||||
++++++++++
|
||||
Version 8
|
||||
|
||||
Changed:
|
||||
SelectSlide for AudioMode (SelectSlideOptionsAudioMode) on song select screen
|
||||
|
||||
|
||||
++++++++++
|
||||
Version 7
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<root>
|
||||
<ThemeSystemVersion>7</ThemeSystemVersion>
|
||||
<ThemeSystemVersion>8</ThemeSystemVersion>
|
||||
<Info>
|
||||
<Name>Vocaluxe 2024</Name>
|
||||
<Author>Vocaluxe</Author>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>ScreenSong</ScreenName>
|
||||
<ScreenVersion>10</ScreenVersion>
|
||||
<ScreenVersion>11</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -251,7 +251,7 @@
|
||||
</Text>
|
||||
<Text Name="TextOptionsTitle">
|
||||
<X>330</X>
|
||||
<Y>70.5</Y>
|
||||
<Y>60</Y>
|
||||
<Z>-2.11</Z>
|
||||
<H>51</H>
|
||||
<MaxW>525</MaxW>
|
||||
@@ -513,7 +513,7 @@
|
||||
<SkinSelected>SongSelectButton</SkinSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>352.5</Y>
|
||||
<Y>395</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
@@ -540,7 +540,7 @@
|
||||
<SkinSelected>SongSelectButton</SkinSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>135</Y>
|
||||
<Y>110</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
@@ -818,7 +818,7 @@
|
||||
<SkinSelected>SongSelectButton</SkinSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>435</Y>
|
||||
<Y>472.5</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
@@ -1176,21 +1176,63 @@
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>202.5</Y>
|
||||
<Y>177.5</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>67.5</X>
|
||||
<Y>210</Y>
|
||||
<Y>185</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>547.5</X>
|
||||
<Y>210</Y>
|
||||
<Y>185</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
</RectArrowRight>
|
||||
<Color Name="ButtonColor" />
|
||||
<SelColor Name="ButtonSelColor" />
|
||||
<ArrowColor Name="ArrowColor" />
|
||||
<ArrowSelColor Name="ArrowSelColor" />
|
||||
<TextColor Name="TextColorAlpha" />
|
||||
<TextSelColor Name="TextColorAlpha" />
|
||||
<TextH>37.5</TextH>
|
||||
<TextRelativeX>75</TextRelativeX>
|
||||
<TextRelativeY>0</TextRelativeY>
|
||||
<TextMaxW>420</TextMaxW>
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>1</NumVisible>
|
||||
</SelectSlide>
|
||||
<SelectSlide Name="SelectSlideOptionsAudioMode">
|
||||
<Skin>SongSelectButton</Skin>
|
||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||
<SkinSelected>SongSelectButton</SkinSelected>
|
||||
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>245</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>67.5</X>
|
||||
<Y>252.5</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>547.5</X>
|
||||
<Y>252.5</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
@@ -1218,21 +1260,21 @@
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>60</X>
|
||||
<Y>285</Y>
|
||||
<Y>327.5</Y>
|
||||
<W>540</W>
|
||||
<H>60</H>
|
||||
<Z>-2.11</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>67.5</X>
|
||||
<Y>292.5</Y>
|
||||
<Y>335</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>547.5</X>
|
||||
<Y>292.5</Y>
|
||||
<Y>335</Y>
|
||||
<W>45</W>
|
||||
<H>45</H>
|
||||
<Z>-2.12</Z>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Vocaluxe.Base.ThemeSystem
|
||||
abstract class CTheme
|
||||
{
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
private const int _ThemeSystemVersion = 7;
|
||||
private const int _ThemeSystemVersion = 8;
|
||||
|
||||
protected STheme _Data;
|
||||
public String Name
|
||||
|
||||
@@ -240,6 +240,10 @@ namespace Vocaluxe.Screens
|
||||
if (points == null)
|
||||
return;
|
||||
|
||||
// No points in Karaoke Mode
|
||||
if (CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE)
|
||||
return;
|
||||
|
||||
for (int round = 0; round < points.NumRounds; round++)
|
||||
{
|
||||
SPlayer[] players = points.GetPlayer(round, CGame.NumPlayers);
|
||||
|
||||
@@ -169,7 +169,9 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
string rating;
|
||||
|
||||
if (points >= 9800)
|
||||
if (CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE)
|
||||
rating = "TR_RATING_KARAOKE";
|
||||
else if (points >= 9800)
|
||||
rating = "TR_RATING_VOCAL_HERO";
|
||||
else if (points >= 8400)
|
||||
rating = "TR_RATING_SUPERSTAR";
|
||||
@@ -257,6 +259,12 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private void _PlayApplauseSound(int maxPoints)
|
||||
{
|
||||
// Play no applause sound based on Karaoke Mode
|
||||
if (CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Play the appropriate applause sound based on maxPoints
|
||||
if (maxPoints >= 8000)
|
||||
{
|
||||
@@ -356,19 +364,23 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private void _SetVisibility()
|
||||
{
|
||||
bool isKaraokeMode = CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE;
|
||||
|
||||
for (int numplayer = 0; numplayer < CSettings.MaxNumPlayer; numplayer++)
|
||||
{
|
||||
for (int player = 0; player < CSettings.MaxNumPlayer; player++)
|
||||
{
|
||||
if (player <= numplayer)
|
||||
{
|
||||
_Texts[_TextNames[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
_Texts[_TextScores[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
_Texts[_TextRatings[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
_Texts[_TextDifficulty[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
_ProgressBars[_ProgressBarPoints[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
bool isVisible = numplayer + 1 == CGame.NumPlayers;
|
||||
|
||||
_Texts[_TextNames[player, numplayer]].Visible = isVisible;
|
||||
_Texts[_TextScores[player, numplayer]].Visible = isVisible && !isKaraokeMode;
|
||||
_Texts[_TextRatings[player, numplayer]].Visible = isVisible;
|
||||
_Texts[_TextDifficulty[player, numplayer]].Visible = isVisible;
|
||||
_ProgressBars[_ProgressBarPoints[player, numplayer]].Visible = isVisible && !isKaraokeMode;
|
||||
_ProgressBars[_ProgressBarPoints[player, numplayer]].Reset(true);
|
||||
_Statics[_StaticAvatar[player, numplayer]].Visible = numplayer + 1 == CGame.NumPlayers;
|
||||
_Statics[_StaticAvatar[player, numplayer]].Visible = isVisible;
|
||||
|
||||
_Statics[_StaticAvatar[player, numplayer]].Texture = null;
|
||||
}
|
||||
|
||||
@@ -1159,7 +1159,15 @@ namespace Vocaluxe.Screens
|
||||
_Texts[_TextSongName].Text = songname;
|
||||
_Texts[_TextPauseSongName].Text = songname;
|
||||
|
||||
_CurrentStream = CSound.Load(song.GetMP3(), false, true, CConfig.Config.Sound.KaraokeEffect == EOffOn.TR_CONFIG_ON ? EAudioEffect.Karaoke : EAudioEffect.None);
|
||||
if (CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_INSTRUMENTAL || CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE)
|
||||
{
|
||||
_CurrentStream = CSound.Load(song.GetInstrumental(), false, true, EAudioEffect.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
_CurrentStream = CSound.Load(song.GetMP3(), false, true, CConfig.Config.Sound.KaraokeEffect == EOffOn.TR_CONFIG_ON ? EAudioEffect.Karaoke : EAudioEffect.None);
|
||||
}
|
||||
|
||||
CSound.SetStreamVolume(_CurrentStream, 100);
|
||||
CSound.SetPosition(_CurrentStream, song.Start);
|
||||
_CurrentTime = song.Start;
|
||||
@@ -1399,13 +1407,26 @@ namespace Vocaluxe.Screens
|
||||
|
||||
for (int player = 0; player < CGame.NumPlayers; player++)
|
||||
{
|
||||
_Texts[_PlayerTextScore[player]].Visible = true;
|
||||
if (CScreenSong.GetAudioMode() == EAudioMode.TR_AUDIOMODE_KARAOKE)
|
||||
{
|
||||
_Texts[_PlayerTextScore[player]].Visible = false;
|
||||
_Statics[_PlayerStaticScore[player]].Visible = false;
|
||||
_ProgressBars[_PlayerProgressBarRating[player]].Visible = false;
|
||||
_SingNotes[_SingBars].Visible = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_Texts[_PlayerTextScore[player]].Visible = true;
|
||||
_Statics[_PlayerStaticScore[player]].Visible = true;
|
||||
_ProgressBars[_PlayerProgressBarRating[player]].Visible = true;
|
||||
_SingNotes[_SingBars].Visible = true;
|
||||
}
|
||||
|
||||
_Texts[_PlayerTextName[player]].Visible = (CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
|
||||
CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_NAME);
|
||||
_Statics[_PlayerStaticScore[player]].Visible = true;
|
||||
_Statics[_PlayerStaticAvatar[player]].Visible = (CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_BOTH ||
|
||||
CConfig.Config.Theme.PlayerInfo == EPlayerInfo.TR_CONFIG_PLAYERINFO_AVATAR);
|
||||
_ProgressBars[_PlayerProgressBarRating[player]].Visible = true;
|
||||
}
|
||||
|
||||
_Lyrics[_LyricMain].Alpha = 0f;
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace Vocaluxe.Screens
|
||||
private const string _ButtonOptionsHighscore = "ButtonOptionsHighscore";
|
||||
|
||||
private const string _SelectSlideOptionsMode = "SelectSlideOptionsMode";
|
||||
private const string _SelectSlideOptionsAudioMode = "SelectSlideOptionsAudioMode";
|
||||
private const string _SelectSlideOptionsPlaylistAdd = "SelectSlideOptionsPlaylistAdd";
|
||||
private const string _SelectSlideOptionsPlaylistOpen = "SelectSlideOptionsPlaylistOpen";
|
||||
private const string _SelectSlideOptionsNumMedleySongs = "SelectSlideOptionsNumMedleySongs";
|
||||
@@ -105,6 +106,13 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private System.Timers.Timer _TimerShortInfoText;
|
||||
|
||||
private static EAudioMode _AudioMode = EAudioMode.TR_AUDIOMODE_NORMAL;
|
||||
|
||||
public static EAudioMode GetAudioMode()
|
||||
{
|
||||
return _AudioMode;
|
||||
}
|
||||
|
||||
private static int _StaticSelectedSongID;
|
||||
|
||||
private static void setStaticSelectedSongID(int songID)
|
||||
@@ -168,7 +176,7 @@ namespace Vocaluxe.Screens
|
||||
_ThemeStatics = new string[] {_StaticSearchBar, _StaticOptionsBG, _StaticShortInfoTop};
|
||||
_ThemeTexts = tlist.ToArray();
|
||||
_ThemeButtons = blist.ToArray();
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideOptionsMode, _SelectSlideOptionsPlaylistAdd, _SelectSlideOptionsPlaylistOpen, _SelectSlideOptionsNumMedleySongs};
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideOptionsMode, _SelectSlideOptionsAudioMode, _SelectSlideOptionsPlaylistAdd, _SelectSlideOptionsPlaylistOpen, _SelectSlideOptionsNumMedleySongs};
|
||||
_ThemeSongMenus = new string[] {_SongMenuName};
|
||||
_ThemePlaylists = new string[] {_PlaylistName};
|
||||
|
||||
@@ -1014,6 +1022,8 @@ namespace Vocaluxe.Screens
|
||||
else
|
||||
gm = CSongs.VisibleSongs[songNr].IsDuet ? EGameMode.TR_GAMEMODE_DUET : EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
_AudioMode = (EAudioMode)_SelectSlides[_SelectSlideOptionsAudioMode].Selection;
|
||||
|
||||
CGame.Reset();
|
||||
CGame.ClearSongs();
|
||||
|
||||
@@ -1331,6 +1341,7 @@ namespace Vocaluxe.Screens
|
||||
private void _ToggleSongOptions(ESongOptionsView view)
|
||||
{
|
||||
_SelectSlides[_SelectSlideOptionsMode].Visible = false;
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].Visible = false;
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Visible = false;
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].Visible = false;
|
||||
_SelectSlides[_SelectSlideOptionsNumMedleySongs].Visible = false;
|
||||
@@ -1397,6 +1408,22 @@ namespace Vocaluxe.Screens
|
||||
|
||||
//Set SelectSlide-Selection to last selected game-mode if possible
|
||||
_SelectSlides[_SelectSlideOptionsMode].SelectedTag = (int)lastMode;
|
||||
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].Clear();
|
||||
CSong currentSong = CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()];
|
||||
if (currentSong.HasInstrumental())
|
||||
{
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].AddValue("TR_AUDIOMODE_NORMAL");
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].AddValue("TR_AUDIOMODE_INSTRUMENTAL");
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].AddValue("TR_AUDIOMODE_KARAOKE");
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].Visible = false;
|
||||
}
|
||||
_SelectSlides[_SelectSlideOptionsAudioMode].Selection = (int)_AudioMode;
|
||||
|
||||
_SelectSlides[_SelectSlideOptionsMode].Visible = true;
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Visible = true;
|
||||
_Buttons[_ButtonOptionsSing].Visible = true;
|
||||
@@ -1404,6 +1431,7 @@ namespace Vocaluxe.Screens
|
||||
_Buttons[_ButtonOptionsHighscore].Visible = true;
|
||||
_SelectElement(_Buttons[_ButtonOptionsSing]);
|
||||
_SetSelectSlidePlaylistToCurrentPlaylist();
|
||||
|
||||
}
|
||||
|
||||
private void _ShowSongOptionsGeneral()
|
||||
|
||||
@@ -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
|
||||
@@ -364,6 +364,13 @@ namespace VocaluxeLib
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
|
||||
public enum EAudioMode
|
||||
{
|
||||
TR_AUDIOMODE_NORMAL,
|
||||
TR_AUDIOMODE_INSTRUMENTAL,
|
||||
TR_AUDIOMODE_KARAOKE
|
||||
}
|
||||
|
||||
public enum ENoteType
|
||||
{
|
||||
Normal,
|
||||
|
||||
@@ -329,6 +329,11 @@ namespace VocaluxeLib.Songs
|
||||
return Path.Combine(Folder, InstrumentalFileName);
|
||||
}
|
||||
|
||||
public bool HasInstrumental()
|
||||
{
|
||||
return !string.IsNullOrEmpty(InstrumentalFileName);
|
||||
}
|
||||
|
||||
public string GetVocals()
|
||||
{
|
||||
return Path.Combine(Folder, VocalsFileName);
|
||||
|
||||
Reference in new issue
Block a user