11namespace tracktion {
inline namespace engine
14namespace ModifierCommon
18 constexpr auto dot = 1.5;
19 constexpr auto triplet = 2.0 / 3.0;
23 case fourBars:
return 4.0;
24 case twoBars:
return 2.0;
26 case halfT:
return 1.0 / 2.0 * triplet;
27 case half:
return 1.0 / 2.0;
28 case halfD:
return 1.0 / 2.0 * dot;
29 case quarterT:
return 1.0 / 4.0 * triplet;
30 case quarter:
return 1.0 / 4.0;
31 case quarterD:
return 1.0 / 4.0 * dot;
32 case eighthT:
return 1.0 / 8.0 * triplet;
33 case eighth:
return 1.0 / 8.0;
34 case eighthD:
return 1.0 / 8.0 * dot;
35 case sixteenthT:
return 1.0 / 16.0 * triplet;
36 case sixteenth:
return 1.0 / 16.0;
37 case sixteenthD:
return 1.0 / 16.0 * dot;
38 case thirtySecondT:
return 1.0 / 32.0 * triplet;
39 case thirtySecond:
return 1.0 / 32.0;
40 case thirtySecondD:
return 1.0 / 32.0 * dot;
41 case sixtyFourthT:
return 1.0 / 64.0 * triplet;
42 case sixtyFourth:
return 1.0 / 64.0;
43 case sixtyFourthD:
return 1.0 / 64.0 * dot;
double getBarFraction(RateType rt) noexcept
Returns the fraction of a bar to be used for a given rate type.