using Newtonsoft.Json;
using RhythmBase.Extensions;
using System.Diagnostics;
namespace RhythmBase.Events
{
///
/// Represents an event to add a classic beat.
///
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
public class AddClassicBeat : BaseBeat
{
///
/// Initializes a new instance of the class.
///
public AddClassicBeat() { }
///
/// Gets or sets the tick value.
///
public float Tick { get; set; } = 1f;
///
/// Gets or sets the swing value.
///
public float Swing { get; set; }
///
/// Gets or sets the hold value.
///
public float Hold { get; set; }
///
/// Gets or sets the classic beat pattern.
///
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public ClassicBeatPatterns? SetXs { get; set; }
///
public override EventType Type { get; } = EventType.AddClassicBeat;
///
public override string ToString() => base.ToString() +
$" {Utils.Utils.GetPatternString(this.RowXs())} {((Swing is 0.5f or 0f) ? "" : " Swing")}";
///
/// Defines the classic beat patterns.
///
public enum ClassicBeatPatterns
{
///
/// No change in the beat pattern.
///
NoChange,
///
/// Three beat pattern.
///
ThreeBeat,
///
/// Four beat pattern.
///
FourBeat
}
private string GetDebuggerDisplay() => ToString();
}
}