Ejemplo n.º 1
0
        protected void UpdateBeatTime()
        {
            double globalBeatTime = AudioHelmClock.GetGlobalBeatTime();
            double bpm            = AudioHelmClock.GetGlobalBpm();
            double lastUpdate     = AudioHelmClock.GetLastSampledTime();

            double time = AudioSettings.dspTime;

            beatTime = globalBeatTime + bpm * (time - lastUpdate) / Utils.kSecondsPerMinute;
        }
Ejemplo n.º 2
0
 protected double GetSequencerTime()
 {
     return((Utils.kBpmToSixteenths * AudioHelmClock.GetGlobalBpm()) * (AudioSettings.dspTime - syncTime));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the time in seconds of a single sixteenth note in the sequencer.
 /// </summary>
 /// <returns>The time in seconds of a sixteenth note.</returns>
 public float GetSixteenthTime()
 {
     return(1.0f / (Utils.kBpmToSixteenths * AudioHelmClock.GetGlobalBpm()));
 }