#include <SampleRateBasedClock.h>
The purpose of this class is to deal with timing based on the sample rate and do the proper conversions.
◆ SampleRateBasedClock()
pongasoft::VST::SampleRateBasedClock::SampleRateBasedClock |
( |
SampleRate |
iSampleRate | ) |
|
|
inlineexplicit |
◆ getNextBarSampleCount()
TSamples pongasoft::VST::SampleRateBasedClock::getNextBarSampleCount |
( |
TSamples |
iCurrentSampleCount, |
|
|
double |
iTempo, |
|
|
int32 |
iTimeSigNumerator = 4 , |
|
|
int32 |
iTimeSigDenominator = 4 |
|
) |
| const |
|
inline |
Given the current sample count (which can be extracted from ProcessData::processContext->projectTimeSamples
) returns the number of samples for the next bar boundary.
Example: with a tempo of 120 (4/4), and a sample rate of 48000, each bar is 96000 samples.
getNextBarSampleCount(52123, 120) == 96000; // 1 bar
getNextBarSampleCount(600000, 120) == 672000; // 7 bars
getNextBarSampleCount(672000, 120) == 672000; // 7 bars
getNextBarSampleCount(672001, 120) == 768000; // 8 bars
◆ getRateLimiter()
RateLimiter pongasoft::VST::SampleRateBasedClock::getRateLimiter |
( |
uint32 |
iMillis | ) |
const |
|
inline |
◆ getSampleCountFor()
uint32 pongasoft::VST::SampleRateBasedClock::getSampleCountFor |
( |
uint32 |
iMillis | ) |
const |
|
inline |
◆ getSampleCountFor1Bar()
uint32 pongasoft::VST::SampleRateBasedClock::getSampleCountFor1Bar |
( |
double |
iTempo, |
|
|
int32 |
iTimeSigNumerator = 4 , |
|
|
int32 |
iTimeSigDenominator = 4 |
|
) |
| const |
|
inline |
◆ getSampleRate()
SampleRate pongasoft::VST::SampleRateBasedClock::getSampleRate |
( |
| ) |
const |
|
inline |
◆ getTimeForSampleCount()
uint32 pongasoft::VST::SampleRateBasedClock::getTimeForSampleCount |
( |
uint32 |
iSampleCount | ) |
const |
|
inline |
◆ setSampleRate()
void pongasoft::VST::SampleRateBasedClock::setSampleRate |
( |
SampleRate |
iSampleRate | ) |
|
|
inline |
◆ fSampleRate
SampleRate pongasoft::VST::SampleRateBasedClock::fSampleRate |
|
private |
The documentation for this class was generated from the following file: