示例#1
0
        /// <summary>
        /// Gets points in time of the current grid.
        /// </summary>
        /// <param name="tempoMap">Tempo map used to get grid's times.</param>
        /// <returns>Collection of points in time of the current grid.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="tempoMap"/> is null.</exception>
        public IEnumerable <long> GetTimes(TempoMap tempoMap)
        {
            ThrowIfArgument.IsNull(nameof(tempoMap), tempoMap);

            return(Times.Select(t => TimeConverter.ConvertFrom(t, tempoMap)));
        }
        /// <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="ArgumentNullException"><paramref name="startTime"/> is <c>null</c>.</exception>
        public void ClearTempo(ITimeSpan startTime)
        {
            ThrowIfArgument.IsNull(nameof(startTime), startTime);

            ClearTempo(TimeConverter.ConvertFrom(startTime, TempoMap));
        }