MCPcopy Create free account
hub / github.com/audacity/audacity / PitchName

Function PitchName

libraries/lib-math/PitchName.cpp:54–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54TranslatableString PitchName(const double dMIDInote, const PitchNameChoice choice)
55{
56 static const TranslatableString sharpnames[12] = {
57 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
58 XO("C"),
59 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
60 XO("C\u266f"),
61 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
62 XO("D"),
63 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
64 XO("D\u266f"),
65 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
66 XO("E"),
67 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
68 XO("F"),
69 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
70 XO("F\u266f"),
71 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
72 XO("G"),
73 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
74 XO("G\u266f"),
75 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
76 XO("A"),
77 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
78 XO("A\u266f"),
79 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
80 XO("B"),
81 };
82
83 static const TranslatableString flatnames[12] = {
84 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
85 XO("C"),
86 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
87 XO("D\u266d"),
88 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
89 XO("D"),
90 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
91 XO("E\u266d"),
92 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
93 XO("E"),
94 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
95 XO("F"),
96 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
97 XO("G\u266d"),
98 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
99 XO("G"),
100 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
101 XO("A\u266d"),
102 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
103 XO("A"),
104 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
105 XO("B\u266d"),
106 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */
107 XO("B"),
108 };
109
110 static const TranslatableString bothnames[12] = {
111 /* i18n-hint: Name of a musical note in the 12-tone chromatic scale */

Callers 2

PitchName_AbsoluteFunction · 0.85
PopulateOrExchangeMethod · 0.85

Calls 1

PitchIndexFunction · 0.85

Tested by

no test coverage detected