private string FadeOutDescription(Track track, Track nextTrack) { if (track == null) { return(""); } var standardEndLength = BpmHelper.GetFullEndLoopLengthAdjustedToMatchAnotherTrack(track, nextTrack); var looped = track.EndLoopCount > 1; var powerDown = track.PowerDownOnEnd; var description = "Fade Out: "; if (powerDown) { description = "PowerDown"; } else { description += GetFormattedSeconds(standardEndLength); } var hasExtendedMix = BassPlayer.HasExtendedMixAttributes(track, nextTrack); if (hasExtendedMix) { var extendedFadeType = BassPlayer.GetExtendedFadeType(track, nextTrack); if (extendedFadeType == ExtendedFadeType.Default) { var extendedEndLength = BassPlayer.GetExtendedFadeOutLength(track, nextTrack); description += " (" + GetFormattedSeconds(extendedEndLength) + "*)"; } else { description += " (" + extendedFadeType + "*)"; } } if (looped) { description += " looped"; } description += " " + track.EndBpm.ToString("00.00") + "BPM"; return(description); }
private string FadeInDescription(Track previousTrack, Track track) { if (track == null) { return(""); } var standardStartLength = track.FullStartLoopLengthSeconds; var looped = track.StartLoopCount > 1; var powerDown = previousTrack?.PowerDownOnEnd ?? false; var description = "Fade In: "; description += GetFormattedSeconds(standardStartLength); if (powerDown) { var powerDownFadeIn = BpmHelper.GetDefaultLoopLength(track.StartBpm) / 4D; description += " (" + GetFormattedSeconds(powerDownFadeIn) + ")"; } else { var hasExtendedMix = BassPlayer.HasExtendedMixAttributes(previousTrack, track); if (hasExtendedMix) { var extendedEndLength = BassPlayer.GetExtendedFadeOutLength(previousTrack, track); description += " (" + GetFormattedSeconds(extendedEndLength) + "*)"; } } if (looped) { description += " looped"; } description += " " + track.StartBpm.ToString("00.00") + "BPM"; return(description); }