/// <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"><paramref name="startTime"/> is negative. -or- /// <paramref name="endTime"/> is negative.</exception> public void ClearTempo(long startTime, long endTime) { ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime); ThrowIfTimeArgument.EndIsNegative(nameof(endTime), endTime); TempoMap.Tempo.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"> /// <paramref name="startTime" /> is negative. -or- /// <paramref name="endTime" /> is negative. /// </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); }
/// <summary> /// Removes all changes of time signature that occured since the specified time. /// </summary> /// <param name="startTime">Time to remove changes of time signature since.</param> /// <exception cref="ArgumentOutOfRangeException"><paramref name="startTime"/> is negative.</exception> public void ClearTimeSignature(long startTime) { ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime); TempoMap.TimeSignature.DeleteValues(startTime); }