/// <summary> /// Removes all changes of tempo that occured between the specified times. /// </summary> /// <param name="startTime">Start of time range to remove changes of tempo in.</param> /// <param name="endTime">End of time range to remove changes of tempo in.</param> /// <exception cref="ArgumentOutOfRangeException"> /// <para>One of the following errors occured:</para> /// <list type="bullet"> /// <item> /// <description><paramref name="startTime"/> is negative.</description> /// </item> /// <item> /// <description><paramref name="endTime"/> is negative.</description> /// </item> /// </list> /// </exception> public void ClearTempo(long startTime, long endTime) { ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime); ThrowIfTimeArgument.EndIsNegative(nameof(endTime), endTime); TempoMap.TempoLine.DeleteValues(startTime, endTime); }
/// <summary> /// Deletes all parameter's value changes in the specified time range. /// </summary> /// <param name="startTime">Start time of the time range where value changes should be deleted.</param> /// <param name="endTime">End time of the time range where value changes should be deleted.</param> /// <exception cref="ArgumentOutOfRangeException"> /// <para>One of the following errors occured:</para> /// <list type="bullet"> /// <item> /// <description><paramref name="startTime"/> is negative.</description> /// </item> /// <item> /// <description><paramref name="endTime"/> is negative.</description> /// </item> /// </list> /// </exception> internal void DeleteValues(long startTime, long endTime) { ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime); ThrowIfTimeArgument.EndIsNegative(nameof(endTime), endTime); _values.RemoveAll(v => v.Time >= startTime && v.Time <= endTime); OnValuesChanged(); }