tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_ModifierCommon.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14namespace ModifierCommon
15{
16 enum RateType
17 {
18 hertz,
19 fourBars,
20 twoBars,
21 bar,
22 halfT,
23 half,
24 halfD,
25 quarterT,
26 quarter,
27 quarterD,
28 eighthT,
29 eighth,
30 eighthD,
31 sixteenthT,
32 sixteenth,
33 sixteenthD,
34 thirtySecondT,
35 thirtySecond,
36 thirtySecondD,
37 sixtyFourthT,
38 sixtyFourth,
39 sixtyFourthD
40 };
41
42 inline juce::StringArray getRateTypeChoices()
43 {
44 return { TRANS("Hertz"),
45 TRANS("4 Bars"),
46 TRANS("2 Bars"),
47 TRANS("1 Bar"),
48 TRANS("1/2 T"),
49 TRANS("1/2"),
50 TRANS("1/2 D"),
51 TRANS("1/4 T"),
52 TRANS("1/4"),
53 TRANS("1/4 D"),
54 TRANS("1/8 T"),
55 TRANS("1/8"),
56 TRANS("1/8 D"),
57 TRANS("1/16 T"),
58 TRANS("1/16"),
59 TRANS("1/16 D"),
60 TRANS("1/32 T"),
61 TRANS("1/32"),
62 TRANS("1/32 D"),
63 TRANS("1/64 T"),
64 TRANS("1/64"),
65 TRANS("1/64 D") };
66 }
67
69 double getBarFraction (RateType) noexcept;
70
71 enum SyncType
72 {
73 free,
74 transport,
75 note
76 };
77
78 inline juce::StringArray getSyncTypeChoices()
79 {
80 return { TRANS("Free"), TRANS("Transport"), TRANS("Note") };
81 }
82}
83
84}} // namespace tracktion { inline namespace engine
#define TRANS(stringLiteral)
double getBarFraction(RateType rt) noexcept
Returns the fraction of a bar to be used for a given rate type.