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