using Microsoft.VisualBasic.CompilerServices;
namespace RhythmBase.Events
{
///
/// Represents a pulse free time beat event.
///
public class PulseFreeTimeBeat : BaseBeat
{
///
/// Initializes a new instance of the class.
///
public PulseFreeTimeBeat()
{
Type = EventType.PulseFreeTimeBeat;
}
///
/// Gets or sets the hold duration.
///
public float Hold { get; set; }
///
/// Gets or sets the action type.
///
public ActionType Action { get; set; }
///
/// Gets or sets the custom pulse value.
///
public uint CustomPulse { get; set; }
///
/// Gets the event type.
///
public override EventType Type { get; }
///
/// Returns a string that represents the current object.
///
/// A string that represents the current object.
public override string ToString()
{
string Out = "";
switch (Action)
{
case ActionType.Increment:
Out = ">";
break;
case ActionType.Decrement:
Out = "<";
break;
case ActionType.Custom:
Out = (CustomPulse + 1).ToString();
break;
case ActionType.Remove:
Out = "X";
break;
}
return base.ToString() + $"{Out}";
}
///
/// Defines the action types for the pulse free time beat.
///
public enum ActionType
{
///
/// Increment action.
///
Increment,
///
/// Decrement action.
///
Decrement,
///
/// Custom action.
///
Custom,
///
/// Remove action.
///
Remove
}
}
}