예제 #1
0
        private void CalculateLength(GameSong song, string notes)
        {
            var endPhrase = ParseNoteString(notes, false);

            song.Length = song.ConvertPhraseToMS(endPhrase + 0.5) / 1000.0;
            Log.AddMessage(String.Format("Song notes end at phrase {0}. Length set to {1}. ", endPhrase, song.Length), LogLevel.DEBUG);
        }
예제 #2
0
        private void AdjustOffset(GameSong song, string notes)
        {
            var startPhrase = ParseNoteString(notes, true);

            song.Offset = song.ConvertPhraseToMS(startPhrase) / 1000.0;
            AdjustBpmChanges(song, startPhrase);
            Log.AddMessage(String.Format("Song notes start at phrase {0}. Offset set to {1}. ", startPhrase, song.Offset), LogLevel.DEBUG);
        }
예제 #3
0
 private void DrawSongTimeLine()
 {
     if (Core.Settings.Get <bool>("SongDebug"))
     {
         return;
     }
     _songTimeLine.Song            = _gameSong;
     _songTimeLine.CurrentPosition = _gameSong.ConvertPhraseToMS(_phraseNumber) / 1000;
     _songTimeLine.AudioEnd        = Core.Audio.GetChannelLength((int)Core.Cookies["GameSongChannel"]) / 1000;
     _songTimeLine.Draw();
 }
예제 #4
0
        private void CalculateLength(GameSong song, string notes)
        {
            var lines = notes.Split(',');
            var idx   = 0;

            for (int x = lines.Length - 1; x >= 0; x--)
            {
                //Extension method
                if (lines[x].ToCharArray().ContainsAny('1', '2'))
                {
                    idx = x;
                    break;
                }
            }

            song.Length = song.ConvertPhraseToMS(idx + 0.5) / 1000.0;
            Log.AddMessage(String.Format("Song notes end at phrase {0}. Length set to {1}. ", idx, song.Length), LogLevel.DEBUG);
        }
예제 #5
0
        private void AdjustOffset(GameSong song, string notes)
        {
            var lines = notes.Split(',');
            var idx   = 0;

            for (int x = 0; x < lines.Length; x++)
            {
                //Extension method
                if (lines[x].ToCharArray().ContainsAny('1', '2'))
                {
                    idx = x;
                    break;
                }
            }
            song.Offset = song.ConvertPhraseToMS(idx) / 1000.0;

            //Adjust all BPM changes forward to compensate for the offset moving.
            AdjustBpmChanges(song, idx);
            Log.AddMessage(String.Format("Song notes start at phrase {0}. Offset set to {1}. ", idx, song.Offset), LogLevel.DEBUG);
        }