Exemplo n.º 1
0
 public long ConvertFrom(ILength length, ITime time, TempoMap tempoMap)
 {
     return(ConvertFrom(length, TimeConverter.ConvertFrom(time, tempoMap), tempoMap));
 }
Exemplo n.º 2
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="ArgumentNullException"><paramref name="startTime"/> is null.</exception>
        public void ClearTempo(ITimeSpan startTime)
        {
            ThrowIfArgument.IsNull(nameof(startTime), startTime);

            ClearTempo(TimeConverter.ConvertFrom(startTime, TempoMap));
        }
Exemplo n.º 3
0
 public ILength ConvertTo(long length, ITime time, TempoMap tempoMap)
 {
     return(ConvertTo(length, TimeConverter.ConvertFrom(time, tempoMap), tempoMap));
 }
        /// <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)));
        }