using RhythmBase.Components; namespace RhythmBase.Events { /// /// Represents a stutter event in a room. /// public class Stutter : BaseEvent, IRoomEvent { private float sourceBeat = 1; /// /// Initializes a new instance of the class. /// public Stutter() { Rooms = new RDRoom(false, new byte[1]); Type = EventType.Stutter; Tab = Tabs.Actions; } /// /// Gets or sets the room associated with the stutter event. /// public RDRoom Rooms { get; set; } /// /// Gets or sets the source beat of the stutter event. /// public float SourceBeat { get => sourceBeat; set => sourceBeat = (value > 1 && value <= Beat.CPB + 1) ? value : throw new Exceptions.RhythmBaseException("SourceBeat must in CPB."); } /// /// Gets or sets the length of the stutter event. /// public float Length { get; set; } /// /// Gets or sets the action of the stutter event. /// public Actions Action { get; set; } /// /// Gets or sets the number of loops for the stutter event. /// public int Loops { get; set; } /// /// Gets the type of the event. /// public override EventType Type { get; } /// /// Gets the tab associated with the event. /// public override Tabs Tab { get; } /// /// Defines the possible actions for the stutter event. /// public enum Actions { /// /// Add action. /// Add, /// /// Cancel action. /// Cancel } } }