/// <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);
        }
Exemplo n.º 2
0
        /// <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();
        }
        /// <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.TimeSignatureLine.DeleteValues(startTime);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Removes all changes of tempo that occured since the specified time.
        /// </summary>
        /// <param name="startTime">Time to remove changes of tempo since.</param>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="startTime"/> is negative.</exception>
        public void ClearTempo(long startTime)
        {
            ThrowIfTimeArgument.StartIsNegative(nameof(startTime), startTime);

            TempoMap.Tempo.DeleteValues(startTime);
        }