Beispiel #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;
        }
Beispiel #2
0
 protected double GetSequencerTime()
 {
     return((Utils.kBpmToSixteenths * AudioHelmClock.GetGlobalBpm()) * (AudioSettings.dspTime - syncTime));
 }
Beispiel #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()));
 }