21#include "definitions_cxx.hpp"
22#include "model/scale/note_set.h"
26constexpr int8_t kMaxChordKeyboardSize = 7;
27constexpr int8_t kUniqueVoicings = 4;
28constexpr int8_t kUniqueChords = 33;
29constexpr int8_t kOffScreenChords = kUniqueChords - kDisplayHeight;
31namespace deluge::gui::ui::keyboard {
33enum class ChordQuality {
44ChordQuality getChordQuality(NoteSet& notes);
47const int8_t NONE = INT8_MAX;
61const int8_t MIN7 = 10;
62const int8_t DOM7 = 10;
63const int8_t MAJ7 = 11;
64const int8_t OCT = kOctaveSize;
65const int8_t MIN9 = MIN2 + OCT;
66const int8_t MAJ9 = MAJ2 + OCT;
67const int8_t MIN10 = MIN3 + OCT;
68const int8_t MAJ10 = MAJ3 + OCT;
69const int8_t P11 = P4 + OCT;
70const int8_t AUG11 = AUG4 + OCT;
71const int8_t DIM12 = DIM5 + OCT;
72const int8_t P12 = P5 + OCT;
73const int8_t MIN13 = MIN6 + OCT;
74const int8_t MAJ13 = MAJ6 + OCT;
75const int8_t MIN14 = MIN7 + OCT;
76const int8_t MAJ14 = MAJ7 + OCT;
80 int8_t offsets[kMaxChordKeyboardSize];
81 const char* supplementalName =
"";
88 Voicing voicings[kUniqueVoicings] = {0};
92extern const Chord kEmptyChord;
93extern const Chord kMajor;
94extern const Chord kMinor;
97extern const Chord k69;
98extern const Chord kSus2;
99extern const Chord kSus4;
100extern const Chord k7;
101extern const Chord k7Sus4;
102extern const Chord k7Sus2;
103extern const Chord kM7;
104extern const Chord kMinor7;
105extern const Chord kMinor2;
106extern const Chord kMinor4;
107extern const Chord kDim;
108extern const Chord kFullDim;
109extern const Chord kAug;
110extern const Chord kMinor6;
111extern const Chord kMinorMaj7;
112extern const Chord kMinor7b5;
113extern const Chord kMinor9b5;
114extern const Chord kMinor7b5b9;
115extern const Chord k9;
116extern const Chord kM9;
117extern const Chord kMinor9;
118extern const Chord k11;
119extern const Chord kM11;
120extern const Chord kMinor11;
121extern const Chord k13;
122extern const Chord kM13;
123extern const Chord kM13Sharp11;
124extern const Chord kMinor13;
126extern const std::array<const Chord, 10> majorChords;
128extern const std::array<const Chord, 10> minorChords;
130extern const std::array<const Chord, 10> dominantChords;
132extern const std::array<const Chord, 10> diminishedChords;
134extern const std::array<const Chord, 10> augmentedChords;
136extern const std::array<const Chord, 10> otherChords;
152 void adjustChordRowOffset(int8_t offset);
153 void adjustVoicingOffset(int8_t chordNo, int8_t offset);
155 Chord chords[kUniqueChords];
156 int8_t voicingOffset[kUniqueChords] = {0};
157 uint8_t chordRowOffset = 0;
160 int8_t validateChordNo(int8_t chordNo);
Voicing getChordVoicing(int8_t chordNo)
Get a voicing for a chord with a given index. If the voicingOffset for that Chord is out of bounds,...
Definition chords.cpp:60
A chord is a name and a set of voicings.
Definition chords.h:85
A voicing is a set of offsets from the root note of a chord.
Definition chords.h:79